Gateway & Configuration

The Gateway is the core of Jarvis, managing connections between channels and AI models.

What is the Gateway?

The Gateway is a single process that:

  • Connects all your messaging channels (WhatsApp, Telegram, Discord, etc.)
  • Routes messages to the appropriate AI model
  • Manages sessions and conversation context
  • Provides the web dashboard interface

Starting the Gateway

Start normally:

jarvis gateway

Start as daemon:

jarvis gateway --daemon

Custom port:

jarvis gateway --port 18790

Configuration

~/.jarvis/openclaw.json:

{
  "gateway": {
    "port": 18789,
    "bind": "loopback",
    "auth": {
      "mode": "token",
      "token": "your-secure-token"
    }
  },
  "agents": {
    "defaults": {
      "model": "ollama/llama3.2",
      "workspace": "~/.jarvis/workspace"
    }
  },
  "channels": {
    "whatsapp": {
      "dmPolicy": "pairing"
    }
  }
}

Use jarvis configure for interactive configuration.

Network Configuration

Bind Modes

loopback

Only accessible from localhost (default, most secure)

lan

Accessible from local network

tailnet

Accessible via Tailscale VPN

Authentication

Protect your Gateway with token or password authentication:

export JARVIS_GATEWAY_TOKEN=your-secure-token

Remote Access

Access your Gateway remotely via SSH tunneling or Tailscale for secure connections.

Environment Variables

JARVIS_CONFIG_DIR

Config directory (default: ~/.jarvis)

JARVIS_GIT_DIR

Source code location (default: ~/jarvis)

OLLAMA_HOST

Ollama server address (default: 127.0.0.1:11434)

JARVIS_GATEWAY_PORT

Gateway port (default: 18789)

Diagnostics

jarvis doctor# Run health check
jarvis status# Check gateway status
jarvis logs# View gateway logs
Jarvis

© 2026 Nilkanth Desai. MIT licensed.