🦞OpenClaw 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
openclaw gateway start
# Start as background daemon
openclaw gateway start --daemon

Gateway Commands

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

Running 24/7

Option 1: System Service (Recommended)

On macOS:

openclaw service install
openclaw service start

This creates a launchd service that starts automatically on boot.

Option 2: PM2

npm install -g pm2
pm2 start openclaw -- 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:

openclaw status

This shows:

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

Troubleshooting

If the gateway isn't starting, check:

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