Apantio AI

Understand self-hosting

Learn which services a self-hosted Apantio AI deployment runs, how call data moves between them, and which parts you operate, from Railway to your own servers.

Apantio AI can run on one Docker host or as separate managed services. Self-hosting gives you control over application data, credentials, provider usage, backups, and upgrades.

Live calls still require Twilio, OpenAI, and public HTTPS endpoints for the dashboard and voice gateway.

Deploy on Railway

The Apantio AI Railway template deploys the admin, worker, voice gateway, and migration services with PostgreSQL, Redis, and a storage bucket. Railway generates every secret and database password. You enter an OpenAI API key and your Twilio credentials, then create your account on the admin domain.

Deploy on Railway

Official baseline

The repository's docker-compose.yml runs:

  • PostgreSQL with pgvector for durable data, authentication state, and knowledge embeddings
  • Redis for queues, rate limits, and realtime coordination
  • a persistent Docker volume for recordings and uploaded documents
  • the Next.js admin dashboard and HTTP API
  • the background worker and transactional outbox dispatcher
  • the voice gateway for Twilio Media Streams and OpenAI Realtime
  • Caddy for public routing and TLS

Apantio AI does not add monitoring containers to the Compose stack. Server runtimes can send traces, metrics, and OpenTelemetry logs to a configured OTLP-compatible backend.

Data flow

1. The dashboard and API read and write PostgreSQL through role-specific connections and row-level security. 2. Durable side effects enter the PostgreSQL outbox in the same transaction as business state changes. 3. The worker dispatches queued jobs and refreshes business context snapshots. 4. The voice gateway fetches one snapshot at call start and calls the admin backend only for authoritative operations. 5. The admin and worker share the configured storage provider. Single-host Compose deployments use a persistent local volume by default.

Responsibilities

You are responsible for:

  • PostgreSQL, Redis, and file-storage durability
  • backups, restore drills, upgrades, and monitoring
  • public DNS and TLS for the dashboard and voice gateway
  • Twilio, OpenAI, email, calendar, billing, and analytics credentials
  • secret rotation and least-privilege database roles

Continue with the Docker Compose deployment guide, environment variables, and provider reference.

Local storage requires the admin and worker to run on the same Docker host. Deployments with application containers on more than one host must set STORAGE_PROVIDER=s3 and use AWS S3 or a compatible service.