Skip to content

Instantly share code, notes, and snippets.

@laiso
Last active February 15, 2026 04:09
Show Gist options
  • Select an option

  • Save laiso/117c4c305bb99121e5ba42ffb88ec140 to your computer and use it in GitHub Desktop.

Select an option

Save laiso/117c4c305bb99121e5ba42ffb88ec140 to your computer and use it in GitHub Desktop.
OpenClaw[TIPS]: Connect from the openclaw-cli container to openclaw-gateway
gh repo clone openclaw/openclaw
cd openclaw
./docker-setup.sh

# ...onboarding...

docker compose run openclaw-cli status
docker compose run openclaw-cli dashboard --no-open

# ..copy token from #token=XXX...

docker compose run openclaw-cli tui --token $OPENCLAW_TOKEN

open ~/.openclaw/workspace
services:
openclaw-gateway:
image: ${OPENCLAW_IMAGE:-openclaw:local}
environment:
HOME: /home/node
TERM: xterm-256color
OPENCLAW_GATEWAY_TOKEN: ${OPENCLAW_GATEWAY_TOKEN}
CLAUDE_AI_SESSION_KEY: ${CLAUDE_AI_SESSION_KEY}
CLAUDE_WEB_SESSION_KEY: ${CLAUDE_WEB_SESSION_KEY}
CLAUDE_WEB_COOKIE: ${CLAUDE_WEB_COOKIE}
volumes:
- ${OPENCLAW_CONFIG_DIR}:/home/node/.openclaw
- ${OPENCLAW_WORKSPACE_DIR}:/home/node/.openclaw/workspace
ports:
- "${OPENCLAW_GATEWAY_PORT:-18789}:18789"
- "${OPENCLAW_BRIDGE_PORT:-18790}:18790"
init: true
restart: unless-stopped
command:
[
"node",
"dist/index.js",
"gateway",
"--bind",
"${OPENCLAW_GATEWAY_BIND:-lan}",
"--port",
"18789",
]
openclaw-cli:
image: ${OPENCLAW_IMAGE:-openclaw:local}
environment:
HOME: /home/node
TERM: xterm-256color
OPENCLAW_MODE: remote
OPENCLAW_GATEWAY_URL: ws://openclaw-gateway:18789
OPENCLAW_GATEWAY_TOKEN: ${OPENCLAW_GATEWAY_TOKEN}
BROWSER: echo
CLAUDE_AI_SESSION_KEY: ${CLAUDE_AI_SESSION_KEY}
CLAUDE_WEB_SESSION_KEY: ${CLAUDE_WEB_SESSION_KEY}
CLAUDE_WEB_COOKIE: ${CLAUDE_WEB_COOKIE}
volumes:
- ${OPENCLAW_CONFIG_DIR}:/home/node/.openclaw
- ${OPENCLAW_WORKSPACE_DIR}:/home/node/.openclaw/workspace
stdin_open: true
tty: true
init: true
entrypoint: ["node", "dist/index.js"]
{
"gateway": {
"port": 18789,
"mode": "${OPENCLAW_MODE}",
"bind": "auto",
"auth": {
"mode": "token",
"token": "${OPENCLAW_GATEWAY_TOKEN}"
},
"remote": {
"transport": "direct",
"url": "${OPENCLAW_GATEWAY_URL}",
"token": "${OPENCLAW_GATEWAY_TOKEN}"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment