🦞Moltbot Guide
← Back to Documentation

🌐 Gateway

The Gateway is the core service that keeps your assistant running 24/7.

What is the Gateway?

The Gateway is a background service that:

  • Listens to all your connected channels (Telegram, WhatsApp, etc.)
  • Routes messages to the AI agent
  • Handles scheduled tasks (heartbeats, reminders)
  • Manages tool execution and responses

Starting the Gateway

# Start in foreground
clawdbot gateway start
# Start as background daemon
clawdbot gateway start --daemon

Gateway Commands

CommandDescription
clawdbot gateway startStart the gateway
clawdbot gateway stopStop the gateway
clawdbot gateway restartRestart the gateway
clawdbot gateway statusCheck gateway status
clawdbot gateway logsView gateway logs

Running 24/7

Option 1: System Service (Recommended)

On macOS:

clawdbot service install
clawdbot service start

This creates a launchd service that starts automatically on boot.

Option 2: PM2

npm install -g pm2
pm2 start clawdbot -- gateway start
pm2 save
pm2 startup

Option 3: VPS Deployment

For always-on operation without leaving your computer running, deploy to a VPS:

  • Hostinger — Starting at $5/month
  • DigitalOcean — $6/month droplets
  • Vultr — $6/month with global locations

Heartbeats

Heartbeats are scheduled check-ins where your assistant can proactively reach out or perform tasks.

heartbeat:
  enabled: true
  schedule: "0 9 * * *"  # Every day at 9 AM
  prompt: "Check for pending tasks and reminders"

Health Monitoring

Check gateway health:

clawdbot status

This shows:

  • Gateway status (running/stopped)
  • Connected channels
  • Active sessions
  • Memory usage

Troubleshooting

If the gateway isn't starting, check:

  • Logs: clawdbot gateway logs
  • Config: clawdbot config validate
  • Port conflicts: Default port is 3737