Skip to main content

Overview

The ironclaw service command manages IronClaw as a system service, allowing it to run automatically in the background and start on boot.
  • macOS: Uses launchd (Launch Agent)
  • Linux: Uses systemd (user service)
  • Windows: Not currently supported

Subcommands

install

Install IronClaw as an OS service:
This command:
  1. Creates a service unit file (launchd plist or systemd unit)
  2. Configures the service to start on boot
  3. Sets up logging to system journal
  4. Installs the service for the current user
macOS output:
Linux output:

start

Start the installed service:
Output:

stop

Stop the running service:
Output:

status

Check service status:
Output (running):
Output (stopped):
Output (not installed):

uninstall

Remove the OS service:
Output:
This removes the service configuration but does not delete your data or configuration files.

Service Configuration

macOS (launchd)

The Launch Agent plist is created at:
Example plist:
Manual launchd commands:

Linux (systemd)

The systemd unit is created at:
Example unit file:
Manual systemd commands:

Environment Variables

The service reads environment variables from:
  • ~/.ironclaw/.env (loaded automatically)
  • System environment (for systemd: EnvironmentFile= directive)
  • Service configuration (for launchd: EnvironmentVariables dict)
Ensure your .env file contains all required variables like DATABASE_URL, NEARAI_API_KEY, and SECRETS_MASTER_KEY.

Logging

macOS Logs

View logs using the log command:
Or check the log files directly:

Linux Logs

View logs using journalctl:

Auto-start on Boot

macOS

To enable auto-start:
To disable auto-start:

Linux

To enable auto-start:
To disable auto-start:

Troubleshooting

Check logs for errors:macOS:
Linux:
Common issues:
  • Missing environment variables in .env
  • Database connection failure
  • Invalid configuration
The service will automatically restart on failure. Check logs for crash reasons:Linux:
If the service crashes repeatedly, it may be disabled by systemd. Re-enable:
macOS: Ensure the plist is loaded:
Linux: Ensure the service is enabled:
You may also need to enable user lingering:
Ensure ironclaw is in your PATH and the service unit has the correct path:Find binary location:
Update service unit (Linux): Edit ~/.config/systemd/user/ironclaw.service and update ExecStart=Update service unit (macOS): Edit ~/Library/LaunchAgents/com.ironclaw.agent.plist and update ProgramArguments

ironclaw run

Run the agent directly (foreground)

ironclaw status

Check system health

ironclaw doctor

Diagnose issues