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, or fail, until you add the relevant provider key: Every internal AI capability is configurable through LAT_AI_* environment variables. With nothing set, the defaults uses Amazon Bedrock for generation and Voyage AI for embeddings and reranking.

Providers

You have to set the credentials for whichever providers you end up using:
VariableProviderAvailable for
LAT_AWS_*Amazon Bedrock amazon-bedrockGeneration (default), reranking
LAT_VOYAGE_*Voyage AI voyageEmbeddings (default), reranking (default)
LAT_ANTHROPIC_*Anthropic anthropicGeneration
LAT_OPENAI_*OpenAI openaiGeneration, embeddings
LAT_GOOGLE_*Google googleGeneration, embeddings
LAT_CUSTOM_AI_*OpenAI-compatible customGeneration, embeddings

Generation

Each feature resolves every setting through a three-tier fallback:
  1. Per-feature variable LAT_AI_<FEATURE>_<SETTING>
  2. Global variable LAT_AI_GENERATION_<SETTING>
  3. Built-in default minimax.minimax-m2.5
Available <SETTING>:
  • PROVIDER
  • MODEL
  • REASONING (none/default/minimal/low/medium/high/xhigh)
  • TEMPERATURE
  • MAX_TOKENS
Always set PROVIDER and MODEL together — model ids are provider-specific.
FeatureWhat it powersBuilt-in default
ISSUE_DETAILS_GENERATORIssue names/descriptionsamazon-bedrock / minimax.minimax-m2.5
FLAGGER_CLASSIFIERTrace classification and annotationamazon-bedrock / anthropic.claude-haiku-4-5
FLAGGER_EXTRACTORInstruction extractionamazon-bedrock / minimax.minimax-m2.5
FLAGGER_ANNOTATORFlagger annotation draftingamazon-bedrock / minimax.minimax-m2.5
ANNOTATION_ENRICHERAnnotation enrichmentamazon-bedrock / minimax.minimax-m2.5
EVALUATION_JUDGELLM-as-judge evaluation runsamazon-bedrock / minimax.minimax-m2.5
TAXONOMY_NAMINGTaxonomy cluster namingamazon-bedrock / minimax.minimax-m2.5
GEPA_PROPOSEREvaluation-optimization proposalsamazon-bedrock / anthropic.claude-sonnet-4-6

Embeddings

Embeddings are configured globally through LAT_AI_EMBEDDING_PROVIDER and LAT_AI_EMBEDDING_MODEL. It defaults to voyage / voyage-4-large, and powers semantic trace/issue search, search highlights, and issue clustering. Without a working embeddings provider, search falls back to lexical.
The embedding model is a one-time choice — pick it at install time and keep it.
Once an embedding model is used on a live deployment, changing it is a difficult task. Different models produce incompatible vector spaces and existing data is never re-embedded, so switching breaks semantic search, issue matching, and clustering. The model must also emit 2048-dimensional vectors — the dimension is fixed by the database schema and is not configurable.

Reranking

Reranking is configured globally through LAT_AI_RERANKING_PROVIDER and LAT_AI_RERANKING_MODEL. It defaults to voyage / rerank-2.5, and refines signal-discovery candidate matching. Reranking is optional — when unavailable, discovery falls back to embedding-order matching.

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_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
LAT_CLICKHOUSE_URL, LAT_CLICKHOUSE_USER, LAT_CLICKHOUSE_PASSWORD, LAT_CLICKHOUSE_DBApplication connection + dedicated database.
LAT_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 LAT_CLICKHOUSE_* variables.
LAT_CLICKHOUSE_CLUSTER_ENABLEDSet true for a clustered ClickHouse; default false.
CLICKHOUSE_USER, CLICKHOUSE_PASSWORD, CLICKHOUSE_DBBundled-ClickHouse container credentials. Omit if bringing your own ClickHouse.

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 optional queue dashboard, served at /bull-board on the workers health port. Only mounted while both are set; leave unset to disable it.

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.
LAT_TEMPORAL_MAX_CONCURRENT_ACTIVITY_TASKSOptional per-worker cap for concurrently executing Temporal activities. Lower this when CPU-heavy activities share one task queue.

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).