This error occurs on Windows when Docker Desktop is not running or cannot start. The Docker CLI cannot communicate with the Docker daemon through the named pipe.
When you run Docker commands on Windows, the Docker CLI needs to communicate with the Docker daemon (dockerd). On Windows, this communication happens through a named pipe at `//./pipe/docker_engine` rather than a Unix socket. This error appears when: - Docker Desktop is not running - Docker Desktop failed to start properly - The Windows Containers or Hyper-V/WSL2 backend is misconfigured - There's a conflict with other virtualization software The full error message typically includes: "In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running."
The most common fix is simply starting Docker Desktop:
1. Click the Windows Start menu
2. Search for "Docker Desktop"
3. Click to launch the application
4. Wait for the whale icon in the system tray to stop animating (becomes solid)
Alternatively, you can start Docker Desktop from PowerShell:
Start-Process "C:\Program Files\Docker\Docker\Docker Desktop.exe"After Docker Desktop starts, verify the daemon is accessible:
docker versionYou should see both Client and Server information. If you only see Client info, the daemon is still not running.
Also check:
docker infoThis provides detailed information about the Docker environment.
If Docker Desktop appears running but commands still fail, restart the service:
Using Windows Services:
1. Press Win+R, type services.msc, press Enter
2. Find "Docker Desktop Service"
3. Right-click and select "Restart"
Using PowerShell (as Administrator):
Restart-Service -Name "com.docker.service"If you're switching between Linux and Windows containers, the daemon may be in the wrong mode:
Using PowerShell:
& 'C:\Program Files\Docker\Docker\DockerCli.exe' -SwitchDaemonUsing Command Prompt:
"C:\Program Files\Docker\Docker\DockerCli.exe" -SwitchDaemonYou may need to run this command multiple times if it doesn't work on the first try.
Docker Desktop requires virtualization support. Verify it's enabled:
Check if Hyper-V is enabled:
1. Open "Turn Windows features on or off"
2. Ensure "Hyper-V" is checked (all sub-features)
3. Ensure "Windows Hypervisor Platform" is checked
4. Restart Windows if you made changes
Check Task Manager for virtualization:
1. Open Task Manager (Ctrl+Shift+Esc)
2. Go to Performance tab
3. Look for "Virtualization: Enabled" at the bottom
If virtualization is disabled, you'll need to enable it in your BIOS/UEFI settings.
If using WSL2 backend (default for Windows Home), ensure it's up to date:
wsl --update
wsl --shutdownThen restart Docker Desktop.
Check your WSL distributions:
wsl -l -vYou should see "docker-desktop" and "docker-desktop-data" distributions.
If other solutions don't work, reset Docker Desktop:
1. Open Docker Desktop
2. Click the gear icon (Settings)
3. Go to "Troubleshoot" (or click the bug icon)
4. Click "Reset to factory defaults"
Warning: This removes all containers, images, and volumes. Back up important data first.
As a last resort, perform a clean reinstall:
1. Uninstall Docker Desktop from Windows Settings > Apps
2. Delete remaining Docker data:
Remove-Item -Recurse -Force "$env:APPDATA\Docker"
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\Docker"
Remove-Item -Recurse -Force "$env:PROGRAMDATA\Docker"
Remove-Item -Recurse -Force "$env:PROGRAMDATA\DockerDesktop"3. Restart Windows
4. Download and install the latest Docker Desktop from docker.com
5. Follow the installation prompts
Running as Administrator:
In the default daemon configuration on Windows, the Docker client may need to run elevated (as Administrator) to connect. If you're not in the "docker-users" group, run your terminal as Administrator.
Adding user to docker-users group:
net localgroup docker-users "your-username" /ADDLog out and back in for changes to take effect.
Conflicts with other virtualization software:
- VirtualBox versions before 6.0 conflict with Hyper-V. Update to VirtualBox 6.0+ or uninstall it.
- VMware Workstation versions before 15.5.5 have similar conflicts.
- Some gaming software (anti-cheat systems) disable Hyper-V on boot.
Re-enabling Hypervisor after it was disabled:
bcdedit /set hypervisorlaunchtype autoThen restart Windows.
WSL2 vs Hyper-V backend:
- Windows Home: Only WSL2 backend available
- Windows Pro/Enterprise: Both options available
- WSL2 is recommended for most use cases due to better performance
image operating system "linux" cannot be used on this platform
How to fix 'image operating system linux cannot be used on this platform' in Docker
manifest unknown: manifest unknown
How to fix 'manifest unknown' in Docker
cannot open '/etc/passwd': Permission denied
How to fix 'cannot open: Permission denied' in Docker
Error response from daemon: failed to create the ipvlan port
How to fix 'failed to create the ipvlan port' in Docker
toomanyrequests: Rate exceeded for anonymous users
How to fix 'Rate exceeded for anonymous users' in Docker Hub