Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
The docker CLI can’t talk to the Docker engine — it isn’t running, or your user can’t access the socket.
Cannot connect to the Docker daemonIs the docker daemon runningpermission denied while trying to connect to the Docker daemon socket Meaning
The docker command is just a client; the daemon does the work. On Linux the socket is root-owned unless you’re in the docker group. On macOS/Windows, Docker Desktop must be running.
Common causes
- Docker daemon/Desktop not started
- User not in
dockergroup (permission denied on docker.sock) - DOCKER_HOST / context pointing elsewhere
- Rootless Docker uses a different socket path
⚡ Quick fix
- Start Docker:
sudo systemctl start dockeror open Docker Desktop - Add yourself to the group:
sudo usermod -aG docker $USERthen log out/in - Check
docker context lsandecho $DOCKER_HOST
Detailed fix by platform
Linux
- Enable and verify:bash
sudo systemctl enable --now docker sudo usermod -aG docker $USER && newgrp docker docker info
How to diagnose
- Daemon — Is it running?
- Permission — “permission denied” on docker.sock?
- Context — Which context/host is the CLI using?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in Docker
- docker-credential-desktop error getting credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH
- pull access denied pull access denied for image, repository does not exist or may require 'docker login'
- lookup registry-1.docker.io: no such host dial tcp: lookup registry-1.docker.io: no such host / Temporary failure in name resolution during docker build
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 15 Oct 2026