Yavio

Configuration

Environment variables, secrets, ports, and optional providers

All configuration for the self-hosted platform lives in a single .env file at the repository root. Docker Compose reads this file automatically.

Generating Secrets

Run the setup script to auto-generate all required secrets:

./scripts/setup-env.sh

Or generate them manually:

openssl rand -base64 32

Required Secrets

These must be set before starting the platform. Each should be a unique random string.

VariableUsed ByPurpose
NEXTAUTH_SECRETDashboardEncrypts session cookies
JWT_SECRETIngestion APISigns widget JWTs
API_KEY_HASH_SECRETDashboard + IngestionHMAC key for API key hashing (must match between services)
ENCRYPTION_KEYDashboardAES-256-GCM encryption for OAuth tokens

API_KEY_HASH_SECRET must be identical across the dashboard and ingestion API. If they differ, API keys generated in the dashboard will not authenticate against the ingestion API.

Database Passwords

VariableDefaultDescription
POSTGRES_SERVICE_PASSWORDyavio_devPostgreSQL yavio_service role (table owner, bypasses RLS)
POSTGRES_APP_PASSWORDyavio_devPostgreSQL yavio_app role (RLS enforced)
CLICKHOUSE_PASSWORDyavio_devClickHouse default user (runs migrations)
CLICKHOUSE_INGEST_PASSWORDyavio_devClickHouse yavio_ingest user (INSERT only)
CLICKHOUSE_DASHBOARD_PASSWORDyavio_devClickHouse yavio_dashboard user (SELECT only, row policies)

Change all default passwords before exposing the platform to a network. The defaults are only safe for local development.

Database Connection URLs

VariableDefaultDescription
DATABASE_URLpostgres://yavio_service:yavio_dev@localhost:5432/yavioPostgreSQL connection string
CLICKHOUSE_URLhttp://default:yavio_dev@localhost:8123ClickHouse HTTP endpoint

In Docker Compose, these are overridden with container hostnames (postgres, clickhouse).

Port Configuration

Override default ports via environment variables:

VariableDefaultService
DASHBOARD_PORT3000Dashboard web UI
INGEST_PORT3001Ingestion API
DOCS_PORT3002Documentation site
POSTGRES_PORT5432PostgreSQL
CLICKHOUSE_HTTP_PORT8123ClickHouse HTTP
CLICKHOUSE_NATIVE_PORT9000ClickHouse native protocol

Example — run the dashboard on port 8080:

DASHBOARD_PORT=8080 docker compose up -d

Dashboard Settings

VariableDefaultDescription
NEXTAUTH_URLhttp://localhost:3000Auth callback URL (set to your public domain in production)
APP_URLhttp://localhost:3000Public-facing URL used in emails and links
CORS_ORIGINShttp://localhost:3000Allowed CORS origins for the ingestion API (comma-separated)

OAuth Providers (Optional)

Enable social login by setting provider credentials. Omit to disable.

# GitHub
GITHUB_CLIENT_ID=...
GITHUB_CLIENT_SECRET=...

# Google
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...

Email / SMTP (Optional)

Enable email features (verification, password reset, invitations) by configuring SMTP. If unset, email features are disabled.

SMTP_HOST=smtp.resend.com
SMTP_PORT=587
SMTP_USER=resend
SMTP_PASSWORD=re_...
SMTP_FROM=noreply@yourdomain.com

Production Overrides

For production deployments, use the production compose overlay which adds resource limits and log rotation:

docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d

Or via the CLI:

npx @yavio/cli up --prod

Resource Limits (Production)

ServiceCPUMemory
PostgreSQL22 GB
ClickHouse24 GB
Ingestion API11 GB
Dashboard11 GB
Docs0.5512 MB

On this page