Skip to content

Self-Hosting with Docker Compose

The repository includes a production-ready docker-compose.yml stack featuring:

  • Application Server (app): FastAPI backend, Vite-built frontend, and async background worker running in a single container.
  • Caddy Reverse Proxy (caddy): Automatic HTTPS (Let’s Encrypt / ZeroSSL), HTTP/3 support, and unbuffered SSE streaming for live LLM tokens.
  • Flexible Database Choices: Built-in persistent SQLite by default (zero setup), or connect to any PostgreSQL database (Supabase, Neon, AWS RDS, Cloud SQL, or bundled local Postgres).

Terminal window
git clone https://github.com/kcthota/scout.git
cd scout
cp .env.example .env
# Generate required secure secrets in .env:
sed -i.bak "s|replace_with_32_hex_session_secret|$(openssl rand -hex 32)|" .env
sed -i.bak "s|replace_with_base64_encryption_key|$(openssl rand -base64 32)|" .env && rm -f .env.bak

Add your GOOGLE_API_KEY (or GEMINI_API_KEY) in .env. Gemini is always required because embeddings, conversation compaction, and voice transcription use it.

The application will refuse to start if SESSION_SECRET or ENCRYPTION_KEY are left as placeholders. Telegram and Email channels can be configured after startup in the web UI.


Section titled “Option A: Pre-Built Container Image from GHCR (Recommended)”

No local build tools or language runtimes needed. Scout publishes official Docker images to GitHub Container Registry (ghcr.io/kcthota/scout).

  1. If the GHCR package is private, authenticate Docker once with a GitHub Personal Access Token (read:packages scope):
    Terminal window
    echo "<YOUR_GITHUB_TOKEN>" | docker login ghcr.io -u <YOUR_GITHUB_USERNAME> --password-stdin
  2. Pull the latest image:
    Terminal window
    docker compose pull
  3. To pin a specific release version, set APP_IMAGE in your .env:
    APP_IMAGE=ghcr.io/kcthota/scout:v0.1.0

To build the container image locally from the repository Dockerfile:

Terminal window
docker compose up -d --build

Scout supports four database configurations out of the box:

Option A: Built-in SQLite (Default, Zero-Setup)

Section titled “Option A: Built-in SQLite (Default, Zero-Setup)”

No extra configuration required. The SQLite database (scout.db) and uploaded media are stored in /app/data (persisted in the app_data Docker volume), and Goose conversation history and session continuity are persisted in the goose_data Docker volume:

DATABASE_URL=sqlite+aiosqlite:////app/data/scout.db

SQLite automatically uses the bundled sqlite-vec extension for fast indexed vector search across memories and knowledge documents.

Set DATABASE_URL pointing to your hosted PostgreSQL instance (Supabase, Neon, AWS RDS, Cloud SQL Direct, etc.):

DATABASE_URL=postgresql://user:[email protected]:5432/scout?sslmode=require

Option C: Bundled Local PostgreSQL Container

Section titled “Option C: Bundled Local PostgreSQL Container”

To run a local PostgreSQL container (pgvector/pgvector:pg16) inside Docker Compose instead of SQLite, enable the local-db profile:

COMPOSE_PROFILES=local-db
DATABASE_URL=postgresql+asyncpg://postgres:replace_with_a_secure_password@postgres:5432/scout
POSTGRES_USER=postgres
POSTGRES_PASSWORD=replace_with_a_secure_password
POSTGRES_DB=scout

To connect to Google Cloud SQL using IAM / Auth Proxy sidecar container, enable the cloudsql profile:

COMPOSE_PROFILES=cloudsql
CLOUDSQL_CONNECTION_NAME=your-gcp-project:region:instance-name
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-key.json
POSTGRES_HOST=cloudsql-proxy
POSTGRES_USER=postgres
POSTGRES_PASSWORD=your_cloudsql_password
POSTGRES_DB=scout

Terminal window
docker compose up -d

Access your agent at https://your-domain.com (or http://localhost when testing locally with DOMAIN=:80).


To upgrade to the latest container release:

Terminal window
docker compose pull app
docker compose up -d

Database schema migrations apply automatically on container startup (alembic upgrade head).


Scout Docker images are published to GitHub Container Registry at ghcr.io/kcthota/scout:

Tag Description
latest Latest stable release
vX.Y.Z (e.g. v0.1.0) Specific immutable release tag
vX.Y (e.g. v0.1) Latest patch release for minor version X.Y

Automated image publishing is handled by GitHub Actions (.github/workflows/publish-docker.yml) whenever a version tag (v*) is pushed to the repository.