Overview
Starts the Spacebot daemon. This is the default command when you runspacebot without any subcommand.
Usage
Options
Run in the foreground instead of daemonizing. When enabled, the process stays attached to your terminal and logs to stdout/stderr.
Path to a custom config file. If not specified, Spacebot loads configuration from the default location (
~/.spacebot/config.toml).Enable debug-level logging. Increases log verbosity for troubleshooting.
Behavior
When you runspacebot start, the following happens:
- Checks if already running: If a daemon is already running, the command exits with an error showing the existing process ID.
- Runs onboarding: If this is your first time running Spacebot, you’ll go through an interactive setup wizard to configure authentication and basic settings.
- Validates configuration: Loads and validates your config file before starting the daemon to catch errors early.
-
Forks to background: Unless
--foregroundis set, the process daemonizes and detaches from your terminal. - Initializes subsystems: Starts the HTTP API server, messaging adapters (Discord, Telegram, etc.), and agent processes.
-
Writes PID file: Stores the daemon’s process ID in
~/.spacebot/spacebot.pidfor management commands.
Examples
Start daemon in background
Start in foreground with debug logging
Start with custom config
Default behavior
Error Cases
Already running
spacebot stop, or use spacebot restart.
Missing authentication
spacebot auth login or configure API keys via the web UI.
Invalid config
Foreground vs Background
| Mode | Use Case | Logs | Ctrl+C |
|---|---|---|---|
| Background (default) | Production, always-on | Written to ~/.spacebot/logs/ | Does not stop daemon |
Foreground (--foreground) | Development, debugging | Stdout/stderr | Stops daemon |
Related Commands
spacebot stop- Stop the running daemonspacebot status- Check daemon statusspacebot auth login- Authenticate with LLM providers
Process Lifecycle
The daemon runs until:- You explicitly stop it with
spacebot stop - The system shuts down or restarts
- An unrecoverable error occurs (daemon exits with error logs)