docker network_mode: "host" or --net=host error #3994

Closed
opened 2026-02-21 01:46:06 -05:00 by deekerman · 1 comment
Owner

Originally created by @Yamada993 on GitHub (Feb 17, 2026).

Bug Description

Without changing any other configurations, merely modifying the network mode in the docker compose file will cause this issue. Specifically, the client works fine in the IPv4 network environment but fails to connect to the server in the IPv6 network environment. The client shows as not ready. If docker compose uses ports, both IPv4 and IPv6 are normal.
The client is Windows.

How to Reproduce

This is the normal configuration:

services:
  hbbs:
    container_name: hbbs
    image: rustdesk/rustdesk-server:latest
    command: hbbs
    volumes:
      - ./data:/root
    ports:
      - 21115:21115
      - 21116:21116
      - 21116:21116/udp
    depends_on:
      - hbbr
    restart: unless-stopped

  hbbr:
    container_name: hbbr
    image: rustdesk/rustdesk-server:latest
    command: hbbr
    volumes:
      - ./data:/root
    ports:
      - 21117:21117
    restart: unless-stopped

This is the configuration for an error situation:

services:
  hbbs:
    container_name: hbbs
    image: rustdesk/rustdesk-server:latest
    command: hbbs
    volumes:
      - ./data:/root
    network_mode: "host"
    depends_on:
      - hbbr
    restart: unless-stopped

  hbbr:
    container_name: hbbr
    image: rustdesk/rustdesk-server:latest
    command: hbbr
    volumes:
      - ./data:/root
    network_mode: "host"
    restart: unless-stopped

Expected Behavior

Using Docker host mode, the client can connect normally.

Operating system(s) on local (controlling) side and remote (controlled) side

Windows11

RustDesk Version(s) on local (controlling) side and remote (controlled) side

1.4.5

Screenshots

Network:Host
Image

Image

Network:Docker

Image Image

Additional Context

No response

Originally created by @Yamada993 on GitHub (Feb 17, 2026). ### Bug Description Without changing any other configurations, merely modifying the network mode in the docker compose file will cause this issue. Specifically, the client works fine in the IPv4 network environment but fails to connect to the server in the IPv6 network environment. The client shows as not ready. If docker compose uses ports, both IPv4 and IPv6 are normal. The client is Windows. ### How to Reproduce **This is the normal configuration:** ``` services: hbbs: container_name: hbbs image: rustdesk/rustdesk-server:latest command: hbbs volumes: - ./data:/root ports: - 21115:21115 - 21116:21116 - 21116:21116/udp depends_on: - hbbr restart: unless-stopped hbbr: container_name: hbbr image: rustdesk/rustdesk-server:latest command: hbbr volumes: - ./data:/root ports: - 21117:21117 restart: unless-stopped ``` This is the configuration for an error situation: ``` services: hbbs: container_name: hbbs image: rustdesk/rustdesk-server:latest command: hbbs volumes: - ./data:/root network_mode: "host" depends_on: - hbbr restart: unless-stopped hbbr: container_name: hbbr image: rustdesk/rustdesk-server:latest command: hbbr volumes: - ./data:/root network_mode: "host" restart: unless-stopped ``` ### Expected Behavior Using Docker host mode, the client can connect normally. ### Operating system(s) on local (controlling) side and remote (controlled) side Windows11 ### RustDesk Version(s) on local (controlling) side and remote (controlled) side 1.4.5 ### Screenshots Network:Host <img width="1345" height="203" alt="Image" src="https://github.com/user-attachments/assets/72d18481-460f-4df2-9e3b-82e37365ebbc" /> <img width="633" height="72" alt="Image" src="https://github.com/user-attachments/assets/4b5023ce-f2fb-462b-8b56-70ac460ae7d9" /> Network:Docker <img width="1299" height="194" alt="Image" src="https://github.com/user-attachments/assets/5c481cf6-9f59-4938-a5a6-171225237890" /> <img width="603" height="76" alt="Image" src="https://github.com/user-attachments/assets/c7f95c49-aea0-427c-9ef3-3579754577a1" /> ### Additional Context _No response_
deekerman 2026-02-21 01:46:06 -05:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@rustdesk commented on GitHub (Feb 17, 2026):

#763

@rustdesk commented on GitHub (Feb 17, 2026): #763
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/rustdesk-rustdesk#3994
No description provided.