ErrorDocker
Permission denied accessing Docker socket
Docker requires special permissions to run. If your Linux user isn't in the 'docker' group, every Docker command will fail with a permission error unless you use sudo.
Symptoms
- •
permission denied while trying to connect to the Docker daemon socket - •
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock - •
dial unix /var/run/docker.sock: connect: permission denied
Causes
- •Your user account is not in the docker group
- •Running Docker commands without sudo on a fresh install
- •Docker group changes haven't taken effect (didn't log out/in)
Solution
Add your user to the docker group
sudo usermod -aG docker $USER
Apply the change
You must log out and back in for the group change to take effect:
# If using SSH, just disconnect and reconnect
exit
Or apply it to the current session without logging out:
newgrp docker
Verify it works
docker ps
If you see a table (even if empty), permissions are correct. Now start OpenClaw:
docker compose up -d
Important
Don't get in the habit of running Docker with sudo. Adding your user to the docker group is the correct fix — it gives your account permanent access without elevation.