Docker follows the Open Container Initiative (OCI) spec, and behind every Docker operation sits a background process called the daemon. If you have ever seen a “cannot connect to the Docker daemon” error, the fix usually starts with one command. Here is how to start docker daemon on Linux, macOS, and Windows.

What Is the Docker Daemon?

The daemon — also called dockerd — is a persistent process on your host system. It listens for REST API requests, builds images, launches containers, and watches over them. The model is client-server: your terminal or desktop app sends API calls, and the daemon carries out the work.

If you are new to working in a terminal, the beginner’s guide to the Linux command line covers the basics before you move on to Docker-specific commands.

Docker Daemon Responsibilities

TaskWhat It Does
Container lifecycleCreates, runs, pauses, and removes containers on demand
Network and storageConnects containers to host ports, disk volumes, and OS-level resources
Image retrievalPulls images from a remote registry like DockerHub when missing locally
OS resource usageTalks to the host kernel for memory, CPU, and file-system allocation
Third-party extensibilityWorks with external plugins for extra customization

How the Client Communicates With the Docker Daemon

When you type a command such as docker run, the CLI packages it into a REST API request and sends it to the daemon over a Unix socket (/var/run/docker.sock on Linux). On Linux, systemctl controls whether this service is active. Docker Desktop on macOS and Windows wraps the client and daemon into one graphical app, so the connection happens internally.

How Docker Registries Work

A registry is a remote repository for images. DockerHub is the most popular public option, though private registries exist too. When you request an image, the daemon checks your local disk first. If nothing matches, it pulls the image from the registry. Docker reported that DockerHub had over 19 million registered users and hosts millions of container images as of 2025.

Containerd and Runc

Two lower-level runtimes do the heavy lifting beneath the daemon. Containerd is a high-level runtime that the daemon calls for container operations — starting, stopping, snapshotting. Runc sits below it and follows the OCI container runtime interface to actually spawn each process. Together, they form the engine layer that separates Docker’s user-facing tools from the kernel-level work.

How to Start Docker Daemon on Each Platform

macOS and Windows

Open Docker Desktop. The daemon launches automatically. A green indicator appears in the system tray (Windows) or menu bar (macOS) when it is ready. macOS runs Docker inside a lightweight VM using Apple’s Hypervisor framework because containers need a Linux kernel.

Linux (systemd)

Run this command with root privileges to start docker daemon:

$ sudo systemctl start docker

Confirm it is running:

$ sudo systemctl status docker

Look for “Active: active (running)” in the output. If you are unsure which distribution you are on, check your Linux version first, since some older kernels lack full container support.

To make Docker start automatically on boot:

$ sudo systemctl enable docker

Linux (Manual / Foreground)

If you prefer to start docker daemon manually for debugging, run:

$ sudo dockerd

This starts the daemon in the foreground and sends logs directly to your terminal. Press Ctrl+C to stop it. This method is mostly useful for troubleshooting configuration errors.

Older Linux Distributions (SysVinit)

On distributions that still use SysVinit instead of systemd:

$ sudo service docker start

How to Stop the Docker Daemon

On macOS and Windows, click pause or quit inside Docker Desktop. On Linux, if the process runs in your terminal, press Ctrl+C. If it runs as a systemd service:

$ sudo systemctl stop docker

You can automate start-stop sequences by writing a shell script that calls these commands in order.

Docker Daemon Configuration Options

MethodDetails
JSON config fileEdit /etc/docker/daemon.json for options that persist across restarts
Command-line flagsPass flags when starting dockerd (e.g., dockerd --debug)

The JSON config file is the recommended approach for production servers. Changes take effect after a daemon restart. You can set options like storage driver, default network, log driver, and DNS servers here.

Default Docker Data Directory

All images, containers, volumes, and service definitions live in one directory on the host.

Operating SystemDefault Path
Linux / macOS/var/lib/docker
WindowsC:\ProgramData\docker

Running low on disk space in this directory is one of the most common reasons the daemon refuses to start. Use docker system prune to reclaim space from unused images and stopped containers.

Enabling Debug Mode on the Docker Daemon

If something breaks after you start docker daemon, turn on debug output for more detailed logs. On Linux, open /etc/docker/daemon.json and add:

{
  "debug": true
}

Then restart the daemon:

$ sudo systemctl restart docker

On Windows, go to Docker Desktop, then Settings, then Docker Engine, and add the same JSON key. You can also check daemon logs with journalctl -u docker on systemd-based distributions.

Troubleshooting Common Docker Daemon Issues

“Cannot Connect to the Docker Daemon”

This error means the daemon is not running. Start it with sudo systemctl start docker on Linux, or open Docker Desktop on macOS/Windows. If it still fails, check whether another process holds the socket file.

Permission Denied Errors

By default, Docker requires root. Add your user to the docker group to run commands without sudo:

$ sudo usermod -aG docker $USER
$ newgrp docker

Log out and log back in for the group change to apply. On Arch Linux, the same group permission steps apply after installing Docker from the official repositories.

Port Conflicts

If Docker’s default port (2375) is already in use, the daemon will not start. Check for conflicts with:

$ sudo netstat -tuln | grep 2375

Kill the conflicting process or change Docker’s port in daemon.json. If you need to identify your OS version to find the right configuration path, a quick command can sort that out.

Docker Daemon on Different Linux Distributions

The systemctl start docker command works on Ubuntu, Debian, Fedora, CentOS, RHEL, and most modern distributions using systemd. Arch Linux users should follow the Docker on Arch Linux walkthrough, which covers daemon permissions and service activation specific to that distribution.

For distributions where you need to find your Linux version before choosing the right Docker package, use cat /etc/os-release or lsb_release -a.

FAQs

How do I start docker daemon on Ubuntu?

Run sudo systemctl start docker in your terminal. Verify it is running with sudo systemctl status docker. Use sudo systemctl enable docker to make it start on boot.

Why does Docker say “cannot connect to the Docker daemon”?

The daemon is not running. Start it with sudo systemctl start docker on Linux or open Docker Desktop on macOS and Windows. Check the socket file if the error persists.

Can I start docker daemon without systemctl?

Yes. Run sudo dockerd to start the daemon manually in the foreground. This sends logs to your terminal and is useful for debugging configuration problems.

How do I start docker daemon on macOS?

Open Docker Desktop from the Applications folder. The daemon starts automatically. A whale icon appears in the menu bar and stops animating once the daemon is ready.

What is the difference between Docker daemon and Docker Desktop?

The daemon (dockerd) is the background process that manages containers. Docker Desktop is a GUI application that bundles the daemon, CLI, and a Linux VM into a single installer for macOS and Windows.

Willie has over 15 years of experience in Linux system administration and DevOps. After managing infrastructure for startups and enterprises alike, he founded Command Linux to share the practical knowledge he wished he had when starting out. He oversees content strategy and contributes guides on server management, automation, and security.