elmo
  • Pricing
  • Changelog
  • Roadmap
  • Vision
  • Docs
425Sign up
IntroductionQuick Start
OverviewDevelopment SetupCommands ReferenceArchitectureConfigurationCloud DeploymentTelemetryAI Contribution PolicyVersioning & Releases
Edit this page·View as Markdown·Report an issue·Join our Discord

Get product updates

New features and releases from Elmo, straight to your inbox.

Product

  • Features
  • Pricing
  • Off-Site AEO
  • Changelog
  • Roadmap

Resources

  • Blog
  • Documentation
  • Support
  • API Reference
  • Elmo Cloud Status
  • Provider Status
  • Issues

Learn

  • What is AEO?
  • What is GEO?
  • AEO Glossary
  • AI Search Guides
  • AI Search Statistics
  • AEO by Industry

Tools

  • Tool Directory
  • Free & Open-Source Tools
  • Compare Tools

Company

  • About
  • Vision
  • Brand Assets
  • Merch
  • llms.txt

© 2026 Blue Whale Software, LLC

TermsPrivacyCookiesSubprocessorsAcceptable Use
v0.4.4Open source on GitHub
Twitter / XLinkedInDiscordGitHub
elmo

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. Sign up for Elmo Cloud.

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
ELMO_ENCRYPTION_KEYBase64-encoded 32-byte key used to encrypt provider credentials stored in the databaseAuto-generated
ELMO_ENCRYPTION_KEY_OLDPrevious encryption keys, comma-separated, kept readable during a rotation—
DISABLE_TELEMETRYSet to 1 to disable all telemetry. See Telemetry.—
DEFAULT_DELAY_HOURSHow often each enabled prompt is re-run against the AI models, in hours.24
RUNS_PER_PROMPTHow many times each run samples every tracked platform. Answers vary between identical calls, so several samples make a mention rate a measurement rather than an anecdote — but each one is a provider call you pay for.5

Back up ELMO_ENCRYPTION_KEY alongside your database. Credentials stored in the database are encrypted with it and nothing else — if you lose the key, or restore a database backup onto a deployment that generated a different one, those credentials cannot be recovered and have to be entered again. Elmo logs an error and falls back to the provider keys in your .env when a stored credential will not decrypt.

Rotating the encryption key

Every stored credential records which key encrypted it, so a rotation doesn't have to happen all at once:

  1. Move the current value of ELMO_ENCRYPTION_KEY into ELMO_ENCRYPTION_KEY_OLD.
  2. Put a freshly generated key in ELMO_ENCRYPTION_KEY (openssl rand -base64 32), and restart.

New values are encrypted under the new key while anything saved under a retired one stays readable, so nothing has to be re-entered up front. Drop ELMO_ENCRYPTION_KEY_OLD once every stored credential has been saved again — until then, keep it, or those credentials become unreadable and Elmo logs which key it is missing.

RUNS_PER_PROMPT multiplies provider spend one-for-one: at the default, one firing of one prompt against four platforms is twenty provider calls. Lowering it to 1 cuts the bill by five and makes each result a single sample, so day-to-day movement gets noisier. It applies from the next firing — no rescheduling needed. A value below 1, fractional, or unparseable is ignored in favour of the default, so a typo cannot silently stop tracking or inflate the bill.

DEFAULT_DELAY_HOURS only takes effect for prompts scheduled after you change it. Prompts that are already scheduled keep the cadence they were created with, even after a restart. To apply a new cadence to an existing prompt, disable it and then re-enable it under Settings → Prompts — re-enabling reschedules it at the current DEFAULT_DELAY_HOURS.

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.

Brand onboarding and the Opportunities report also need one direct LLM API key — OPENAI_API_KEY, OPENROUTER_API_KEY, ANTHROPIC_API_KEY, or MISTRAL_API_KEY — even if SCRAPE_TARGETS only uses scrapers. Elmo uses the first of those that's set; to pick one explicitly, set ONBOARDING_LLM_TARGET (e.g. claude:anthropic-api).

VariableDescription
BRIGHTDATA_API_TOKENBrightData token — recommended scraper for ChatGPT + Google AI Mode. Sign up
OXYLABS_USERNAMEOxylabs Web Scraper API username — alternative scraper for ChatGPT, Perplexity, Google AI Mode. Sign up
OXYLABS_PASSWORDOxylabs Web Scraper API password
CLORO_API_KEYCloro key — alternative scraper for ChatGPT, Perplexity, Copilot, Gemini, Google AI Mode, and Google AI Overview. Sign up
SEARCHAPI_API_KEYSearchApi.io key — alternative scraper for ChatGPT, Perplexity, Copilot, Gemini, Google AI Mode, and Google AI Overview, at one flat price per search. 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
MISTRAL_API_KEYMistral API key — enables Mistral tracking
DATAFORSEO_LOGINDataForSEO login — optional, enables DataForSEO targets such as chatgpt:dataforseo:online, gemini:dataforseo:online, google-ai-mode:dataforseo:online, and perplexity:dataforseo:online
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 compose down
elmo compose up -d

Serving Elmo from a Domain

elmo init asks how you'll access Elmo. Choose From a domain and enter it (for example elmo.example.com, which becomes https://elmo.example.com), then point your reverse proxy at the port you pick. Sign-in is only accepted from the configured URL.

To change it later, run elmo edit env, set both APP_URL and VITE_APP_URL to the new URL (for example https://elmo.example.com), then restart with elmo compose up -d. Elmo must be served from the root of its domain, not a subpath.

Using an External Database

By default, elmo init provisions a PostgreSQL container. To use an existing database instead, choose "Use existing Postgres" during elmo init and provide your connection string when prompted.

Your database must be PostgreSQL 15 or later.

Upgrading Postgres

elmo init provisions Postgres 18. elmo upgrade rolls the Elmo images but never touches the Postgres container, so a deployment created on an earlier major keeps running on it — supported, and nothing you have to act on. Postgres 16 gets fixes until November 2028.

If you do want to move, Postgres cannot read a data directory written by a different major version, so it takes a dump and restore.

Do not just change the image tag. From version 18 on, the official Postgres image stores its data in a version-specific subdirectory (/var/lib/postgresql/18/docker) and declares its volume one level up, at /var/lib/postgresql. An 18 image with the old /var/lib/postgresql/data mount does not fail — it writes a brand new, empty cluster to an anonymous volume that is discarded the next time the container is recreated. Your original data survives in elmo_postgres_data, but Elmo comes up empty and anything written in the meantime is lost.

Take a dump while the old container is still running:

elmo compose up -d postgres
docker compose -f ~/.elmo/elmo.yaml exec -T postgres pg_dump -U postgres -d elmo > elmo-backup.sql
elmo compose down

Check that elmo-backup.sql is non-empty and ends with -- PostgreSQL database dump complete before continuing. Then edit the Postgres service with elmo edit compose, changing both the image and the mount path:

postgres:
  image: postgres:18-alpine
  volumes:
    - postgres_data:/var/lib/postgresql

Now restore. Postgres 18 finds no cluster at its new path, initializes an empty one alongside the old files, and the dump goes into that:

elmo compose up -d postgres
docker compose -f ~/.elmo/elmo.yaml exec -T postgres psql -U postgres -d elmo < elmo-backup.sql
elmo compose up -d

Bringing up postgres on its own first matters: it keeps db-migrate from initializing an empty schema ahead of the restore.

Nothing is destroyed along the way: the old cluster stays in the volume, unused, so you can roll back by putting the original image and /var/lib/postgresql/data mount back. Keep elmo-backup.sql either way.

Was this page helpful?

On this page

Deployment ModesEnvironment VariablesCore SettingsRotating the encryption keyAI Provider KeysUpdating ConfigurationServing Elmo from a DomainUsing an External DatabaseUpgrading Postgres