Overview
Theironclaw 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:- Creates a service unit file (launchd plist or systemd unit)
- Configures the service to start on boot
- Sets up logging to system journal
- Installs the service for the current user
start
Start the installed service:stop
Stop the running service:status
Check service status:uninstall
Remove the OS service:Service Configuration
macOS (launchd)
The Launch Agent plist is created at:Linux (systemd)
The systemd unit is created at:Environment Variables
The service reads environment variables from:~/.ironclaw/.env(loaded automatically)- System environment (for systemd:
EnvironmentFile=directive) - Service configuration (for launchd:
EnvironmentVariablesdict)
Ensure your
.env file contains all required variables like DATABASE_URL, NEARAI_API_KEY, and SECRETS_MASTER_KEY.Logging
macOS Logs
View logs using thelog command:
Linux Logs
View logs usingjournalctl:
Auto-start on Boot
macOS
To enable auto-start:Linux
To enable auto-start:Troubleshooting
Service won't start
Service won't start
Check logs for errors:macOS:Linux:Common issues:
- Missing environment variables in
.env - Database connection failure
- Invalid configuration
Service stops unexpectedly
Service stops unexpectedly
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:
Service doesn't start on boot
Service doesn't start on boot
macOS:
Ensure the plist is loaded:Linux:
Ensure the service is enabled:You may also need to enable user lingering:
Cannot find ironclaw binary
Cannot find ironclaw binary
Ensure Update service unit (Linux):
Edit
ironclaw is in your PATH and the service unit has the correct path:Find binary location:~/.config/systemd/user/ironclaw.service and update ExecStart=Update service unit (macOS):
Edit ~/Library/LaunchAgents/com.ironclaw.agent.plist and update ProgramArgumentsRelated Commands
ironclaw run
Run the agent directly (foreground)
ironclaw status
Check system health
ironclaw doctor
Diagnose issues
