Sim

Environment Variables

Configuration reference for Sim Studio

Required

VariableDescription
DATABASE_URLPostgreSQL connection string
BETTER_AUTH_SECRETAuth secret (32 hex chars): openssl rand -hex 32
BETTER_AUTH_URLYour app URL
ENCRYPTION_KEYEncryption key (32 hex chars): openssl rand -hex 32
INTERNAL_API_SECRETInternal API secret (32 hex chars): openssl rand -hex 32
NEXT_PUBLIC_APP_URLPublic app URL
NEXT_PUBLIC_SOCKET_URLWebSocket URL (default: http://localhost:3002)

AI Providers

VariableProvider
OPENAI_API_KEYOpenAI
ANTHROPIC_API_KEY_1Anthropic Claude
GEMINI_API_KEY_1Google Gemini
MISTRAL_API_KEYMistral
OLLAMA_URLOllama (default: http://localhost:11434)

For load balancing, add multiple keys with _1, _2, _3 suffixes (e.g., OPENAI_API_KEY_1, OPENAI_API_KEY_2). Works with OpenAI, Anthropic, and Gemini.

In Docker, use OLLAMA_URL=http://host.docker.internal:11434 for host-machine Ollama.

Azure OpenAI

VariableDescription
AZURE_OPENAI_API_KEYAzure OpenAI API key
AZURE_OPENAI_ENDPOINTAzure OpenAI endpoint URL
AZURE_OPENAI_API_VERSIONAPI version (e.g., 2024-02-15-preview)

vLLM (Self-Hosted)

VariableDescription
VLLM_BASE_URLvLLM server URL (e.g., http://localhost:8000/v1)
VLLM_API_KEYOptional bearer token for vLLM

OAuth Providers

VariableDescription
GOOGLE_CLIENT_IDGoogle OAuth client ID
GOOGLE_CLIENT_SECRETGoogle OAuth client secret
GITHUB_CLIENT_IDGitHub OAuth client ID
GITHUB_CLIENT_SECRETGitHub OAuth client secret

Optional

VariableDescription
API_ENCRYPTION_KEYEncrypts stored API keys (32 hex chars): openssl rand -hex 32
COPILOT_API_KEYAPI key for copilot features
ADMIN_API_KEYAdmin API key for GitOps operations
RESEND_API_KEYEmail service for notifications
ALLOWED_LOGIN_DOMAINSRestrict signups to domains (comma-separated)
ALLOWED_LOGIN_EMAILSRestrict signups to specific emails (comma-separated)
DISABLE_REGISTRATIONSet to true to disable new user signups

Example .env

DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio
BETTER_AUTH_SECRET=<openssl rand -hex 32>
BETTER_AUTH_URL=https://sim.yourdomain.com
ENCRYPTION_KEY=<openssl rand -hex 32>
INTERNAL_API_SECRET=<openssl rand -hex 32>
NEXT_PUBLIC_APP_URL=https://sim.yourdomain.com
NEXT_PUBLIC_SOCKET_URL=https://sim.yourdomain.com
OPENAI_API_KEY=sk-...

See apps/sim/.env.example for all options.

On this page

On this page

Start building today
Trusted by over 60,000 builders.
Build Agentic workflows visually on a drag-and-drop canvas or with natural language.
Get started