Gateway Configuration
Overview
Section titled “Overview”The Gateway is Clawdbot’s central routing system that manages message flow between channels and Claude.
Basic Configuration
Section titled “Basic Configuration”# Gateway settingsGATEWAY_ENABLED=trueGATEWAY_PORT=8080GATEWAY_HOST=0.0.0.0
# WebhooksWEBHOOK_SECRET=your_secret_keyWEBHOOK_PATH=/webhook
# Rate limitingRATE_LIMIT_ENABLED=trueRATE_LIMIT_REQUESTS=60RATE_LIMIT_WINDOW=60Webhook Configuration
Section titled “Webhook Configuration”For channels that use webhooks (Telegram, Slack):
gateway: webhooks: telegram: path: /webhook/telegram secret: ${TELEGRAM_WEBHOOK_SECRET} slack: path: /webhook/slack signing_secret: ${SLACK_SIGNING_SECRET}SSL/TLS Setup
Section titled “SSL/TLS Setup”For production webhooks, use HTTPS:
# Using reverse proxy (recommended)# Configure nginx/Caddy to terminate SSL
# Or direct SSLGATEWAY_SSL_CERT=/path/to/cert.pemGATEWAY_SSL_KEY=/path/to/key.pemMiddleware
Section titled “Middleware”Add middleware for processing:
@gateway.middlewareasync def logging_middleware(request, next): logger.info(f"Request: {request.path}") response = await next(request) return response