Skip to main content
Docker Compose is the recommended way to deploy agtOS in production or when you want Redis and all services running together.

Quick start

This starts three services:

Configuration

Environment variables

Create a .env.local file in the project root with your API keys:
Docker Compose automatically loads .env.local for secrets.

Connecting to host services

When running in Docker, use host.docker.internal to reach services on the host machine:
On Linux, host.docker.internal may not work out of the box. Use --network=host or add extra_hosts: ["host.docker.internal:host-gateway"] to your compose file.

GPU acceleration

For GPU-accelerated speech processing (STT/TTS), use the GPU override:
This adds NVIDIA CUDA support to the speaches container. Requires: GPU acceleration provides 4-6x faster STT/TTS inference compared to CPU.

Redis only

If you’re running agtOS via the CLI or desktop app but want Redis for memory and scheduling:
Or install Redis directly without Docker:
The CLI can also install Redis for you: the POST /api/dependencies/install-redis endpoint creates a redis/redis-stack container automatically.

Resource limits

The default Docker Compose configuration sets resource limits: Adjust these in docker-compose.yml under deploy.resources.limits based on your hardware.

Volumes

Named volumes persist data across container restarts:

Health checks

The agtOS container includes a built-in health check:
Runs every 30 seconds with a 10-second timeout. Docker reports container health status accordingly. The speaches container health check verifies model loading:

Production tips

  • Set NODE_ENV=production for structured JSON logging and credential salt enforcement
  • Set AGTOS_API_KEY to protect API endpoints
  • Set AGTOS_CREDENTIAL_SALT for persistent encrypted credential storage
  • Use restart: unless-stopped (already configured) for automatic recovery
  • Mount .env.local as env_file for secrets management
  • Use a reverse proxy (nginx, Caddy) for TLS termination if exposing externally
See Security for the full production checklist.