Documentation Index
Fetch the complete documentation index at: https://mintlify.com/zeroclaw-labs/zeroclaw/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Thezeroclaw daemon command launches the full ZeroClaw autonomous runtime. This is the recommended way to run ZeroClaw in production or as an always-on assistant.
The daemon supervises and automatically restarts these components:
- Gateway server - HTTP/WebSocket endpoint for webhooks and API access
- Channel listeners - Telegram, Discord, Slack, WhatsApp, etc.
- Heartbeat monitor - Health checks and status reporting
- Cron scheduler - Scheduled task execution
Basic Usage
Command Syntax
Options
Port for gateway component to listen on. Use
0 for random available port. Defaults to gateway.port in config (typically 8585).Host address for gateway to bind to. Defaults to
gateway.host in config (typically 127.0.0.1).Common values:127.0.0.1- Localhost only (secure default)0.0.0.0- All interfaces (public access)- Specific IP - Bind to specific network interface
Examples
Basic Daemon
Production Setup
Terminal Output
Supervised Components
Gateway Supervisor
The gateway supervisor:- Starts the HTTP/WebSocket gateway
- Monitors for crashes and restarts automatically
- Uses exponential backoff on repeated failures
- Logs all restart events
Channel Supervisors
Each configured channel gets a supervisor that:- Starts the channel listener (Telegram, Discord, etc.)
- Reconnects on network failures
- Handles rate limits and API errors gracefully
- Maintains separate failure tracking per channel
Heartbeat Monitor
Whenheartbeat.enabled = true:
- Writes periodic status to
workspace/.heartbeat - Tracks component health (gateway, channels, scheduler)
- Enables external monitoring systems to detect failures
Cron Scheduler
Whencron.enabled = true:
- Loads scheduled tasks from config
- Executes tasks at specified intervals
- Logs execution results
- Handles task failures gracefully
Startup Behavior
Port Conflict Detection
The daemon checks if the port is already in use before starting:Component Failure Handling
- Single component failure: Other components continue running
- All components fail: Daemon exits with error
- Repeated failures: Exponential backoff (1s β 2s β 4s β β¦ β max)
Configuration
Daemon settings inconfig.toml:
Component Health Monitoring
Check daemon health:Health Status Format
Running as a Service
systemd (Linux)
launchd (macOS)
Stopping the Daemon
Interactive Mode
Service Mode
Restart Strategies
Graceful Restart
Force Restart (on hang)
Logs and Monitoring
Log Locations
- systemd:
journalctl --user -u zeroclaw - launchd:
~/Library/Logs/zeroclaw.log - Direct run: stdout/stderr
Log Verbosity
Control viaRUST_LOG environment variable:
Troubleshooting
Daemon Wonβt Start
Component Keeps Restarting
High Memory/CPU Usage
Performance Tuning
Resource Limits
Backoff Configuration
Exit Codes
0- Success (daemon stopped gracefully)1- Startup error (port in use, component failure)2- Configuration error130- Interrupted (Ctrl+C)
Related Commands
zeroclaw service- Manage daemon as system servicezeroclaw gateway- Run gateway component onlyzeroclaw status- Check system statuszeroclaw config- Manage configuration