[GH-ISSUE #5426] Error when validating JWT: decrypt user: decrypt email: decrypt: cipher: message authentication failed #10515

Open
opened 2026-08-05 01:26:10 -04:00 by saavagebueno · 1 comment
Owner

Originally created by @pavlo122 on GitHub (Feb 23, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5426

Describe the problem

I have netbird on an aws ec2 instance in asg and to rotate ami of an instance I'm just terminating it and it getting recreated. The issue is that with NETBIRD_STORE_ENGINE_POSTGRES_DSN netbird works till first recreation.

To Reproduce

Steps to reproduce the behavior:
create ec2 instance, vm etc with NETBIRD_STORE_ENGINE_POSTGRES_DSN(with DB to be a static instance outside the VM) and set netbird up, drop VM and create a new one from the same setup.env - you will get 401 in browser at least with Google IdP

Expected behavior

VM recreation shouldn't cause issues since part of conf should be taken from setup.env and the rest from Postgres

Are you using NetBird Cloud?

self-host NetBird

NetBird version

0.65.3

The issue is with database encryption key is getting generated every time and so DataStoreEncryptionKey in management.json is every time different and I don't see any env vars I can add to setup.env to fix this

Originally created by @pavlo122 on GitHub (Feb 23, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5426 **Describe the problem** I have netbird on an aws ec2 instance in asg and to rotate ami of an instance I'm just terminating it and it getting recreated. The issue is that with NETBIRD_STORE_ENGINE_POSTGRES_DSN netbird works till first recreation. **To Reproduce** Steps to reproduce the behavior: create ec2 instance, vm etc with NETBIRD_STORE_ENGINE_POSTGRES_DSN(with DB to be a static instance outside the VM) and set netbird up, drop VM and create a new one from the same setup.env - you will get 401 in browser at least with Google IdP **Expected behavior** VM recreation shouldn't cause issues since part of conf should be taken from setup.env and the rest from Postgres **Are you using NetBird Cloud?** self-host NetBird **NetBird version** 0.65.3 The issue is with database encryption key is getting generated every time and so DataStoreEncryptionKey in management.json is every time different and I don't see any env vars I can add to setup.env to fix this
saavagebueno added the triage-needed label 2026-08-05 01:26:10 -04:00
Author
Owner

@Brown000 commented on GitHub (Mar 14, 2026):

Same issue after restarting the VM. Is there any solution to find lost encryption key?

<!-- gh-comment-id:4059629579 --> @Brown000 commented on GitHub (Mar 14, 2026): Same issue after restarting the VM. Is there any solution to find lost encryption key?
Sign in to join this conversation.
No Label triage-needed
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#10515