Skip to main content

Environments

Environment Overview

EnvironmentURLPurpose
Developmentlocalhost:18789Local development
ProductionDocker containerLive system

Configuration Differences

ConfigDevelopmentProduction
Gateway port1878918789 (behind proxy)
TLSNone (HTTP)Reverse proxy
LoggingVerboseStructured JSON
State dirLocalDocker volume

Environment Variables

Required in All Environments

  • CROCBOT_STATE_DIR: Runtime state directory
  • CROCBOT_CONFIG_PATH: Main config file path
  • CROCBOT_WORKSPACE: Agent working directory

API Keys (at least one required)

  • ANTHROPIC_API_KEY: Claude API access
  • OPENAI_API_KEY: OpenAI API access

Telegram

  • TELEGRAM_BOT_TOKEN: Bot token from @BotFather

Development-Only

  • NODE_ENV=development: Enable development features
  • DEBUG=*: Enable debug logging

MCP (optional)

  • MCP_SERVER_TOKEN: Authentication token for MCP server mode (if mcp.server.enabled)

Production-Only

  • NODE_ENV=production: Production mode
  • COOLIFY_WEBHOOK_URL: Deployment trigger (GitHub Actions repo variable)
  • Alerting webhook URLs (optional)

Local Development

# Copy example env
cp .env.example .env

# Edit with your values
# Minimum: one API key + Telegram token

# Start gateway
pnpm gateway:watch

Docker/Production

# Environment variables passed to container
docker run -d \
  -e ANTHROPIC_API_KEY=... \
  -e TELEGRAM_BOT_TOKEN=... \
  -e CROCBOT_STATE_DIR=/app/state \
  -v crocbot-state:/app/state \
  crocbot:latest
See Docker installation and Docker environment variables for complete configuration.