# ============================================================================ # Claude Code Stack - Environment Configuration # Copy this file to .env and fill in your values before deploying. # ============================================================================ # ---------------------------------------------------------------------------- # ANTHROPIC / CLAUDE AUTH (REQUIRED) # Get your API key from: https://console.anthropic.com/ # # This key is used for: # - `claude auth` bootstrap in the agents-ui container entrypoint # - Direct API calls from the claude-code-backend container # - Non-interactive execution of Claude Code CLI # ---------------------------------------------------------------------------- ANTHROPIC_API_KEY=your_api_key_here # Optional: Override the default API endpoint (leave blank for api.anthropic.com) # ANTHROPIC_BASE_URL=https://api.anthropic.com # Model selection # Available models: claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5-20251001 CLAUDE_MODEL=claude-sonnet-4-6 # ---------------------------------------------------------------------------- # WORKSPACE CONFIGURATION # ---------------------------------------------------------------------------- WORKSPACE_DIR=/workspace # Claude configuration directory inside containers CLAUDE_CONFIG_DIR=/root/.claude # ---------------------------------------------------------------------------- # APPLICATION CONFIGURATION # ---------------------------------------------------------------------------- NODE_ENV=production # Frontend API URLs (used by Nuxt UI) NUXT_PUBLIC_API_URL=http://localhost:3000/api NUXT_PUBLIC_WS_URL=ws://localhost:3000/ws # Backend API port (claude-code-backend internal API) API_PORT=5000 API_HOST=0.0.0.0 # ---------------------------------------------------------------------------- # DATABASE CONFIGURATION (PostgreSQL) # Change POSTGRES_PASSWORD before deploying to production! # ---------------------------------------------------------------------------- POSTGRES_USER=claude POSTGRES_PASSWORD=changeMe123! POSTGRES_DB=claude_agents POSTGRES_HOST=postgres POSTGRES_PORT=5432 # ---------------------------------------------------------------------------- # REDIS CONFIGURATION # ---------------------------------------------------------------------------- REDIS_HOST=redis REDIS_PORT=6379 # ---------------------------------------------------------------------------- # SECURITY CONFIGURATION # Generate a strong secret: openssl rand -base64 32 # ---------------------------------------------------------------------------- SESSION_SECRET=replace_with_random_secret_here # CORS - restrict to your domain in production CORS_ORIGIN=* # Rate limiting RATE_LIMIT_ENABLED=true RATE_LIMIT_MAX_REQUESTS=100 RATE_LIMIT_WINDOW_MS=60000 # ---------------------------------------------------------------------------- # NGINX CONFIGURATION # ---------------------------------------------------------------------------- NGINX_ENABLE=true NGINX_PROXY_PASS_UI=http://agents-ui:3000 NGINX_PROXY_PASS_API=http://claude-code-backend:5000 # SSL/TLS (optional - requires certs directory) # NGINX_SSL_ENABLE=false # NGINX_SSL_CERT_PATH=/etc/nginx/certs/cert.pem # NGINX_SSL_KEY_PATH=/etc/nginx/certs/key.pem # ---------------------------------------------------------------------------- # AGENT RUNTIME CONFIGURATION # ---------------------------------------------------------------------------- MAX_CONCURRENT_AGENTS=5 AGENT_TIMEOUT=3600 ALLOW_SHELL_EXECUTION=true ALLOWED_DIRECTORIES=/workspace,/tmp # ---------------------------------------------------------------------------- # LOGGING & DEBUG # ---------------------------------------------------------------------------- LOG_LEVEL=info DEBUG=false VERBOSE=false HOT_RELOAD=false DEBUG_MODE=false # ---------------------------------------------------------------------------- # HEALTH CHECKS # ---------------------------------------------------------------------------- HEALTH_CHECK_ENABLED=true # ---------------------------------------------------------------------------- # OPTIONAL: S3/MinIO for distributed storage # ---------------------------------------------------------------------------- # S3_ENABLED=false # S3_ENDPOINT=https://s3.amazonaws.com # S3_BUCKET=claude-agents # S3_ACCESS_KEY= # S3_SECRET_KEY= # S3_REGION=us-east-1 # ---------------------------------------------------------------------------- # OPTIONAL: Observability # ---------------------------------------------------------------------------- # SENTRY_DSN= # PROMETHEUS_ENABLED=false # PROMETHEUS_PORT=9090