Ports are not available: … bind: An attempt was made to access a socket in a way forbidden by its access permissions (Port is reserved by Windows)
Docker can’t open the requested port (for example 3000 for Open WebUI) because Windows has blocked it or another program is using it.
The message
Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:3000 … bind: An attempt was made to access a socket in a way forbidden by its access permissions.
Affects: Docker Desktop, Open WebUI
Why is this happening?
Through Hyper-V and the NAT service (winnat), which WSL 2 and Docker Desktop also use, Windows reserves entire port ranges. If your port falls within one of these ranges, no program can open it — even if netstat shows it as free. Less often, another service (for example IIS) is already using the port.
How to fix it
- Open a terminal as administrator and show the blocked ranges:
netsh interface ipv4 show excludedportrange protocol=tcp. If 3000 falls between the start and end port of a line, the port is reserved. - Fastest fix: use a different port on your PC, for example
-p 3001:8080instead of-p 3000:8080, and then open http://localhost:3001. - Or restart the NAT service:
net stop winnatand thennet start winnat. While winnat is stopped, WSL may briefly have no internet. - To keep the port free permanently, reserve it for yourself while winnat is stopped:
netsh int ipv4 add excludedportrange protocol=tcp startport=3000 numberofports=1 store=persistent, thennet start winnat. - Check with
netstat -aon | findstr :3000whether another program is using the port, and stop it if needed. - Then start the container again, for example
docker start open-webui.
Better not: Only change Windows’ dynamic port range (netsh int ipv4 set dynamic …) if the simpler steps don’t help.
Set up from scratch again
If it still doesn’t work after that, a fresh setup step by step often helps:
- Your own ChatGPT with Ollama and Open WebUI
Run a language model locally on Windows - with the Ollama app, suitable models for 8 to 24 GB, context length, command line, and Open WebUI… - Chat with your own documents (AnythingLLM)
Set up AnythingLLM Desktop on Windows, load PDFs into a workspace, and ask questions locally — with sources and privacy.
Terms for this
Similar errors
- Open WebUI or AnythingLLM can't find Ollama
- Open WebUI: WebSocket connection failed / is not an accepted origin (page keeps loading behind reverse proxy)
- could not select device driver "" with capabilities: [[gpu]] (Docker cannot pass the graphics card through to the container)
- Docker Desktop: WSL needs updating / WSL 2 installation is incomplete
- Ollama: model "…" not found, try pulling it first (model missing on this server)
Sources
- https://github.com/docker/for-win/issues/9272
- https://dev.to/trademark18/an-attempt-was-made-to-access-a-socket-4nh9
- https://github.com/open-webui/open-webui/blob/main/README.md
Checked on Oct 27, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.