Device Identity Required + Pairing Required
There are two related but distinct 1008 errors involving device identity and pairing. They have different root causes and different fixes. Read your exact error message to identify which one you have.
Next Step
Fix now, then reduce repeat incidents
If this issue keeps coming back, validate your setup in Doctor first, then harden your config.
1-Minute Execution Version
Match your error message, run the command.
If you see: "device identity required" or "control ui requires device identity"
# 1) Open the Dashboard from localhost/HTTPS secure context # 2) If you also see pairing errors, approve pending requests: openclaw devices list openclaw devices approve <request-id>
If you see: "pairing required" or "disconnected (1008): unauthorized: pairing required"
# For Docker / LAN device โ approve pending request openclaw devices list openclaw devices approve <request-id>
Which Error Do You Have?
Cause: Browser/client cannot present a valid device identity (commonly non-secure context).
When: Accessing Control UI via plain HTTP on non-localhost address.
Fix: Use localhost or HTTPS, then reconnect.
Cause: A secondary device (Docker container, LAN client, sub-agent) is trying to connect but has not been paired.
When: Docker redeploy, new LAN device, sub-agent first run.
Fix: Generate a pairing token for the device and complete the pairing flow.
Fix A: Device Identity Required
This error appears when the client cannot establish device identity, most often because the dashboard is opened in a non-secure context.
Method 1: Secure Context (Recommended)
- 1
Open dashboard on localhost: http://localhost:18789
- 2
If remote access is needed, use HTTPS (reverse proxy / tunnel)
- 3
Avoid plain LAN HTTP like http://192.168.x.x:18789
- 4
Reconnect the client after switching URL
Method 2: Approve Pairing Requests (if present)
# List pending devices openclaw devices list # Approve a specific device openclaw devices approve <request-id> # Approve all pending devices (use with care) openclaw devices approve --all
Security Note
Only approve devices you recognize. In shared environments, review each pending request ID before approving.
Fix B: Pairing Required
This is a secondary device pairing error. The connecting device โ usually a Docker container, a second machine on the LAN, or a sub-agent โ has not been granted access.
Standard Pairing Flow
# On the Gateway host openclaw devices list openclaw devices approve <request-id>
Docker-Specific Pairing
Docker containers get a new device ID on every redeploy. If you see pairing required after a docker compose up, the container is a new device.
# Option 1: Use a persistent device ID via env variable # docker-compose.yml environment: - OPENCLAW_DEVICE_ID=my-docker-agent-prod # Option 2: Mount device identity file volumes: - ./openclaw-device:/app/.openclaw/device # Option 3: Auto-approve all in trusted environments (dev only) openclaw devices approve --all
Option 3 (approve --all) approves any device that attempts to connect. Only use this in a trusted local development environment. Never in production or on a network-accessible Gateway.
Sub-Agent Pairing (1008)
Sub-agents spawned by OpenClaw tasks also need to authenticate with the Gateway. If a sub-agent triggers pairing required, it's because it inherited a session that isn't registered.
# In your OpenClaw config, allow sub-agents to inherit the parent session
{
"gateway": {
"session": {
"inheritParentDevice": true
}
}
}For a full sub-agent pairing walkthrough, see the Sub-Agent Pairing (1008) guide.
Decision Flowchart
Error says "device identity required"?
Switch to localhost/HTTPS secure context and reconnect
Error says "pairing required"?
Run openclaw devices list + openclaw devices approve <request-id>
Connecting from Docker?
Use persistent OPENCLAW_DEVICE_ID env variable to avoid re-pairing on redeploy
Sub-agent triggering the error?
Enable inheritParentDevice in gateway.session config
None of the above?
Run openclaw doctor --fix for automatic diagnosis
Related Fixes
Other 1008 errors you may encounter:
Fix It Faster
Config Wizard
Generate a production-ready clawhub.json in 30 seconds.
Local Doctor
Diagnose Node.js, permissions, and config issues instantly.
Cost Simulator
Calculate your agent burn rate before you get surprised.
Gateway Monitor
Detect token spikes and gateway incidents before users complain.
Skill Finder
Describe your use case and find the right Claude Code skill instantly.
Did this guide solve your problem?