Configuration

Environment variables, deployment modes, and advanced configuration options.

Deployment Modes

Elmo supports several deployment modes, controlled by the DEPLOYMENT_MODE environment variable:

ModeDescription
localSingle-org, email/password auth. Best for individual use. (default)
demoRead-only mode for showcasing Elmo without allowing changes.
cloudManaged hosting (coming soon).

Environment Variables

When you run elmo init, the CLI generates a .env file in your config directory. You can edit this file directly to change settings.

Core Settings

VariableDescriptionDefault
DEPLOYMENT_MODEDeployment modelocal
DATABASE_URLPostgreSQL connection stringGenerated by CLI
BETTER_AUTH_SECRETSecret key for session encryptionAuto-generated
DISABLE_TELEMETRYSet to 1 to disable all telemetry. See Telemetry.

AI Provider Keys

At least one provider is required for Elmo to track visibility. See Providers for a full cost/capability breakdown and recommended setups.

VariableDescription
BRIGHTDATA_API_TOKENBrightData token — recommended scraper for ChatGPT + Google AI Mode. Sign up
OLOSTEP_API_KEYOlostep key — recommended scraper, powers most large-scale trackers. Sign up
OPENAI_API_KEYOpenAI API key — enables ChatGPT (via API, not the consumer UI)
ANTHROPIC_API_KEYAnthropic API key — enables Claude tracking
OPENROUTER_API_KEYOpenRouter key — one key for Claude + other hosted models
DATAFORSEO_LOGINDataForSEO login — optional, unlocks Google AI Mode scraping and keyword brainstorming in the onboarding wizard
DATAFORSEO_PASSWORDDataForSEO password
SCRAPE_TARGETSComma-separated model:provider[:version][:online] entries. See Providers.

Updating Configuration

To change environment variables after initial setup:

# Edit the .env file
nano ./elmo/.env

# Restart services to pick up changes
elmo stop
elmo start

Regenerating Docker Compose

If you need to regenerate the elmo.yaml file (e.g. after changing Postgres mode):

elmo regen

This rebuilds elmo.yaml from your current settings without touching .env.

Using an External Database

By default, elmo init provisions a PostgreSQL container. To use an existing database instead:

  1. Choose "Use existing Postgres" during elmo init, or
  2. Edit .env to set DATABASE_URL to your connection string
  3. Run elmo regen to update elmo.yaml (removes the Postgres container)
  4. Restart with elmo stop && elmo start

Your database must be PostgreSQL 15 or later.

Was this page helpful?