{
  "title": "Set ownership to the container user (uid 1000):",
  "content": "chown -R 1000:1000 /root/.openclaw\nchown -R 1000:1000 /root/.openclaw/workspace\nbash theme={null}\nOPENCLAW_IMAGE=openclaw:latest\nOPENCLAW_GATEWAY_TOKEN=change-me-now\nOPENCLAW_GATEWAY_BIND=lan\nOPENCLAW_GATEWAY_PORT=18789\n\nOPENCLAW_CONFIG_DIR=/root/.openclaw\nOPENCLAW_WORKSPACE_DIR=/root/.openclaw/workspace\n\nGOG_KEYRING_PASSWORD=change-me-now\nXDG_CONFIG_HOME=/home/node/.openclaw\nbash theme={null}\nopenssl rand -hex 32\nyaml theme={null}\nservices:\n  openclaw-gateway:\n    image: ${OPENCLAW_IMAGE}\n    build: .\n    restart: unless-stopped\n    env_file:\n      - .env\n    environment:\n      - HOME=/home/node\n      - NODE_ENV=production\n      - TERM=xterm-256color\n      - OPENCLAW_GATEWAY_BIND=${OPENCLAW_GATEWAY_BIND}\n      - OPENCLAW_GATEWAY_PORT=${OPENCLAW_GATEWAY_PORT}\n      - OPENCLAW_GATEWAY_TOKEN=${OPENCLAW_GATEWAY_TOKEN}\n      - GOG_KEYRING_PASSWORD=${GOG_KEYRING_PASSWORD}\n      - XDG_CONFIG_HOME=${XDG_CONFIG_HOME}\n      - PATH=/home/linuxbrew/.linuxbrew/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n    volumes:\n      - ${OPENCLAW_CONFIG_DIR}:/home/node/.openclaw\n      - ${OPENCLAW_WORKSPACE_DIR}:/home/node/.openclaw/workspace\n    ports:\n      # Recommended: keep the Gateway loopback-only on the VPS; access via SSH tunnel.\n      # To expose it publicly, remove the `127.0.0.1:` prefix and firewall accordingly.\n      - \"127.0.0.1:${OPENCLAW_GATEWAY_PORT}:18789\"\n\n# Optional: only if you run iOS/Android nodes against this VPS and need Canvas host.\n      # If you expose this publicly, read /gateway/security and firewall accordingly.\n      # - \"18793:18793\"\n    command:\n      [\n        \"node\",\n        \"dist/index.js\",\n        \"gateway\",\n        \"--bind\",\n        \"${OPENCLAW_GATEWAY_BIND}\",\n        \"--port\",\n        \"${OPENCLAW_GATEWAY_PORT}\",\n      ]\ndockerfile theme={null}\nFROM node:22-bookworm\n\nRUN apt-get update && apt-get install -y socat && rm -rf /var/lib/apt/lists/*",
  "code_samples": [
    {
      "code": "***\n\n## 5) Configure environment variables\n\nCreate `.env` in the repository root.",
      "language": "unknown"
    },
    {
      "code": "Generate strong secrets:",
      "language": "unknown"
    },
    {
      "code": "**Do not commit this file.**\n\n***\n\n## 6) Docker Compose configuration\n\nCreate or update `docker-compose.yml`.",
      "language": "unknown"
    },
    {
      "code": "***\n\n## 7) Bake required binaries into the image (critical)\n\nInstalling binaries inside a running container is a trap.\nAnything installed at runtime will be lost on restart.\n\nAll external binaries required by skills must be installed at image build time.\n\nThe examples below show three common binaries only:\n\n* `gog` for Gmail access\n* `goplaces` for Google Places\n* `wacli` for WhatsApp\n\nThese are examples, not a complete list.\nYou may install as many binaries as needed using the same pattern.\n\nIf you add new skills later that depend on additional binaries, you must:\n\n1. Update the Dockerfile\n2. Rebuild the image\n3. Restart the containers\n\n**Example Dockerfile**",
      "language": "unknown"
    }
  ],
  "headings": [
    {
      "level": "h2",
      "text": "5) Configure environment variables",
      "id": "5)-configure-environment-variables"
    },
    {
      "level": "h2",
      "text": "6) Docker Compose configuration",
      "id": "6)-docker-compose-configuration"
    },
    {
      "level": "h2",
      "text": "7) Bake required binaries into the image (critical)",
      "id": "7)-bake-required-binaries-into-the-image-(critical)"
    }
  ],
  "url": "llms-txt#set-ownership-to-the-container-user-(uid-1000):",
  "links": []
}