windows icon indicating copy to clipboard operation
windows copied to clipboard

[Question]: RDP not finding address of Win11 container

Open pllagunos opened this issue 4 months ago • 10 comments

Is your question not already answered in the FAQ?

  • [x] I made sure the question is not listed in the FAQ.

Is this a general question and not a technical issue?

  • [x] I am sure my question is not about a technical issue.

Question

Hi. Thanks for creating Dockur/windows first of all. I managed to setup a container using WSL2 as per the docker compose yaml file from the README. It works great and I am able to use noVNC (localhost:8006) to use a win11 container.

I haven't been able to use RDP after much frustration however. Using the default username Docker I tried many IP addressess to no avail, I also tried disabling the firewall on both the container and the host machine without success. The error I get is "Remote Desktop can not connect to remote computer for one of these reasons... 1) remote access to server is not enabled 2) the remote computer is off 3) the remote computer is not available on the network"

To get the IP address I used 'docker insepect %container_name' and on the JSON file got:

Networks": { "windows-docker_default": { ..... "IPAMConfig": null, "Links": null, "DriverOpts": null, "GwPriority": 0, "IPAddress": "172.18.0.2", ] } } Through the noVNC connnection I used arp -a to check the local IP address and instead got 172.30.0.2, I tried to ping both from the host computer and other computers in the same network and had no success.

I would really appreciate any input on what I am missing, as I don't think this is a bug but an issue on my configuration.

pllagunos avatar Oct 14 '25 15:10 pllagunos

Also, once I restart my system and the container runs again, it installs windows from scratch instead of keeping the past instance. Something might be wrong in my YAML file as the windows folder size is already 70gb (new installation each time container stops?), so here is my YAML file:

services:
  windows:
    image: dockurr/windows
    container_name: windows
    environment:
      VERSION: "11"
      RAM_SIZE: "12G"
      CPU_CORES: "4"
      DISK_SIZE: "64G"
    devices:
      - /dev/kvm
      - /dev/net/tun
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 3389:3389/tcp
      - 3389:3389/udp
    volumes:
      - ./windows:/storage
    restart: always
    stop_grace_period: 2m

pllagunos avatar Oct 14 '25 16:10 pllagunos

This container is not really aimed for use in Windows, but mainly for use in Linux. Normally you should be able to connect to localhost:3389 for RDP, but when running under Windows this port is most likely already taken by Windows itself, so that might cause issues.

In any case do not use the IP 172.30.0.2, because it will not be reachable. You should be able to use 127.0.0.1 (or otherwise 172.18.0.2). And I guess it will be necessary to change RDP to a different (free) port, like this:

    ports:
      - 8006:8006
      - 3399:3389/tcp
      - 3399:3389/udp

then launch mstsc and connect to: 127.0.0.1:3399 and it should connect.

kroese avatar Oct 15 '25 12:10 kroese

Tested on winxp and I am able to do RDP using 127.0.0.1:port

but I can't get RDP to work on Win11 or Win10. I used different ports than 3389 this time but only managed to get windows xp working.

pllagunos avatar Oct 16 '25 15:10 pllagunos

What worked for me (win11 host) is replacing both tcp and udp entries with a single entry:

ports:
      - 8006:8006
      - 8008:3389

which maps both UDP and TCP, and I could then RDP to 127.0.0.1:8008

ewan-DVT avatar Oct 18 '25 20:10 ewan-DVT

@ewan-DVT If you do not include a port mapping with /udp it only maps TCP, not both I believe? However it should not matter because RDP doesnt really require the UDP port, it just provides a performance increase over TCP, but it will work fine without it.

kroese avatar Oct 18 '25 20:10 kroese

@ewan-DVT This also worked for me. For people with win11 host, a sensible recommendation would be to not include the port mapping for udp. Tested on win11, win10 and winXP VMs using host computer for RDP as well as another computer in the same network.

pllagunos avatar Oct 20 '25 11:10 pllagunos

@pllagunos Sorry, but can you summarize the problem (and the solution) again clearly?

Do you mean that on Docker Desktop for Windows this works:

ports:
      - 3389:3389

and this doesn't work:

ports:
      - 3389:3389/tcp
      - 3389:3389/udp

because that would be really strange?

kroese avatar Oct 20 '25 12:10 kroese

Yes, the solution to enable RDP (or to make it work) was to remove the /tcp /udp routes. Since this was also the case for @ewan-DVT it might be some windows 11 specific problem.

pllagunos avatar Oct 20 '25 14:10 pllagunos

I also struggled a bit to get RDP to work into the Windows11 Enterprise container (using docker in WSL2 to run the container).

Switching port did the trick. The following config worked for me:

    ports:
      - 8006:8006
      - 8008:3389/tcp
      - 8008:3389/udp

sevenam avatar Oct 23 '25 20:10 sevenam

I installed windows 10e and windwos 11 under ubuntu 20. I can connect to windows containers using remina rdp client from a linux laptop, but when I try to connect from my mac with the official rdp client (Windows App) it gives me a connection error 0x104.

Any fixes?

Update: Allow Local Network Access permission for the Windows App in macos privacy/security settings.

georgeyanev avatar Nov 19 '25 18:11 georgeyanev