services: openclaw-gateway: image: ${OPENCLAW_IMAGE} container_name: openclaw-gateway user: "0:0" env_file: - .env environment: HOME: /home/node OPENCLAW_HOME: /home/node TERM: xterm-256color OPENCLAW_STATE_DIR: /home/node/.openclaw OPENCLAW_CONFIG_PATH: /home/node/.openclaw/openclaw.json OPENCLAW_CONFIG_DIR: /home/node/.openclaw OPENCLAW_WORKSPACE_DIR: /home/node/.openclaw/workspace OPENCLAW_GATEWAY_TOKEN: ${OPENCLAW_GATEWAY_TOKEN} TZ: ${OPENCLAW_TZ:-Asia/Shanghai} volumes: - /volume2/docker/docker_projects/openclaw/data:/home/node/.openclaw ports: - "${OPENCLAW_GATEWAY_PORT:-2800}:18789" - "${OPENCLAW_BRIDGE_PORT:-18790}:18790" extra_hosts: - "host.docker.internal:host-gateway" init: true restart: unless-stopped command: [ "node", "dist/index.js", "gateway", "--bind", "${OPENCLAW_GATEWAY_BIND:-lan}", "--port", "18789" ] healthcheck: test: ["CMD", "node", "dist/docker-healthcheck.js"] interval: 30s timeout: 5s retries: 5 start_period: 20s openclaw-cli: image: ${OPENCLAW_IMAGE} container_name: openclaw-cli user: "0:0" env_file: - .env network_mode: "service:openclaw-gateway" environment: HOME: /home/node OPENCLAW_HOME: /home/node TERM: xterm-256color OPENCLAW_STATE_DIR: /home/node/.openclaw OPENCLAW_CONFIG_PATH: /home/node/.openclaw/openclaw.json OPENCLAW_CONFIG_DIR: /home/node/.openclaw OPENCLAW_WORKSPACE_DIR: /home/node/.openclaw/workspace OPENCLAW_GATEWAY_TOKEN: ${OPENCLAW_GATEWAY_TOKEN} TZ: ${OPENCLAW_TZ:-Asia/Shanghai} volumes: - /volume2/docker/docker_projects/openclaw/data:/home/node/.openclaw stdin_open: true tty: true init: true entrypoint: - node - dist/index.js depends_on: - openclaw-gateway