Fixing 'Pairing Required' When Connecting to OpenClaw via Docker
If you’re self-hosting OpenClaw with Docker and run into the “disconnected (1008): pairing required” error when accessing it from your browser, this post will help you fix it quickly.
Problem
After setting up OpenClaw with Docker on Ubuntu, the browser shows:
disconnected (1008): pairing required
Trying to use the CLI to approve the device then fails with “gateway token mismatch” — the CLI inside the Docker container doesn’t properly resolve the authentication token from the config file.
Cause
There is an authentication token mismatch between the host and the Docker container. The CLI inside the container fails to read the right token from openclaw.json, which prevents it from listing or approving devices.
How to Fix
Step 1: Get the Gateway Token from the Host
| |
Copy the token value under gateway.auth.
Step 2: Check the Token Inside the Container
| |
Verify whether the token on the host matches the one inside the container.
Step 3: List Devices with a Token Override
Inject the token directly via the -e environment variable flag when running the command in the container:
| |
This command will display the list of devices waiting for approval along with their Request ID.
Step 4: Approve the Device
| |
Step 5: Verify the Result
Reload http://localhost:18789 in your browser — the pairing error will be gone.
Note
The key to this fix is injecting the token via an environment variable (-e OPENCLAW_GATEWAY_TOKEN=...) rather than passing it as a command-line flag, because the CLI inside Docker doesn’t handle the token flag properly.
Comments