Skip to content

Auto-update system host if the agent's IP has changed#1845

Open
DX-Kevin wants to merge 1 commit intohenrygd:mainfrom
DX-Kevin:my-beszel-features-v0.18.5
Open

Auto-update system host if the agent's IP has changed#1845
DX-Kevin wants to merge 1 commit intohenrygd:mainfrom
DX-Kevin:my-beszel-features-v0.18.5

Conversation

@DX-Kevin
Copy link
Copy Markdown

@DX-Kevin DX-Kevin commented Mar 28, 2026

Auto-update system host if the agent's IP has changed
updateSystemHost checks if the current connection's IP matches the system's recorded host

@DX-Kevin DX-Kevin requested a review from henrygd as a code owner March 28, 2026 04:00
@svenvg93
Copy link
Copy Markdown
Collaborator

Quick question: what will happen when I configured a dns name when adding the system and not a ip address?

btw please remove the committed agent binary from the commit 🙂

@Kinsue
Copy link
Copy Markdown

Kinsue commented Mar 30, 2026

The necessity of this modification isn't entirely clear. Furthermore, as @svenvg93 pointed out, the current implementation relies on a simple string comparison, which would forcibly overwrite the domain name configured by the user.

Regarding the use case you mentioned, here are a few suggestions:

  • For frequently changing IPs: The best practice is to use a Domain Name combined with DDNS. Handling dynamic IP resolution directly within the codebase exceeds the intended scope of this project, which aims to remain a lightweight monitoring solution.
  • For restricted environments (No Domain/DDNS): the current version (v1.18.6) actually supports communication between a private network Agent and a public network Hub, as illustrated below:
image You can simply enter any placeholder IP in the frontend.

Actually, older versions did indeed have an issue where Agents would go offline when the IP changed. But I haven't encountered it at all since upgrading to the newer releases.

I'd recommend trying out the latest version to see if it resolves your issue. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants