Docker: Cannot Connect to the Daemon — Is It Running?
Docker greets you with 'Cannot connect to the Docker daemon. Is the docker daemon running?' Usually it isn't. This is about the engine being stopped — not permissions. Here's how to start it.
You run a Docker command and get:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock.
Is the docker daemon running?
The Docker CLI you type is just a client — it talks to a background engine (the daemon) that does the real work. This error means the client couldn't reach that engine. Nine times out of ten the answer to its own question is "no, it isn't running." (Note: this is different from permission denied on the same socket — that one means the daemon is up but your user can't reach it.)
Cause 1: The daemon is stopped (Linux)
The engine simply isn't started. Check and start it:
systemctl status docker # is it active?
sudo systemctl start docker # start it now
sudo systemctl enable docker # and on every boot
Then retry your command — it should connect.
Cause 2: Docker Desktop isn't open (Mac / Windows)
There's no systemctl here. The daemon runs inside Docker Desktop, so if the app isn't open, there's no engine. Launch Docker Desktop and wait for the whale icon to go steady (not animating) before running commands.
Cause 3: The daemon crashed on startup
If systemctl start fails, the engine tried to start and died. Read why:
journalctl -u docker -e # jump to the newest log lines
A bad config in /etc/docker/daemon.json (often a JSON typo) is a common culprit — the log will name it.
"Is the daemon running?" is a literal question, not a figure of speech. Answer it first with
systemctl status dockerbefore assuming anything more complicated.
The checklist
- This is the engine being down — not a permissions problem.
- Linux:
sudo systemctl start docker(andenableit). - Mac/Windows: open Docker Desktop, wait for the icon to settle.
- Won't start?
journalctl -u docker -e— usually adaemon.jsontypo.
Stop reading, start building
This pairs with a hands-on BytExplorer course — do it on your own machine and actually keep the skill.