Adding User to Docker-Users Group on Windows
Problem
When attempting to use Docker Desktop on Windows, you may encounter this error:
The current user is not in the 'docker-users' group. Add yourself to the 'docker-users' group and then log out and back in to Windows.
This occurs because Docker requires elevated permissions to interact with the Windows containers subsystem, and your current user account lacks the necessary group membership.
Solutions
Solution 1: Add User to Docker-Users Group (Recommended)
The most reliable solution is to manually add your user to the docker-users
group using the command line:
Open Command Prompt as Administrator:
- Press
Windows + X
and select "Command Prompt (Admin)" or "Windows PowerShell (Admin)"
- Press
Add your user to the docker-users group:
cmdnet localgroup docker-users "your-username" /ADD
Replace
"your-username"
with your actual Windows username. To find your username:- Look at your user folder under
C:\Users\
- Or run
whoami
in the command prompt
- Look at your user folder under
Sign out and back in or restart your computer for the changes to take effect
WARNING
Administrator privileges are required to modify group membership. Ensure you're running the command prompt "as Administrator."
Solution 2: Create Docker-Users Group (If Missing)
If the docker-users
group doesn't exist on your system, create it using PowerShell:
Open PowerShell as Administrator
Run these commands:
powershell# Create the docker-users group New-LocalGroup -Name 'docker-users' -Description 'Docker Users Group' # Add your user to the group Add-LocalGroupMember -Group 'docker-users' -Member $env:USERNAME
Sign out and back in to apply the changes
Solution 3: Restart System
Sometimes Docker Desktop automatically adds users to the required group during installation, but the changes only take effect after a restart:
- Save your work and perform a full system restart
- This is particularly common when installing Docker via Chocolatey package manager
TIP
After any group membership change, you must sign out and back in or restart your computer for the changes to take effect.
Solution 4: Reinstall Docker Desktop
If the above solutions don't work, consider reinstalling Docker Desktop:
- Uninstall Docker Desktop from "Apps & features"
- Download the latest version from Docker's official website
- Install with administrator privileges
- Restart your computer after installation
Verification
After applying any solution, verify that your user is in the docker-users group:
net localgroup docker-users
This command will list all members of the docker-users group.
Summary
The most reliable approach is manually adding your user to the docker-users group using Solution 1. If the group doesn't exist, use Solution 2 to create it. Always remember to sign out and back in or restart your computer after making group membership changes for them to take effect.
For most users, Docker Desktop should work correctly after following these steps without needing to reinstall the application.