Deep troubleshooting
Deep troubleshooting — Symptom-first diagnostics with exact command ladders and log signatures.
Use this page for day-1 startup and day-2 operations of the Gateway service.
Deep troubleshooting
Deep troubleshooting — Symptom-first diagnostics with exact command ladders and log signatures.
Configuration
Configuration — Task-oriented setup guide + full configuration reference.
Start the Gateway
remoteclaw gateway --port 18789# debug/trace mirrored to stdioremoteclaw gateway --port 18789 --verbose# force-kill listener on selected port, then startremoteclaw gateway --forceVerify service health
remoteclaw gateway statusremoteclaw statusremoteclaw logs --followHealthy baseline: Runtime: running and RPC probe: ok.
Validate channel readiness
remoteclaw channels status --probeGateway config reload watches the active config file path (resolved from profile/state defaults, or REMOTECLAW_CONFIG_PATH when set).
Default mode is gateway.reload.mode="hybrid".
loopback.gateway.auth.token / gateway.auth.password, or REMOTECLAW_GATEWAY_TOKEN / REMOTECLAW_GATEWAY_PASSWORD).| Setting | Resolution order |
|---|---|
| Gateway port | --port → REMOTECLAW_GATEWAY_PORT → gateway.port → 18789 |
| Bind mode | CLI/override → gateway.bind → loopback |
gateway.reload.mode | Behavior |
|---|---|
off | No config reload |
hot | Apply only hot-safe changes |
restart | Restart on reload-required changes |
hybrid (default) | Hot-apply when safe, restart when required |
remoteclaw gateway statusremoteclaw gateway status --deepremoteclaw gateway status --jsonremoteclaw gateway installremoteclaw gateway restartremoteclaw gateway stopremoteclaw logs --followremoteclaw doctorPreferred: Tailscale/VPN. Fallback: SSH tunnel.
ssh -N -L 18789:127.0.0.1:18789 user@hostThen connect clients to ws://127.0.0.1:18789 locally.
If gateway auth is configured, clients still must send auth (token/password) even over SSH tunnels.
See: Remote Gateway, Authentication, Tailscale.
Use supervised runs for production-like reliability.
remoteclaw gateway installremoteclaw gateway statusremoteclaw gateway restartremoteclaw gateway stopLaunchAgent labels are ai.remoteclaw.gateway (default) or ai.remoteclaw.<profile> (named profile). remoteclaw doctor audits and repairs service config drift.
remoteclaw gateway installsystemctl --user enable --now remoteclaw-gateway[-<profile>].serviceremoteclaw gateway statusFor persistence after logout, enable lingering:
sudo loginctl enable-linger <user>Use a system unit for multi-user/always-on hosts.
sudo systemctl daemon-reloadsudo systemctl enable --now remoteclaw-gateway[-<profile>].serviceMost setups should run one Gateway. Use multiple only for strict isolation/redundancy (for example a rescue profile).
Checklist per instance:
gateway.portREMOTECLAW_CONFIG_PATHREMOTECLAW_STATE_DIRagents.defaults.workspaceExample:
REMOTECLAW_CONFIG_PATH=~/.remoteclaw/a.json REMOTECLAW_STATE_DIR=~/.remoteclaw-a remoteclaw gateway --port 19001REMOTECLAW_CONFIG_PATH=~/.remoteclaw/b.json REMOTECLAW_STATE_DIR=~/.remoteclaw-b remoteclaw gateway --port 19002See: Multiple gateways.
remoteclaw --dev setupremoteclaw --dev gateway --allow-unconfiguredremoteclaw --dev statusDefaults include isolated state/config and base gateway port 19001.
connect.hello-ok snapshot (presence, health, stateVersion, uptimeMs, limits/policy).req(method, params) → res(ok/payload|error).connect.challenge, agent, chat, presence, tick, health, heartbeat, shutdown.Agent runs are two-stage:
status:"accepted")status:"ok"|"error"), with streamed agent events in between.See full protocol docs: Gateway Protocol.
connect.hello-ok response with snapshot.remoteclaw gateway statusremoteclaw channels status --proberemoteclaw healthEvents are not replayed. On sequence gaps, refresh state (health, system-presence) before continuing.
| Signature | Likely issue |
|---|---|
refusing to bind gateway ... without auth | Non-loopback bind without token/password |
another gateway instance is already listening / EADDRINUSE | Port conflict |
Gateway start blocked: set gateway.mode=local | Config set to remote mode |
unauthorized during connect | Auth mismatch between client and gateway |
For full diagnosis ladders, use Gateway Troubleshooting.
shutdown event before socket close.Related: