Skip to main content
The nullclaw gateway command starts the long-running runtime that includes:
  • HTTP gateway for webhook endpoints
  • All configured channels
  • Heartbeat scheduler
  • Cron job execution
  • Pairing server for authentication

Usage

Options

number
default:"3000"
HTTP port to bind to

What Gets Started

When you run nullclaw gateway, the following components start:

1. HTTP Gateway

Binds to 127.0.0.1:3000 (or custom port) and exposes:
  • /health - Health check endpoint
  • /pair - Pairing code exchange for authentication
  • /webhook - Generic webhook for authenticated messages
  • /whatsapp - WhatsApp webhook
  • /telegram - Telegram webhook (if configured)

2. Configured Channels

All channels with accounts in config.json are started:
  • Telegram bots (long-polling)
  • Discord bots (WebSocket gateway)
  • Signal listeners
  • Nostr relays
  • IRC connections
  • And more…

3. Background Services

  • Heartbeat: Periodic health checks
  • Cron scheduler: Executes scheduled tasks
  • Channel managers: Route messages to agent

Configuration

Gateway configuration in ~/.nullclaw/config.json:
By default, the gateway binds to 127.0.0.1 (localhost only) for security. To expose publicly, you must:
  1. Set allow_public_bind: true in config
  2. Configure a tunnel (Cloudflare, ngrok, Tailscale)

Pairing

On first startup, the gateway generates a 6-digit pairing code:
Exchange the pairing code for a bearer token:
Use this token for all subsequent API calls:

Webhook Endpoints

POST /webhook

Send messages to the agent:

GET /health

Health check (no authentication required):

Tunnels

For webhook-based channels (WhatsApp, Telegram webhooks), you need a public URL. Configure a tunnel:
See Tunnels for full configuration.

Examples

Start Gateway with Telegram

Start Gateway as Background Service

Logs

Gateway logs are written to:
  • macOS/Linux: ~/.nullclaw/logs/gateway.log
  • systemd: journalctl -u nullclaw -f

See Also

  • Agent - Interactive agent mode
  • Service - Background service management
  • Channels - Channel configuration
  • Tunnels - Tunnel configuration