Self-host and operate

Docker Compose

Run Automata on any machine with Docker using the published images, one container per service. Unlike the local development stack, the web app runs in a container too, so nothing is built or installed on the host. For a single docker run with everything in one image, see Single container.

Start it

git clone https://github.com/ju-li/automata-mcp.git && cd automata-mcp
cp .env.selfhost.example .env
for k in POSTGRES_PASSWORD WEBHOOK_SECRET EVOLUTION_API_KEY TELEGRAM_BRIDGE_ADMIN_KEY TELEGRAM_SESSION_ENCRYPTION_KEY; do
  echo "$k=$(openssl rand -hex 32)"; done >> .env
# set NUXT_PUBLIC_APP_URL in .env to your public address
docker compose up -d

Open the app at NUXT_PUBLIC_APP_URL and sign up. The first account becomes the administrator; sign-up is invite-only after that unless you change SIGNUP. See Who can sign up. The web service listens on WEB_PORT; put a TLS-terminating reverse proxy in front of it before exposing it to the internet.

Add connector profiles only when you need them:

docker compose --profile whatsapp up -d                      # + WhatsApp (Evolution API, Redis)
docker compose --profile whatsapp --profile telegram up -d   # + Telegram bridge

Database and email (IMAP) connections need only the default services. Telegram also needs your own TELEGRAM_API_ID and TELEGRAM_API_HASH from my.telegram.org; without them the bridge runs and the app tells an administrator what to set.

What it runs

ServiceImageStarted by
Postgrespostgres:16.15-alpineAlways
Webghcr.io/ju-li/automata-mcp-web:1Always
Redis and Evolution APIredis:8.2.9-alpine, ghcr.io/operational-intelligence-inc/evolution-api-reforged:3.2.0 (digest-pinned)whatsapp profile
Telegram bridgeghcr.io/ju-li/automata-mcp-telegram-bridge:1telegram profile

Only the web app is published. Postgres, Evolution, and the bridge, including the webhooks they send back to the app, stay on the compose network.

NUXT_PUBLIC_APP_URL, POSTGRES_PASSWORD, WEBHOOK_SECRET, and EVOLUTION_API_KEY are required: Compose refuses to start without them, even with no WhatsApp profile. The Evolution fork also refuses an empty key or one of the example keys from Evolution's docs. TELEGRAM_BRIDGE_ADMIN_KEY and TELEGRAM_SESSION_ENCRYPTION_KEY are needed only with the telegram profile, where the bridge refuses to start without them. The loop above generates all five. Keep them URL-safe, and set POSTGRES_PASSWORD before the first start: changing it later also needs an ALTER ROLE in Postgres.

ALLOW_PRIVATE_TARGETS=true lets connections reach private and loopback addresses, such as a database on your LAN. It is off by default; never pair it with SIGNUP=open. See Who can sign up.

Mail is optional: with the SMTP host empty, connection alerts and invitation emails are not delivered, although an invitation link can still be copied by hand. Email verification also stays off, and passwords cannot be reset from the app. See Connection alerts and Password reset. Set OPS_ALERT_EMAIL to have reconnect loops and stuck sessions on your Evolution server reported to you.

The .env also takes the optional MCP rate limits, MCP_RATE_TOKEN_PER_MINUTE, MCP_RATE_ORG_PER_MINUTE, and MCP_RATE_EXPENSIVE_PER_MINUTE, and REDIS_URL to share their counts across web replicas. If you point REDIS_URL at the bundled redis service, use a database of its own, such as redis://redis:6379/1.

Updating

The images are pinned to the major tag :1, so a pull stays within compatible releases:

docker compose --profile whatsapp --profile telegram pull
docker compose --profile whatsapp --profile telegram up -d

Pass the same --profile flags you run with. Without them, the profiled services are neither pulled nor recreated.

A release reaches :1 only once it has been tested and promoted. To run each release as soon as it is published, use :beta instead.

The web service applies its own schema migrations at startup. Migrations only move forward, so take a Postgres backup before a major upgrade or before trying a beta. See Releases for tags and versioning.

Protect pairings and data

Back up Postgres regularly and restrict access to the backups, because they hold every stored connection credential. Keep TELEGRAM_SESSION_ENCRYPTION_KEY somewhere other than the backup, and never rotate it casually: changing it unlinks every Telegram account.

The app database

The web app creates and migrates its own app schema in the bundled Postgres on first boot, so there is no separate admin account or migration step. It holds users, sessions, organizations, connections, invitations, connector-token hashes, the MCP clients seen on each token, telemetry tool calls (kept 30 days), last-known WhatsApp group names, pending email verifications and password resets, synced email headers (never bodies), and two-factor credentials.

Connection credentials in this schema, including Evolution and bridge keys, database connection strings, and IMAP passwords, are not encrypted at rest. Treat the database, its volume, and its backups as holding every connected account.

Coming from PocketBase

Earlier versions stored users and connections in PocketBase. Deploy commit 2e1872e first; it imports every user, password, connection, and token into Postgres on first boot. Once the import is done, remove the PocketBase service and its volume.

View source