[GH-ISSUE #845] netbird pre-shared key got removed with every connection #1263

Open
opened 2026-08-05 00:41:49 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @support-tt on GitHub (May 9, 2023).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/845

Originally assigned to: @pappz on GitHub.

Describe the problem
I tested netbird on several linux servers and clients (kubuntu 23.04, ubuntu 22.04, ubuntu 20.04 and mint 20.3 )
When I set the pre-shared key it works for one connection. (generated with openssl rand -base64 32 and I tried several different keys).
I tried:
1.) set the pre shared key in the netbird UI works for one connection then the key got removed from the config.json
2.) set it directly in the config.json is got removed directly when I do a netbird up or connect over the UI
3.) use netbird up --preshared-key "KEY" works for the connection but also only 1 time

So my problem is no matter what I do the key is not saved persistant so on my client I have to use --preshare-key every time I want to connect. On my server after a reboot I have to connect directly to the server and start the netbird vpn because it starts without the key.

To Reproduce
Steps to reproduce the behavior:
1.) set the pre shared key in the GUI, Config or in the command and connect.
2.) Disconnect and try to reconnect. Connection is successful but without the key.

Expected behavior
the key should be saved in the config persistent

NetBird status -d output:
When connected I see my peers but cant connect to the ones with PSK so here I see no problem

Screenshots
image
image
Close connection and reboot client
image

Same when using the shell commands or write the PSK directly into the config. The rest of the config doesnt change so the MGMT server and adminurl persists.

Originally created by @support-tt on GitHub (May 9, 2023). Original GitHub issue: https://github.com/netbirdio/netbird/issues/845 Originally assigned to: @pappz on GitHub. **Describe the problem** I tested netbird on several linux servers and clients (kubuntu 23.04, ubuntu 22.04, ubuntu 20.04 and mint 20.3 ) When I set the pre-shared key it works for one connection. (generated with openssl rand -base64 32 and I tried several different keys). I tried: 1.) set the pre shared key in the netbird UI works for one connection then the key got removed from the config.json 2.) set it directly in the config.json is got removed directly when I do a netbird up or connect over the UI 3.) use netbird up --preshared-key "KEY" works for the connection but also only 1 time So my problem is no matter what I do the key is not saved persistant so on my client I have to use --preshare-key every time I want to connect. On my server after a reboot I have to connect directly to the server and start the netbird vpn because it starts without the key. **To Reproduce** Steps to reproduce the behavior: 1.) set the pre shared key in the GUI, Config or in the command and connect. 2.) Disconnect and try to reconnect. Connection is successful but without the key. **Expected behavior** the key should be saved in the config persistent **NetBird status -d output:** When connected I see my peers but cant connect to the ones with PSK so here I see no problem **Screenshots** ![image](https://github.com/netbirdio/netbird/assets/61587422/ba8f948b-c81b-4096-8895-189ecb2a1bac) ![image](https://github.com/netbirdio/netbird/assets/61587422/ef702274-5efa-474d-819a-3db9b053ade1) Close connection and reboot client ![image](https://github.com/netbirdio/netbird/assets/61587422/4a67a34e-1401-4665-98d3-fb2ba04f16a6) Same when using the shell commands or write the PSK directly into the config. The rest of the config doesnt change so the MGMT server and adminurl persists.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#1263