You’re not alone if you see the error message “Unexpected WSL Error: Please Restart WSL/Docker Desktop” while using Docker on Windows. This problem is common, especially for Docker Desktop users with the WSL 2 backend. The issue usually appears after a Windows update, Docker configuration change, or WSL misalignment—and it stops your containers from running correctly.
This guide explains what causes the error and shows clear steps to fix it.
What Is the “Unexpected WSL Error” in Docker?
Docker Desktop on Windows uses the Windows Subsystem for Linux (WSL 2) to run containers. When Docker can’t communicate appropriately with WSL or the integrated Linux distro, it triggers the “unexpected WSL error.” The error blocks Docker from launching containers or accessing the backend engine.
You may see this error when starting Docker, after a system update, or switching between distros. It’s usually a sign that Docker and WSL have lost their connection.
Why This Error Happens
Several issues can trigger this error. The most common causes include:
- A broken WSL kernel or misconfigured WSL version
- A Linux distro that’s not set to use WSL 2
- Missing system features like Virtual Machine Platform or Hyper-V
- Conflicts caused by recent Windows or Docker updates
- Docker Desktop is not linked to any running WSL distro
Identifying the root cause helps you apply the correct fix quickly.
How to Fix “Unexpected WSL Error” in Docker Desktop
To resolve the “Unexpected WSL Error” in Docker Desktop, please follow the steps below:
Fix 1: Restart WSL and Docker Properly
Sometimes, the fix is simple: restart both WSL and Docker Desktop.
Follow these steps:
- Open PowerShell as Administrator
- Run this command:
wsl --shutdown
- Then restart Docker Desktop manually
- After Docker reloads, try your container command again
This clears out any hung WSL sessions and forces Docker to re-establish its connection.
Fix 2: Check Your WSL Version and Integration
Docker Desktop only works with WSL 2, not WSL 1. To confirm your setup:
- Run
wsl --status
in PowerShell - Make sure the default version is WSL 2
- Check that your active Linux distro (e.g., Ubuntu) is also using WSL 2
- Open Docker Desktop
- Go to Settings > Resources > WSL Integration
- Enable integration for your selected distro
If WSL 1 is enabled or no distro is selected, Docker will fail to start properly.
Fix 3: Repair or Reset Docker Desktop
If the integration is correct but the error continues, try repairing or resetting Docker.
- Open Docker Desktop
- Go to Settings > Troubleshoot
- Click “Reset to factory defaults” or “Repair”
Resetting clears saved configurations and may delete containers or images, so back up anything important first.
Fix 4: Reinstall or Update WSL
WSL itself may be the issue. Updating or reinstalling the WSL kernel can fix silent problems.
Steps:
- Download the latest WSL update from Microsoft: https://aka.ms/wsl2kernel
- Install it
- Reboot your system
- Then restart Docker Desktop
If WSL is deeply broken, consider running wsl --unregister <distro>
and reinstalling your Linux distro from the Microsoft Store.
When to Reinstall Docker Completely
If all else fails, a clean reinstall may be needed. Here’s how:
- Uninstall Docker Desktop from Control Panel > Apps
- Delete Docker config files from
C:\Users\<YourName>\AppData\Local\Docker
- Reboot your system
- Reinstall the latest version from docker.com
- Open Docker and re-enable WSL integration
This often resolves deep-rooted issues caused by corrupted configs or previous upgrades.
Check System Requirements and Windows Features
Docker Desktop requires several features to be active on Windows. Make sure the following are enabled:
- Windows Subsystem for Linux
- Virtual Machine Platform
- Hyper-V (for Windows 10 Pro/Enterprise)
To verify:
- Press Win + R, type
OptionalFeatures.exe
, and press Enter. - Check the boxes for these features and restart your system if needed.
How to Avoid This Error in the Future
Once you fix the issue, you can prevent it from happening again by following a few simple habits:
- Keep Docker Desktop and WSL up to date
- Avoid force-quitting Docker or the WSL process
- Restart Docker manually after major Windows updates
- Use stable Windows builds—avoid using Insider or Beta versions
- Regularly back up Docker volumes and config if you’re using it for development work
Conclusion
The “Unexpected WSL Error” in Docker Desktop is frustrating, but usually fixable with the right steps. Restarting WSL, checking Docker’s WSL integration, repairing the Docker install, or updating WSL can solve the problem in most cases.
If none of these work, a clean reinstall is often the last—but effective—option.
Have you fixed this error with a different method? Share your solution in the comments to help others.