Skip to content

Deployment

Just getting started? See the Installation Guide for local development setup.

This guide covers deploying Nous to a production environment using Docker Compose.

Nous supports two deployment modes:

ModeUse Case
StandaloneFresh servers — includes a bundled Caddy reverse proxy with automatic HTTPS
BYO Reverse ProxyServers with existing Caddy, Nginx, or Traefik — core services only
  • A server with Docker and Docker Compose installed
  • A domain name (for HTTPS in standalone mode)
  • A Google API key for embeddings
Terminal window
git clone https://github.com/jwandekoken/nous.git
cd nous
Terminal window
cp .env.example .env

Edit .env with your production values:

Terminal window
# Required — generate with: openssl rand -hex 32
SECRET_KEY=your-secret-key-here
# Required for embeddings and fact extraction
GOOGLE_API_KEY=your-google-api-key
# Database credentials (change from defaults)
POSTGRES_PASSWORD=your-secure-password
# For standalone mode with HTTPS
DOMAIN=yourdomain.com

Use this if you don’t have an existing reverse proxy. Caddy will handle SSL certificates automatically via Let’s Encrypt.

Terminal window
docker compose -f docker-compose.prod.yml --profile with-proxy up -d --build

Your application will be available at:

  • http://localhost (if no domain configured)
  • https://yourdomain.com (if DOMAIN is set)

Use this if you already have a reverse proxy (Caddy, Nginx, Traefik) running on your server.

Terminal window
docker compose -f docker-compose.prod.yml up -d --build

This starts the databases, API, and web frontend — but no reverse proxy.

Your reverse proxy needs to connect to the nous-net Docker network to reach the internal services.

Step 1: Add the network to your reverse proxy’s docker-compose.yml:

networks:
nous_nous-net:
external: true
services:
caddy: # or nginx, traefik, etc.
networks:
- your-existing-network
- nous_nous-net

Step 2: Add routing rules. Example for Caddy:

nous.yourdomain.com {
handle /api/* {
reverse_proxy nous_api:8000
}
handle {
reverse_proxy nous_web:80
}
}

Step 3: Reload your reverse proxy:

Terminal window
docker exec your-caddy-container caddy reload --config /etc/caddy/Caddyfile
ServiceContainerPort (Internal)Description
dbpostgres_age5432PostgreSQL with Apache AGE (graph storage)
qdrantqdrant6333Vector database (semantic search)
apinous_api8000FastAPI backend
webnous_web80Vue.js static frontend
reverse-proxynous_proxy80, 443Caddy (standalone mode only)
Terminal window
# All services
docker compose -f docker-compose.prod.yml logs -f
# Specific service
docker compose -f docker-compose.prod.yml logs -f api
Terminal window
docker compose -f docker-compose.prod.yml down
Terminal window
git pull
docker compose -f docker-compose.prod.yml up -d --build
CommandDescription
docker compose -f docker-compose.prod.yml up -d --buildStart core services (BYO proxy)
docker compose -f docker-compose.prod.yml --profile with-proxy up -d --buildStart with bundled Caddy
docker compose -f docker-compose.prod.yml downStop all services
docker compose -f docker-compose.prod.yml logs -fView logs
docker compose -f docker-compose.prod.yml psCheck service status
  1. Check logs: docker compose -f docker-compose.prod.yml logs
  2. Verify .env file exists and has required variables
  3. Ensure ports 80/443 aren’t in use (standalone mode)
  1. Check database health: docker compose -f docker-compose.prod.yml ps
  2. View database logs: docker compose -f docker-compose.prod.yml logs db
  3. Verify POSTGRES_PASSWORD matches in your .env
  1. Ensure your domain’s DNS points to your server
  2. Check Caddy logs: docker compose -f docker-compose.prod.yml logs reverse-proxy
  3. Verify port 443 is accessible from the internet
  1. Check if the API container is running: docker compose -f docker-compose.prod.yml ps api
  2. View API logs for errors: docker compose -f docker-compose.prod.yml logs api
  3. Ensure database migrations have run successfully