Skip to content

Run as a service

Service mode keeps the same daemon, HTTP app, Automations dispatcher, supervision loop, and memory consolidation running after the foreground shell closes. It does not itself make Agents act; automatic work still needs an enabled Automation trigger.

The built-in manager supports a systemd user unit on Linux and a launchd user agent on macOS.

  1. Use an absolute, validated configuration and set an absolute data root when you do not want state location to depend on the working directory.

    Terminal window
    axocoatl validate /absolute/path/to/axocoatl.yaml
  2. Install the service definition:

    Terminal window
    axocoatl service install --config /absolute/path/to/axocoatl.yaml
  3. Configure provider secrets in the service manager environment if hosted Agents need them. The generated definition does not load .env.

  4. Start it and enable it at login:

    Terminal window
    axocoatl service start
    axocoatl service status

Install resolves both the current axocoatl executable and the config file to absolute paths. The service working directory is the config file’s parent, so the default relative data root becomes <config-directory>/data.

Axocoatl interpolates process environment variables in YAML and does not load dotenv files. The generated service unit/plist does not inject provider keys.

Create a root-readable-by-you-only environment file, then add it through a user-unit override:

[Service]
EnvironmentFile=/absolute/path/to/axocoatl.env
Environment=AXOCOATL_DATA_DIR=/absolute/path/to/axocoatl-data

Open the override with systemctl --user edit axocoatl, then apply it:

Terminal window
systemctl --user daemon-reload
systemctl --user restart axocoatl

On Linux, run the hint printed by install when the daemon must survive logout:

Terminal window
loginctl enable-linger "$USER"
Terminal window
axocoatl service status
axocoatl service stop
axocoatl service start
axocoatl service uninstall

stop leaves the definition installed. uninstall stops and removes it.

For platform logs:

Terminal window
journalctl --user -u axocoatl --since today

For an interactive diagnostic run, stop the service first so it releases the per-user IPC socket, then run:

Terminal window
RUST_LOG=debug axocoatl dev --config /absolute/path/to/axocoatl.yaml

Next: Data and backup →