netbird pre-shared key got removed with every connection #323

Closed
opened 2025-11-20 05:09:35 -05:00 by saavagebueno · 2 comments
Owner

Originally created by @support-tt on GitHub (May 9, 2023).

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). 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.
Author
Owner

@support-tt commented on GitHub (May 9, 2023):

My colleague tested it on windows now and same problem.

@support-tt commented on GitHub (May 9, 2023): My colleague tested it on windows now and same problem.
Author
Owner

@support-tt commented on GitHub (May 17, 2023):

@braginini and @pappz :
I tested it with version 20 and 20.1 and still the psk-key is not persistent in the configuration. Did i miss something ?

@support-tt commented on GitHub (May 17, 2023): @braginini and @pappz : I tested it with version 20 and 20.1 and still the psk-key is not persistent in the configuration. Did i miss something ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#323