Skip to content

Environment Variables

A comprehensive list of all .env configurations required to operate the Data Explorer ecosystem.

How to read this env reference

Data Explorer currently exposes two important env references in the repo: the root `.env.example` for a Docker-friendly full-system view, and `server/.env.example` for the direct backend runtime view. The tables below combine those perspectives so you do not have to jump between multiple files when configuring local, staging, or production environments.

Practical note: the code fallback and the example env files currently both use 90000ms. If you want local/dev to fail faster while debugging, lower the value explicitly for your setup.

Keep the two AI configuration layers separate: `server/.env` configures built-in backend lanes, while custom OpenAI-compatible providers and per-role model choices (`Assistant`, `Explain`, `AI SQL`, `AI NoSQL`, `Autocomplete`) are stored locally inside `Configure AI` on each client machine.

Infrastructure

VariableDescriptionExample
PORTBackend server port (default 3001)3001
NODE_ENVApp environmentdevelopment | production
REDIS_URLRedis connection URL for caching, presence, notification, queue, and search flowsredis://localhost:6379

Security & Admin

VariableDescriptionExample
JWT_SECRETStrong secret for access-token signing; weak placeholder values are rejected by the backendreplace-with-a-random-secret-at-least-32-bytes-long
REFRESH_TOKEN_SECRETSeparate secret for refresh tokens; if omitted the app may fall back to JWT_SECRETanother-very-long-secret
ENCRYPTION_KEYExactly 32 characters for encrypting saved connection passwords (AES-256)12345678901234567890123456789012
LEGACY_ENCRYPTION_KEYSLegacy keys used to read connection data encrypted by older versions
ALLOW_INTERNAL_IPSAllow connections to internal IPs / localhost; defaults to false to reduce SSRF risktrue | false
ADMIN_EMAILInitial email for the first admin accountadmin@example.com
ADMIN_PASSWORDInitial admin passwordstrong-password

Metastore & Internal URLs

VariableDescriptionExample
DATABASE_URLConnection URL for the app metadata PostgreSQL storepostgresql://postgres:postgres@localhost:5435/data_explorer
FRONTEND_URLReal frontend origin used for CORS, cookies, and redirect flowshttp://localhost:5173
API_PUBLIC_URLPublic API base URL currently used by billing return / webhook flowshttp://localhost:3001/api
ALLOW_INSECURE_DATABASE_TLSSet to 'false' to enforce TLS certificate verification on every remote database connection (Postgres, MySQL/MariaDB, CockroachDB, Redis, ClickHouse, MSSQL). Defaults to accepting self-signed certificates for easier development.false
VITE_API_URLAPI base URL the Vite frontend should callhttp://localhost:3001/api

AI Providers & LLM

VariableDescriptionExample
GEMINI_API_KEYGoogle Gemini key for the higher-quality and vision laneAIzaSy...
AI_PROVIDER_TIMEOUT_MSOverall timeout for provider requests. The code fallback and the repo example files are both set to 90000ms right now90000
AI_STREAM_IDLE_TIMEOUT_MSTimeout for stalled streams. If omitted, the service falls back to AI_PROVIDER_TIMEOUT_MS; the current default is also 90000ms90000
CEREBRAS_API_KEYCerebras key for a lower-cost lanecbr-...
CEREBRAS_BASE_URLBase URL for the Cerebras OpenAI-compatible endpointhttps://api.cerebras.ai/v1
CEREBRAS_CHAT_MODELDefault model for the Cerebras lanellama3.1-8b
OPENROUTER_API_KEYOpenRouter key for the default auto chain, multi-model fallback, and some vision or web-backed search lanes depending on the chosen modelsk-or-...
OPENROUTER_BASE_URLBase URL for OpenRouterhttps://openrouter.ai/api/v1
OPENROUTER_CHAT_MODELDefault model for the OpenRouter lane
GROQ_API_KEYGroq key for the low-latency lanegsk-...
GROQ_BASE_URLBase URL for the Groq OpenAI-compatible endpointhttps://api.groq.com/openai/v1
GROQ_CHAT_MODELDefault model for the Groq laneopenai/gpt-oss-120b
BEEKNOEE_API_KEYBeeknoee key that enables explicit provider routing from the model catalogsk-bee-...
BEEKNOEE_BASE_URLBase URL for the Beeknoee APIhttps://platform.beeknoee.com/api/v1
BEEKNOEE_CHAT_MODELDefault Beeknoee fallback model when no explicit model is lockedglm-4.7-flash

Social Login (OAuth)

VariableDescriptionExample
GOOGLE_CLIENT_IDGoogle OAuth Client IDxxx.apps.googleusercontent.com
GOOGLE_CLIENT_SECRETGoogle OAuth Client SecretGOCSPX-...
GOOGLE_CALLBACK_URLGoogle callback URL pointing to the real backendhttp://localhost:3001/api/auth/google/callback
GITHUB_CLIENT_IDGitHub OAuth Client IDOv23...
GITHUB_CLIENT_SECRETGitHub OAuth Client Secretgit-...
GITHUB_CALLBACK_URLGitHub callback URL pointing to the real backendhttp://localhost:3001/api/auth/github/callback

Email (Brevo/Auth)

VariableDescriptionExample
MAIL_USERSender email used by the Brevo REST API and auth notificationsyour-email@gmail.com
MAIL_PASSBrevo API key or mail service key; if missing, the app logs emails to the consolexkeysib-...

Billing providers

VariableDescriptionExample
MOMO_PARTNER_CODEPartner code for MoMo checkout
MOMO_ACCESS_KEYAccess key for MoMo
MOMO_SECRET_KEYSecret key for MoMo signatures
MOMO_CREATE_URLMoMo payment creation endpoint (use the sandbox URL locally)https://test-payment.momo.vn/v2/gateway/api/create
ZALOPAY_APP_IDApp ID for ZaloPay
ZALOPAY_KEY1Primary signing key for ZaloPay
ZALOPAY_KEY2Secondary verification key for ZaloPay
ZALOPAY_CREATE_URLSandbox payment creation endpoint for ZaloPayhttps://sb-openapi.zalopay.vn/v2/create

Ready to explore data?

Join the community on GitHub to contribute to the smartest local database IDE.

Launch App