Guides

Deployment

How to run Sulala Agent OS in production — daemon, env, and optional reverse proxy.

Agent OS

Run as a daemon (background)

After building the CLI from the sulala package:

cd sulala
bun run build
sulala onboard   # first time only
sulala start --daemon

This starts the server in the background and writes the PID to ~/.agent-os/sulala.pid. Use sulala stop to stop it.

Foreground (dev or process manager)

bun run dev
# or
sulala start

Runs the server in the foreground. Use a process manager (systemd, launchd, Docker) if you need restarts and logging.

Environment and persistence

  • Home: All data lives under AGENT_OS_HOME (default ~/.agent-os): config.json, SQLite DB, agents, skills, configs, graphs, workspaces.
  • Database: AGENT_MEMORY_DB_PATH (default ~/.agent-os/database.db). Back up this file for persistence. Ensure the process has read/write access.
  • Secrets: Set API keys and channel tokens in ~/.agent-os/config.json or via env vars. Never commit config or .env with real keys.

Production checklist

  • Port and host: Set PORT (default 3010) and HOST (default 127.0.0.1). Bind to 0.0.0.0 only if you need remote access and have secured the server (e.g. reverse proxy + auth).
  • Reverse proxy: Put the server behind nginx or Caddy with HTTPS. Proxy / and /api (and /api/events for WebSocket) to http://127.0.0.1:3010. Set the channel webhook URLs to the public HTTPS base (e.g. https://your-domain.com/api/channels/telegram/webhook).
  • Health: GET /health returns { ok: true, service: "agent-os" }. Use it for liveness/readiness if needed.
  • Logs: Server logs to stdout/stderr. Redirect or use a process manager that captures logs.

Docker (optional)

If you add a Dockerfile:

  • Use Bun as the base image and run the built entry (e.g. dist/index.js).
  • Set AGENT_OS_HOME to a path inside the container (e.g. /data) and mount a volume there so config and DB persist.
  • Set PORT to match the exposed port. Expose 3010 (or your choice).
  • Pass API keys and channel tokens via env or a mounted config file.

Channels in production

  • Webhooks require a public HTTPS URL. Use a reverse proxy and set each channel’s webhook on the platform (Telegram, Slack, Discord, Viber) to that URL. For Telegram and Viber, call the set-webhook API (or dashboard) with the public URL.
  • Keep tokens and signing secrets in config or env; never in the repo.