[PR #5427] [fix] try NETBIRD_DATASTORE_ENC_KEY from setup.env first #25856

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

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/5427
Author: @pavlo122
Created: 2/23/2026
Status: 🔄 Open

Base: mainHead: fix/reuse_nb_datastore_enc_key


📝 Commits (1)

  • aa2bf7b [fix] try NETBIRD_DATASTORE_ENC_KEY from setup.env first

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 infrastructure_files/configure.sh (+2 -2)

📄 Description

Describe your changes

In case there is no DataStoreEncryptionKey in management.json we wouldn't have NETBIRD_DATASTORE_ENC_KEY set so we other have DataStoreEncryptionKey empty or with fresh generated base64 despite DATASTORE already exist and encrypted with another key.
My change is allowing to get encryption key from setup.env so even with netbird recreation we would have all data(routes, setup keys, peers etc) still there(unless we destroy DB with it)

https://github.com/netbirdio/netbird/issues/5426

Stack

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)
    As I understood multi container setup considered outdated so don't see a point adding it.

Summary by CodeRabbit

  • Chores
    • Updated encryption key variable handling in configuration initialization scripts for improved consistency.

🔄 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/5427 **Author:** [@pavlo122](https://github.com/pavlo122) **Created:** 2/23/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/reuse_nb_datastore_enc_key` --- ### 📝 Commits (1) - [`aa2bf7b`](https://github.com/netbirdio/netbird/commit/aa2bf7b30def86b74cdd68ac00a18cdab2a79319) [fix] try NETBIRD_DATASTORE_ENC_KEY from setup.env first ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `infrastructure_files/configure.sh` (+2 -2) </details> ### 📄 Description ## Describe your changes In case there is no DataStoreEncryptionKey in management.json we wouldn't have NETBIRD_DATASTORE_ENC_KEY set so we other have DataStoreEncryptionKey empty or with fresh generated base64 despite DATASTORE already exist and encrypted with another key. My change is allowing to get encryption key from setup.env so even with netbird recreation we would have all data(routes, setup keys, peers etc) still there(unless we destroy DB with it) ## Issue ticket number and link https://github.com/netbirdio/netbird/issues/5426 ## Stack <!-- branch-stack --> ### 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](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) As I understood multi container setup considered outdated so don't see a point adding it. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated encryption key variable handling in configuration initialization scripts for improved consistency. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <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:06:34 -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#25856