[GH-ISSUE #1720] Broken hostnames when run through docker #3098

Open
opened 2026-08-05 00:50:37 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @Blake-Ballew on GitHub (Mar 16, 2024).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/1720

I find that when I connect a peer to my network through netbird in a docker container, I cannot connect to other peers with their hostnames; only their IP addresses. All peers with netbird installed directly to the system work as expected. I am self hosting the netbird server.

Steps to reproduce the behavior:

  1. docker-compose up -d the following docker-compose.yaml:
version: '3.4'
services:
  netbird:
    image: netbirdio/netbird:latest
    restart: always
    environment:
      - NB_MANAGEMENT_URL=<Management URL>
      - NB_SETUP_KEY=<Setup Key>
    volumes:
      - netbird-client:/etc/netbird
    network_mode: "host"
    cap_add:
      - NET_ADMIN
    privileged: true
volumes:
  netbird-client:
    external: true
  1. Ping the IP of a peer to ensure the network is running.
  2. Ping the hostname of a peer with and without netbird.selfhosted.

Expected behavior is being able to successfully ping another peer with the hostname when running netbird in a docker container.

I am using netbird selfhosted.

Netbird version v0.26.3

Originally created by @Blake-Ballew on GitHub (Mar 16, 2024). Original GitHub issue: https://github.com/netbirdio/netbird/issues/1720 I find that when I connect a peer to my network through netbird in a docker container, I cannot connect to other peers with their hostnames; only their IP addresses. All peers with netbird installed directly to the system work as expected. I am self hosting the netbird server. Steps to reproduce the behavior: 1. docker-compose up -d the following docker-compose.yaml: ``` version: '3.4' services: netbird: image: netbirdio/netbird:latest restart: always environment: - NB_MANAGEMENT_URL=<Management URL> - NB_SETUP_KEY=<Setup Key> volumes: - netbird-client:/etc/netbird network_mode: "host" cap_add: - NET_ADMIN privileged: true volumes: netbird-client: external: true ``` 2. Ping the IP of a peer to ensure the network is running. 3. Ping the hostname of a peer with and without netbird.selfhosted. Expected behavior is being able to successfully ping another peer with the hostname when running netbird in a docker container. I am using netbird selfhosted. Netbird version v0.26.3
saavagebueno added the clientquestion labels 2026-08-05 00:50:37 -04:00
Sign in to join this conversation.
No Label client question
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#3098