Can Not Connect To Docker Daemon On Macos – Docker Desktop Troubleshooting Steps

When Docker on macOS shows “can not connect to docker daemon,” the Docker Engine service is likely not running or accessible. This error stops you from running containers, pulling images, or using any Docker commands. It is a common issue, but you can fix it with a few straightforward steps.

This guide walks you through every solution for the can not connect to docker daemon on macos problem. You will learn why it happens and how to resolve it quickly. No advanced skills needed—just follow the steps.

What Does “Can Not Connect To Docker Daemon On Macos” Mean?

The Docker daemon is the background service that manages containers. When you run a Docker command, your terminal talks to this daemon. If the daemon is not running or your terminal cannot reach it, you see the error. On macOS, Docker runs inside a lightweight virtual machine, so the issue often involves that VM or the Docker Desktop app.

Common causes include Docker Desktop not starting properly, the VM crashing, or permission problems. Let’s fix each one.

Check If Docker Desktop Is Running

First, confirm Docker Desktop is actually running. Look for the Docker icon in the top menu bar (the whale icon). If it is missing, Docker Desktop is not started.

  • Open Docker Desktop from your Applications folder.
  • Wait for the icon to appear in the menu bar and show “Docker Desktop is running.”
  • Try your Docker command again.

If the icon shows a red or yellow status, the daemon may be starting or crashed. Restart Docker Desktop completely.

Restart Docker Desktop

A simple restart fixes many issues. Click the Docker icon in the menu bar, select “Restart,” and wait for it to fully load. This restarts both the Docker Desktop app and the underlying daemon.

If the restart option is not available, quit Docker Desktop completely (right-click the icon and choose “Quit”) and then relaunch it.

Can Not Connect To Docker Daemon On Macos: Common Fixes

Now let’s go deeper into specific fixes. Try each one in order until the error goes away.

1. Reset Docker Desktop To Factory Defaults

Resetting clears corrupted settings or cached data. Open Docker Desktop, go to Preferences > Troubleshoot, and click “Reset to factory defaults.” Confirm the action. This will delete all containers and images, so back up anything important first.

After resetting, Docker Desktop will restart. Test with docker ps in your terminal.

2. Check Docker Socket Permissions

The Docker socket file allows your terminal to communicate with the daemon. On macOS, the socket is at /var/run/docker.sock. If permissions are wrong, you get the error.

Run this command in your terminal:

ls -l /var/run/docker.sock

You should see something like srw-rw---- and your username in the group. If not, you may need to add your user to the docker group. But on macOS, Docker Desktop usually handles this automatically. If permissions look off, reinstalling Docker Desktop often fixes it.

3. Verify Docker Daemon Is Actually Running

Sometimes Docker Desktop appears to run, but the daemon inside the VM is not responding. Use this command to check:

docker info

If you see “Cannot connect to the Docker daemon,” the daemon is not running. You can try starting it manually from the command line, but on macOS, the easiest fix is to restart Docker Desktop.

4. Clear Docker Data And Cache

Corrupted cache files can block the daemon. Quit Docker Desktop, then run these commands in your terminal:

rm -rf ~/Library/Containers/com.docker.docker
rm -rf ~/.docker

Be careful—this removes all Docker data, including images and containers. After that, relaunch Docker Desktop. It will recreate the necessary files.

5. Check For Conflicting Software

Some software on macOS interferes with Docker. Virtualization tools like VirtualBox or VMware can conflict with Docker’s hypervisor. Also, VPNs or firewall software might block the Docker socket.

Temporarily disable any VPN or firewall. If you have VirtualBox installed, try uninstalling it or disabling its kernel extensions. Then restart Docker Desktop.

Advanced Troubleshooting For “Can Not Connect To Docker Daemon On Macos”

If basic fixes do not work, try these advanced steps. They require a bit more technical knowledge but are still manageable.

Reinstall Docker Desktop Completely

A fresh install often resolves persistent issues. First, uninstall Docker Desktop completely:

  1. Quit Docker Desktop.
  2. Drag the Docker.app from Applications to Trash.
  3. Remove leftover files: rm -rf ~/Library/Containers/com.docker.docker
  4. Remove the Docker data directory: rm -rf ~/.docker
  5. Empty the Trash.

Then download the latest Docker Desktop from the official website and install it. Launch it and wait for it to initialize. This should fix most daemon connection issues.

Check System Logs For Docker Errors

System logs can reveal why the daemon fails. Open Console.app (in Applications > Utilities) and search for “docker” or “com.docker.” Look for error messages like “failed to start” or “permission denied.” These clues help you pinpoint the problem.

Alternatively, run this in terminal to see Docker logs:

tail -f ~/Library/Containers/com.docker.docker/Data/log/host.log

Watch for repeating errors. Common ones include “cannot connect to the Docker daemon” or “VM failed to start.”

Reset Docker’s Virtual Machine

Docker Desktop uses a lightweight VM on macOS. If the VM gets corrupted, resetting it can help. In Docker Desktop, go to Preferences > Troubleshoot and click “Reset Kubernetes cluster” if you use Kubernetes. Otherwise, use the “Reset to factory defaults” option mentioned earlier.

For a manual reset, quit Docker Desktop and run:

rm -rf ~/Library/Containers/com.docker.docker/Data/vms

Then relaunch Docker Desktop. It will create a fresh VM.

Update MacOS And Docker Desktop

Outdated software can cause compatibility issues. Check for macOS updates in System Settings > General > Software Update. Also, check for Docker Desktop updates by clicking the Docker icon and selecting “Check for updates.” Install any available updates and restart your Mac.

Preventing Future “Can Not Connect To Docker Daemon On Macos” Errors

Once you fix the issue, take steps to avoid it happening again. These habits keep Docker running smoothly.

Always Quit Docker Desktop Properly

Do not force quit Docker Desktop. Always use the menu bar icon to quit or restart. Force quitting can corrupt the daemon state.

Keep Docker Desktop Updated

Enable automatic updates in Docker Desktop preferences. New versions fix bugs and improve stability.

Monitor System Resources

Docker needs enough RAM and CPU. If your Mac is low on memory, the daemon may crash. Close unused apps and consider increasing Docker’s allocated resources in Preferences > Resources.

Use The Terminal To Check Daemon Status

Run docker info occasionally to verify the daemon is responding. If you see warnings, address them early.

Frequently Asked Questions

Why Does “Can Not Connect To Docker Daemon” Appear On MacOS?

This error appears when Docker Desktop is not running, the daemon inside the VM has crashed, or there is a permission problem with the Docker socket. Restarting Docker Desktop usually fixes it.

How Do I Restart The Docker Daemon On MacOS?

You cannot restart the daemon directly on macOS because it runs inside a VM. Instead, restart Docker Desktop from the menu bar icon. This restarts the entire Docker environment.

Can I Run Docker Without Docker Desktop On MacOS?

Yes, you can use command-line tools like Docker CLI with a remote daemon, but for local development, Docker Desktop is the standard. Alternatives like Colima or Podman exist but require more setup.

What If Resetting Docker Desktop Does Not Fix The Error?

If resetting fails, try reinstalling Docker Desktop completely. Also check for conflicting software like VirtualBox or VPNs. If the problem persists, consult Docker’s official forums or support.

Does MacOS Version Affect Docker Daemon Connection?

Yes, older macOS versions may not support the latest Docker Desktop. Ensure your macOS is updated to a supported version (macOS 11 Big Sur or later is recommended).

Final Thoughts On The Error

The “can not connect to docker daemon on macos” error is frustrating but fixable. Start with the simplest solution—restart Docker Desktop. If that does not work, reset to factory defaults or reinstall. Most users resolve the issue within minutes.

Remember to check for updates and avoid force quitting Docker Desktop. With these steps, you can get back to building and running containers quickly. If you still have trouble, the Docker community is helpful and active.

Do not let this error slow you down. Follow the guide, and you will be back to work in no time.