Environment Variables
Complete reference for all environment variables.
Core
# Server PORT=4200 # HTTP port (default: 4200) DATA_DIR=/data # SQLite database directory STOCKYARD_ADMIN_KEY=your-key # Admin API key (required for management APIs) # Auth STOCKYARD_REQUIRE_AUTH=true # Require API keys for /v1/* requests # Logging LOG_LEVEL=info # debug, info, warn, error LOG_FORMAT=text # text or json
Provider keys
OPENAI_API_KEY=sk-... ANTHROPIC_API_KEY=sk-ant-... GOOGLE_API_KEY=... GROQ_API_KEY=gsk_... DEEPSEEK_API_KEY=... MISTRAL_API_KEY=... COHERE_API_KEY=... XAI_API_KEY=... # Azure OpenAI AZURE_OPENAI_API_KEY=... AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com AZURE_OPENAI_API_VERSION=2024-02-15-preview # Ollama (local) OLLAMA_BASE_URL=http://localhost:11434
Stockyard auto-detects providers from environment variables. Set a key and the provider is available immediately.
Licensing
STOCKYARD_LICENSE_KEY=... # License key for paid tiers
OpenTelemetry
STOCKYARD_OTEL_ENDPOINT=... # OTLP endpoint for trace export OTEL_EXPORTER_OTLP_ENDPOINT=... # Standard OTEL env var (also works)
Railway / PaaS
RAILWAY_VOLUME_MOUNT_PATH=/data # Auto-detected on Railway
On Railway, Stockyard auto-detects the volume mount path. Set DATA_DIR only if you need to override the default.