#Help connecting mac to remote gateway

1 messages Β· Page 1 of 1 (latest)

main hollyBOT
#

This is a common configuration issue! The error happens because your Mac's Clawdbot is still trying to connect to its local gateway (127.0.0.1:18789) instead of the remote Linux server's gateway.

When you set up SSH on the Mac, that just handles the SSH tunnel β€” but Clawdbot itself still needs to know where to connect.

Fix: On your Mac, configure the remote gateway URL:

clawdbot gateway set url --gatewayUrl "ws://YOUR_LINUX_SERVER_IP:18789"

Or edit ~/.clawdbot/clawdbot.json:

{
  "gateway": {
    "url": "ws://YOUR_LINUX_SERVER_IP:18789"
  }
#
}

Replace YOUR_LINUX_SERVER_IP with your Linux server's actual IP address or hostname.

Also make sure:

  1. The Linux server's gateway is running and accessible
  2. Port 18789 is open on the Linux firewall
  3. You've authenticated properly (check gatewayToken if required)

https://docs.clawd.bot/nodes/remote-nodes has more details on remote node setup.

Let me know if that resolves it! 🦐

inland crane
#

the gateway on server is running at 127.0.0.1:18789, do I need it running on 0.0.0.0 ?

main hollyBOT
# inland crane the gateway on server is running at 127.0.0.1:18789, do I need it running on 0.0...

No β€” with an SSH tunnel, binding to 127.0.0.1 is actually correct! The tunnel handles the connection:

Mac localhost:18789  β†’  SSH forward  β†’  Linux localhost:18789

The error is unauthorized, not connection refused β€” so the connection is working, but authentication is failing.

Check these on both machines:

  1. Gateway token must match in both configs:

    clawdbot gateway token
    
  2. On Mac (~/.clawdbot/clawdbot.json):

#
   {
     "gateway": {
       "url": "ws://127.0.0.1:18789",
       "token": "SAME_TOKEN_AS_SERVER"
     }
   }

If you want to skip SSH and connect directly over the network (less secure), then yes β€” change the Linux server's gateway to bind to 0.0.0.0 and open port 18789 in the firewall. But with SSH tunnel, keep it at 127.0.0.1 and fix the token.

https://docs.clawd.bot/gateway/configuration has more on gateway security.

inland crane
#

$ clawdbot gateway token
error: too many arguments for 'gateway'. Expected 0 arguments but got 1.

$ clawdbot -V
2026.1.11-4

main hollyBOT
# inland crane $ clawdbot gateway token error: too many arguments for 'gateway'. Expected 0 arg...

The gateway token command was added in a newer version. For your version (2026.1.11-4), check the config files directly:

On the Linux server:

clawdbot gateway config

or

cat ~/.clawdbot/clawdbot.json | grep -A2 gateway

On your Mac, make sure ~/.clawdbot/clawdbot.json has the exact same gateway URL and token as the server's config.

If tokens don't match, copy the server's token to your Mac's config and restart Clawdbot on the Mac.

inland crane
#

ah how do I go about fresh install on mac?

main hollyBOT
# inland crane ah how do I go about fresh install on mac?

Option 1: Homebrew (recommended)

# Install Homebrew first if you don't have it
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install Clawdbot
brew install clawdbot/tap/clawdbot

Option 2: pnpm/npm

# Install pnpm first
curl -fsSL https://get.pnpm.dev/install.sh | sh -

# Install Clawdbot
pnpm add -g clawdbot