Environment Variables

Complete reference of all environment variables for self-hosted YokeBot.

Overview

YokeBot is configured primarily through environment variables. For local development, create a .env file in packages/engine/ (copy from packages/engine/.env.example). For Docker deployments, create a .env file in the repository root (copy from .env.example).

Database

VariableRequiredDefaultDescription
DATABASE_URLNosqlite:./data/yokebot.dbDatabase connection string. Set to a Postgres URL for production.

Authentication (Supabase)

Supabase is optional for local single-user development. Without these variables, the engine uses a built-in dev user automatically.

VariableRequiredDefaultDescription
SUPABASE_JWT_SECRETNo*JWT secret for token verification. *Required for multi-user auth.
SUPABASE_URLNo*Your Supabase project URL. *Required for multi-user auth.
SUPABASE_ANON_KEYNo*Supabase anonymous (public) key.
SUPABASE_SERVICE_ROLE_KEYNoSupabase service role key. Only needed for admin user management.

LLM Providers

At least one LLM provider API key is required for agents to function.

VariableRequiredDefaultDescription
DEEPINFRA_API_KEYYes*DeepInfra API key. Primary LLM provider for most agent templates.
OPENROUTER_API_KEYNoOpenRouter API key. Secondary provider, covers GPT-4o-mini, Grok, etc.
YOKEBOT_FALLBACK_ENDPOINTNoCustom OpenAI-compatible endpoint URL for fallback routing.
YOKEBOT_FALLBACK_MODELNodeepseek-chatModel name for the fallback endpoint.
YOKEBOT_FALLBACK_API_KEYNoAPI key for the fallback endpoint.

Media Generation

VariableRequiredDefaultDescription
FAL_API_KEYNofal.ai API key. Required for image, video, 3D, music, and SFX generation.

Web Search

VariableRequiredDefaultDescription
TAVILY_API_KEYNoAPI key for Tavily web search.
BRAVE_API_KEYNoAPI key for Brave web search.

Server

VariableRequiredDefaultDescription
PORTNo3001Port the engine API listens on.
PUBLIC_URLNohttp://localhost:3001The public-facing URL. Used for OAuth callbacks and webhook URLs.
NODE_ENVNodevelopmentSet to "production" for production deployments.
LOG_LEVELNoinfoLogging level: debug, info, warn, error.

Security

VariableRequiredDefaultDescription
YOKEBOT_ENCRYPTION_KEYRecommended32-byte hex key for encrypting stored credentials. Without this, credentials are stored in plaintext. Generate with: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
CORS_ALLOWED_ORIGINSNohttp://localhost:5173Comma-separated origins allowed to call the API.

MCP

VariableRequiredDefaultDescription
MCP_SERVERSNo[]JSON array of MCP server configurations. See the MCP Integration docs.

Email (Resend)

VariableRequiredDefaultDescription
RESEND_API_KEYNoResend API key for sending email notifications and onboarding drip emails.
lightbulb
Start with the minimum required variables (one LLM provider key) and add others as you enable more features. Supabase is only needed for multi-user auth.