I had this issue when i first spun it up as well. To get the openclaw commands to register, you need to add the npm link command to the post args in a very specific place... <PostArgs> sh -c "mkdir -p /root/.openclaw /home/linuxbrew /var/run/tailscale; [ -s /root/.openclaw/openclaw.json ] || echo '{\"gateway\":{\"mode\":\"local\",\"bind\":\"loopback\",\"controlUi\":{\"allowInsecureAuth\":true},\"auth\":{\"allowTailscale\":true},\"tailscale\":{\"mode\":\"serve\"}}}' > /root/.openclaw/openclaw.json; curl -fsSL https://pkgs.tailscale.com/stable/tailscale_latest_amd64.tgz | tar -xzf - -C /tmp && cp /tmp/tailscale_*_amd64/tailscale* /usr/local/bin/; tailscaled --tun=userspace-networking --state=/var/lib/tailscale/tailscaled.state --socket=/var/run/tailscale/tailscaled.sock & sleep 5; tailscale up --authkey=${TAILSCALE_AUTHKEY} --hostname=openclaw --accept-routes=false; cd /app & npm link & exec node dist/index.js gateway --bind loopback " Explanation from Perplexity... What npm link Does in This Context In this Docker entrypoint script, npm link is being used to create a global symlink for the Node.js package located in /app. This makes the package and any CLI tools defined in its package.json available globally within the container. How it works When npm link is executed in a directory containing a package.json, it: Creates a symbolic link in the global node_modules folder pointing to /app Links any bin executables defined in the package to the global npm binary directory (e.g., {prefix}/bin/{name}) Why it's used here In the OpenClaw container startup: cd /app & npm link & exec node dist/index.js gateway --bind loopback The npm link serves to globally expose the OpenClaw CLI tools. This enables: Running openclaw commands from anywhere in the container without specifying the full path Access to the package's binaries as system commands Development-style convenience where the package behaves like a globally installed npm package The Full SequenceStep Command Purpose 1 cd /app Navigate to application directory 2 npm link Create global symlink for the package and its CLI binaries 3 exec node dist/index.js Start the gateway service The & operators run these commands in parallel, allowing the main application to start while npm link completes its filesystem operations in the background.