AI Diagnostic Summary

docker: Cannot connect to Docker daemon

Well-Documented Error

This error matches known, documented patterns with reliable solutions.

Quick Fix (Most Common Solution)

Seeing "docker: Cannot connect to Docker daemon"? This error can be frustrating, but it's usually fixable. It typically affects your development workflow or system. Below you'll find clear, step-by-step solutions to resolve this issue.

High confidence
What This Error Means

The Docker background service is not running or accessible.

Frequently documented in developer and vendor support forums.

Based on documented solutions and common real-world fixes.
Not affiliated with browser, OS, or device manufacturers.

New here? Learn why exact error messages matter →

Common Causes
  • Docker service not started
  • User not in docker group
  • Docker Desktop not running
How to Fix
  1. Start Docker service or Docker Desktop
  2. Add user to docker group
  3. Check Docker socket permissions

Last reviewed: March 2026 How we review solutions

Version note: On Linux, Docker Engine 24+ requires cgroup v2 by default. Older kernels (RHEL 7, CentOS 7) may need cgroup v1 compatibility mode.

Environment-Specific Commands

Linux (systemd)

  1. sudo systemctl start docker
  2. sudo systemctl enable docker # auto-start on boot
  3. sudo usermod -aG docker $USER && newgrp docker

macOS

  1. Open Docker Desktop from Applications
  2. Or: open -a Docker
  3. Wait for the whale icon in the menu bar to stop animating

Windows

  1. Start Docker Desktop from Start Menu
  2. If WSL2 backend: ensure WSL is updated (wsl --update)
  3. Restart WSL if needed: wsl --shutdown then reopen terminal
Quick Diagnostic Path
  • If sudo docker works but docker without sudo does not Your user is not in the docker group. Run: sudo usermod -aG docker $USER and log out/in.
  • If systemctl status docker shows "failed" Check logs: journalctl -u docker.service -n 50 for the root cause.
  • If Docker Desktop is running but CLI still fails Check the Docker context: docker context ls — ensure "desktop-linux" is selected.
If This Still Fails, Check
  • Rootless Docker installations use a different socket path (~/.docker/run/docker.sock) — set DOCKER_HOST accordingly
  • Snap-installed Docker on Ubuntu has a different service name: snap.docker.dockerd
  • Corporate VPN or firewall software may block the Docker socket — try disconnecting VPN to test
Full diagnostic sequence for Docker daemon issues
# Check daemon status
sudo systemctl status docker

# If inactive, start it
sudo systemctl start docker

# Verify socket exists
ls -la /var/run/docker.sock
# srw-rw---- 1 root docker 0 ... /var/run/docker.sock

# Test connection
docker info

Optional follow-up

Some users ask whether saving fixes for recurring errors would be useful when the same issue appears again.

Was this explanation helpful?

Explanations are based on documented fixes, real-world reports, and common system behavior. GetErrorHelp is independent and not affiliated with software vendors, device manufacturers, or service providers.
Frequently Asked Questions

How do I start Docker?

Run sudo systemctl start docker or start Docker Desktop.

How do I add user to docker group?

Run sudo usermod -aG docker $USER then log out and back in.

Related Resources

Also Known As

Common Search Variations

Related Errors
Still Stuck?

Paste a different error message or upload a screenshot to get help instantly.

Solutions are based on commonly documented fixes and may not apply in all situations.