Skip to main content
Every application variable is prefixed with LAT_*. A few infrastructure variables (POSTGRES_*, CLICKHOUSE_*) are read directly by the bundled database containers. The committed .env.example is the canonical starting point — it documents both local development and production: copy it to .env.production and apply the values marked # For production on each line. Each variable is either required (the deployment won’t boot or function without it) or optional — it has a safe default, or it unlocks a feature that stays disabled until you set it (SSO, AI, email).

Secrets

Latitude needs two secrets, generated uniquely per deployment — never reuse the example values:
VariableNotes
LAT_MASTER_ENCRYPTION_KEYEncrypts stored provider credentials and integration tokens.
LAT_BETTER_AUTH_SECRETSigns auth sessions and magic-link tokens.
Generate each with:
openssl rand -hex 32
Moreover, remember to change the default infrastructure passwords (POSTGRES_PASSWORD_*, CLICKHOUSE_PASSWORD…) too!

Email

A working email transport is required for anyone to log in. Local development captures mail in Mailpit; production is not bundled with an email service — configure exactly one provider.
VariableNotes
LAT_MAILPIT_*Local-dev capture only (UI at :8025); not for production.
LAT_SMTP_*Any SMTP server (AWS SES, Postmark, SendGrid SMTP, …).
LAT_MAILGUN_*Mailgun API transport.
LAT_SENDGRID_*SendGrid API transport.

AI

The stack boots and core observability (ingest + trace viewing) works without API keys. AI-dependent features stay disabled until you add the relevant provider key:
VariableProviderNotes
LAT_VOYAGE_*Voyage AIEmbeddings + reranking → semantic trace/issue search, search highlights, issue clustering. Without it, search falls back to lexical.
LAT_ANTHROPIC_*AnthropicFlaggers, evaluations, conversation intelligence, issue summarization, and AI generation.
LAT_AWS_*Amazon BedrockSame features as Anthropic (alternative provider); _SESSION_TOKEN, _BEARER_TOKEN_BEDROCK also supported.

SSO

By default users sign in with email magic links. Add an OAuth provider to enable social sign-in:
VariableNotes
LAT_GOOGLE_*Enables Google OAuth sign-in.
LAT_GITHUB_*Enables GitHub OAuth sign-in.
LAT_ALLOWED_EMAIL_DOMAINRestrict sign-up / sign-in to a single email domain (e.g. your company’s).

Integrations

Optional, and cleanly no-op when unset:
VariableNotes
LAT_SLACK_*Slack notifications and interactivity.
LAT_IPINFO_TOKENGeoIP enrichment for the sessions panel; uses the free tier when unset.

Infrastructure

These wire Latitude to its datastores, depending on your chosen deployment option you can either point them to the bundled infrastructure services or bring your own infrastructure.

Application

VariableNotes
NODE_ENVControls under what environment the code runs. Set to production.
LAT_WEB_URL, LAT_API_URL, LAT_INGEST_URLPublic URLs where users and clients reach each service.
LAT_BETTER_AUTH_URLAuth base URL — your API origin.
LAT_TRUSTED_ORIGINS, LAT_CORS_ALLOWED_ORIGINSComma-separated list of origins allowed to call the API.
LAT_WEB_PORT, LAT_API_PORT, LAT_INGEST_PORTHost bind ports (default 3000 / 3001 / 3002).
LAT_WORKERS_HEALTH_PORT, LAT_WORKFLOWS_HEALTH_PORTHealth-check ports for the background workers (default 9090 / 9091).
LAT_IMAGE_TAGImage tag the stack pulls (default latest; pin X.Y.Z in production).
LAT_EXPORT_RATE_LIMIT_*, LAT_INGEST_TRACE_RATE_LIMIT_*Rate-limit tuning for exports and trace ingestion.

Postgres

Primary store for projects, users, and metadata. Requires the vector (pgvector) extension.
VariableNotes
LAT_DATABASE_URLRuntime connection (RLS-bound latitude_app user, latitude schema).
LAT_ADMIN_DATABASE_URLSuperuser connection — migrations, seeds, cross-org queries.
POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DBBundled-Postgres container credentials. Omit if bringing your own Postgres.
POSTGRES_RUNTIME_USER, POSTGRES_RUNTIME_PASSWORDRLS runtime user, created by docker/init-db.sh. Omit if bringing your own Postgres.
LAT_PG_POOL_MAX, LAT_PG_IDLE_TIMEOUT_MS, LAT_PG_CONNECT_TIMEOUT_MSConnection-pool tuning.

ClickHouse

OLAP store for spans and telemetry, in a dedicated database.
VariableNotes
CLICKHOUSE_URL, CLICKHOUSE_USER, CLICKHOUSE_PASSWORD, CLICKHOUSE_DBConnection + dedicated database (also read by the bundled ClickHouse container).
CLICKHOUSE_MIGRATION_URLNative-protocol host and port (e.g. clickhouse://clickhouse:9000) for the migration tool (goose); credentials and database are taken from the other CLICKHOUSE_* variables.
CLICKHOUSE_CLUSTER_ENABLEDSet true for a clustered ClickHouse; default false.

Redis

Two Redis roles — a cache and the BullMQ job queue (same server or separate). Latitude namespaces all keys under latitude:, so it can share an instance with other apps.
VariableNotes
LAT_REDIS_HOST, LAT_REDIS_PORTCache connection.
LAT_BULLMQ_HOST, LAT_BULLMQ_PORTQueue connection.
LAT_REDIS_TLS, LAT_REDIS_CLUSTEREnable TLS / cluster mode for the cache.
LAT_BULLMQ_PASSWORD, LAT_BULLMQ_CLUSTERQueue auth / cluster mode.
LAT_BULL_BOARD_USERNAME, LAT_BULL_BOARD_PASSWORDBasic-auth for the queue dashboard.

Temporal

Workflow engine for durable background processes.
VariableNotes
LAT_TEMPORAL_ADDRESS, LAT_TEMPORAL_NAMESPACE, LAT_TEMPORAL_TASK_QUEUEConnection, namespace, and task queue.
LAT_TEMPORAL_API_KEYOnly for Temporal Cloud.

Object storage

Stores ingested payloads, datasets, and exports — shared by all services. Pick one of two drivers with LAT_STORAGE_DRIVER: fs writes to the local filesystem (a path or volume shared by every service), or s3 points at any S3-compatible service — AWS S3, SeaweedFS, MinIO, or any other managed or self-hosted store.
VariableNotes
LAT_STORAGE_DRIVERfs (local filesystem) or s3 (any S3-compatible store).
LAT_STORAGE_FS_ROOTAbsolute path for the fs driver (required when LAT_STORAGE_DRIVER=fs).
LAT_STORAGE_S3_BUCKET, LAT_STORAGE_S3_REGIONBucket and region (required when LAT_STORAGE_DRIVER=s3).
LAT_STORAGE_S3_ENDPOINT, LAT_STORAGE_S3_FORCE_PATH_STYLESet for non-AWS S3 (SeaweedFS, MinIO); omit for AWS S3.
LAT_STORAGE_S3_ACCESS_KEY_ID, LAT_STORAGE_S3_SECRET_ACCESS_KEYOmit to use the AWS default credential chain (e.g. an IAM role).