Tambo can be self-hosted on your infrastructure using Docker. You get the same features as Tambo Cloud but with complete control over deployment, data, and scaling.The self-hosted stack includes:
Web Dashboard (Next.js) - User interface for managing projects and API keys
API Service (NestJS) - Backend handling agent execution and conversation state
PostgreSQL - Database for threads, messages, and configuration
MinIO (optional) - S3-compatible storage for file uploads
The setup script creates your environment configuration:
5
./scripts/cloud/tambo-setup.sh
6
This generates docker.env from docker.env.example with placeholder values.
7
Configure Environment Variables
8
Edit docker.env and set required values:
9
# Database (required)POSTGRES_PASSWORD=your-secure-password-herePOSTGRES_USER=postgresPOSTGRES_DB=tambo# Security secrets (required - use 32+ character random strings)API_KEY_SECRET=your-32-character-api-key-secretPROVIDER_KEY_SECRET=your-32-character-provider-secretNEXTAUTH_SECRET=your-nextauth-secret# LLM Provider (required)FALLBACK_OPENAI_API_KEY=your-openai-api-key# URLs (required for production)NEXTAUTH_URL=http://localhost:8260NEXT_PUBLIC_TAMBO_API_URL=http://localhost:8261
10
Never commit docker.env to version control. It contains secrets.
11
Start Services
12
Build and start all containers:
13
./scripts/cloud/tambo-start.sh
14
This command:
15
Builds Docker images for web and API
Starts PostgreSQL, web, and API containers
Runs health checks
16
First startup takes 5-10 minutes for image building.
17
Initialize Database
18
Run migrations to set up the database schema:
19
./scripts/cloud/init-database.sh
20
This applies all migrations from packages/db/migrations/.
# Rebuild specific servicedocker compose build apidocker compose up -d api# Rebuild all servicesdocker compose builddocker compose up -d# Force rebuild without cachedocker compose build --no-cache
# Check health endpointscurl http://localhost:8261/health# Monitor resource usagedocker stats# Set up Sentry for error trackingSENTRY_DSN=https://...@sentry.io/...# Enable Langfuse for LLM observabilityLANGFUSE_PUBLIC_KEY=...LANGFUSE_SECRET_KEY=...