[PR #4353] Fixes for #4352 #25266

Open
opened 2026-08-05 07:05:47 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/4353
Author: @ProjectInitiative
Created: 8/15/2025
Status: 🔄 Open

Base: mainHead: main


📝 Commits (1)

📊 Changes

5 files changed (+26 additions, -13 deletions)

View changed files

📝 client/cmd/service_controller.go (+5 -1)
📝 client/cmd/up.go (+1 -1)
📝 client/embed/embed.go (+1 -1)
📝 client/internal/connect.go (+11 -4)
📝 client/server/server.go (+8 -6)

📄 Description

feat(client): Pass setup key to service run command

No idea if this correctly solves or addresses #4352 but it did work when I tested it.

The netbird service run command did not correctly handle the --setup-key or
--setup-key-file flags. This was because the setup key was not being passed to the service
when it was started.

This commit fixes the issue by:

  • Passing the setup key from the service run command to the server instance.
  • Ensuring the getSetupKey function is called to read the key from a file if provided.
  • Passing the setup key through the connection client to the login function.
  • Updating all calls to NewConnectClient to include the setup key.

With this change, the netbird service run command now correctly uses the setup key to register
the peer.

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Fixes expected behavior


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/4353 **Author:** [@ProjectInitiative](https://github.com/ProjectInitiative) **Created:** 8/15/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`53f3cef`](https://github.com/netbirdio/netbird/commit/53f3cefd4f1a6751f064bda2ccc870005c311386) Fixes for #4352 ### 📊 Changes **5 files changed** (+26 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `client/cmd/service_controller.go` (+5 -1) 📝 `client/cmd/up.go` (+1 -1) 📝 `client/embed/embed.go` (+1 -1) 📝 `client/internal/connect.go` (+11 -4) 📝 `client/server/server.go` (+8 -6) </details> ### 📄 Description feat(client): Pass setup key to service run command No idea if this correctly solves or addresses #4352 but it did work when I tested it. The `netbird service run` command did not correctly handle the `--setup-key` or `--setup-key-file` flags. This was because the setup key was not being passed to the service when it was started. This commit fixes the issue by: - Passing the setup key from the `service run` command to the server instance. - Ensuring the `getSetupKey` function is called to read the key from a file if provided. - Passing the setup key through the connection client to the login function. - Updating all calls to `NewConnectClient` to include the setup key. With this change, the `netbird service run` command now correctly uses the setup key to register the peer. ### Checklist - [x] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (explain why) Fixes expected behavior --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 07:05:47 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#25266