[Bug] Hostname changes are not reflected #798

Closed
opened 2025-12-29 02:24:09 +01:00 by adam · 2 comments
Owner

Originally created by @Proxymiity on GitHub (Sep 19, 2024).

Is this a support request?

  • This is not a support request

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Changing the hostname of a node is not reflected on headscale.

Using tailscale set --hostname hello still keeps the hostname that the node originally came with.

Expected Behavior

Changing the hostname of a node on the node itself should reflect it on the node list in headscale.
This is the current behavior with 0.22.3.

Steps To Reproduce

  1. Start 0.23.0 (either upgraded from 0.22.3 or a fresh install)
  2. Register a new node on the server
  3. Note its hostname
  4. Change the hostname. On desktop, tailscale set --hostname something. On mobile, it is located in the settings of the app.
  5. Note that the hostname stayed the same

Environment

- OS: Docker 27.0.3 (Host: Debian 12.6)
- Headscale version: 0.23.0
- Tailscale version: 1.74.1 (ccd6bf2f4ee6421c23789b64e6e63c2ccbe87e08)
- Tailscale version (phone): iOS 18.0 // TS 1.74.0 (TestFlight beta 101.74.0)

Runtime environment

  • Headscale is behind a (reverse) proxy
  • Headscale runs in a container

Anything else?

No response

Originally created by @Proxymiity on GitHub (Sep 19, 2024). ### Is this a support request? - [X] This is not a support request ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Behavior Changing the hostname of a node is not reflected on headscale. Using `tailscale set --hostname hello` still keeps the hostname that the node originally came with. ### Expected Behavior Changing the hostname of a node on the node itself should reflect it on the node list in headscale. This is the current behavior with 0.22.3. ### Steps To Reproduce 1. Start 0.23.0 (either upgraded from 0.22.3 or a fresh install) 2. Register a new node on the server 3. Note its hostname 4. Change the hostname. On desktop, `tailscale set --hostname something`. On mobile, it is located in the settings of the app. 5. Note that the hostname stayed the same ### Environment ```markdown - OS: Docker 27.0.3 (Host: Debian 12.6) - Headscale version: 0.23.0 - Tailscale version: 1.74.1 (ccd6bf2f4ee6421c23789b64e6e63c2ccbe87e08) - Tailscale version (phone): iOS 18.0 // TS 1.74.0 (TestFlight beta 101.74.0) ``` ### Runtime environment - [X] Headscale is behind a (reverse) proxy - [X] Headscale runs in a container ### Anything else? _No response_
adam added the bug label 2025-12-29 02:24:09 +01:00
adam closed this issue 2025-12-29 02:24:09 +01:00
Author
Owner

@msarsha commented on GitHub (Sep 23, 2024):

Having the same issue. restarting both node and server does not help.
@kradalby want to point me to where this should be implemented? I could have a look and check if do-able for me.

@msarsha commented on GitHub (Sep 23, 2024): Having the same issue. restarting both node and server does not help. @kradalby want to point me to where this should be implemented? I could have a look and check if do-able for me.
Author
Owner

@kradalby commented on GitHub (Sep 24, 2024):

@msarsha It would probably be in this function: https://github.com/juanfont/headscale/blob/main/hscontrol/poll.go#L454

You probably want to look at the logic in Rename node to ensure there is no collision, I have not had too much time to think about this yet, but will look closer if you post a PR.

If you dont have time, let me know and I'll look at it later.

@kradalby commented on GitHub (Sep 24, 2024): @msarsha It would probably be in this function: https://github.com/juanfont/headscale/blob/main/hscontrol/poll.go#L454 You probably want to look at the logic in Rename node to ensure there is no collision, I have not had too much time to think about this yet, but will look closer if you post a PR. If you dont have time, let me know and I'll look at it later.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#798