[GH-ISSUE #5069] A fresh NetBird installation with the Getting Started file results in 401 Error #9833

Open
opened 2026-08-05 01:23:40 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @tilwegener on GitHub (Jan 8, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5069

Describe the problem

A fresh NetBird installation with the Getting Started file results in this error:

“Request failed with status code 401 Error: Token invalid”.

The following can be read in the logs:

netbird-management  | 2026-01-08T13:09:40Z ERRO [context: HTTP, requestID: d5fqp57nbe4s73cbqq7g] management/server/http/middleware/auth_middleware.go:91: Error when validating JWT: token could not be parsed: token is unverifiable: error while executing keyfunc: unable to find appropriate key
netbird-management  | 2026-01-08T13:09:40Z ERRO [context: HTTP, requestID: d5fqp57nbe4s73cbqq7g] shared/management/http/util/util.go:85: got a handler error: token invalid
netbird-management  | 2026-01-08T13:09:40Z ERRO [context: HTTP, requestID: d5fqp57nbe4s73cbqq7g] management/server/telemetry/http_api_metrics.go:201: HTTP response d5fqp57nbe4s73cbqq7g: GET /api/users/current status 401
netbird-management  | 2026-01-08T13:09:40Z ERRO [context: HTTP, requestID: d5fqp57nbe4s73cbqq80] shared/auth/jwt/validator.go:124: getPublicKey error: unable to find appropriate key
netbird-management  | 2026-01-08T13:09:40Z ERRO [context: HTTP, requestID: d5fqp57nbe4s73cbqq80] shared/auth/jwt/validator.go:191: token could not be parsed: token is unverifiable: error while executing keyfunc: unable to find appropriate key
netbird-management  | 2026-01-08T13:09:40Z ERRO [context: HTTP, requestID: d5fqp57nbe4s73cbqq80] management/server/http/middleware/auth_middleware.go:91: Error when validating JWT: token could not be parsed: token is unverifiable: error while executing keyfunc: unable to find appropriate key

To Reproduce

Steps to reproduce the behavior:

  1. Install Netbird with export NETBIRD_DOMAIN=netbird.example.com; curl -fsSL https://github.com/netbirdio/netbird/releases/latest/download/getting-started.sh | bash
  2. Setup first user
  3. Login with this user
  4. See error

Expected behavior

The login works and you are logged in.

Are you using NetBird Cloud?

Netbird Selfhosted 0.62.0 on Ubuntu 22.04 LTS and Netbird Selfhosted 0.62.1 on Ubuntu 24.04 LTS

NetBird version

netbird version

Is any other VPN software installed?

If yes, which one?

Debug output

To help us resolve the problem, please attach the following anonymized status output

netbird status -dA

Create and upload a debug bundle, and share the returned file key:

netbird debug for 1m -AS -U

Uploaded files are automatically deleted after 30 days.

Alternatively, create the file only and attach it here manually:

netbird debug for 1m -AS

Screenshots

Image

Additional context

Add any other context about the problem here.

Have you tried these troubleshooting steps?

  • Reviewed client troubleshooting (if applicable)
  • Checked for newer NetBird versions
  • Searched for similar issues on GitHub (including closed ones)
  • Restarted the NetBird client
  • Disabled other VPN software
  • Checked firewall settings
Originally created by @tilwegener on GitHub (Jan 8, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5069 **Describe the problem** A fresh NetBird installation with the Getting Started file results in this error: “Request failed with status code 401 Error: Token invalid”. The following can be read in the logs: ``` netbird-management | 2026-01-08T13:09:40Z ERRO [context: HTTP, requestID: d5fqp57nbe4s73cbqq7g] management/server/http/middleware/auth_middleware.go:91: Error when validating JWT: token could not be parsed: token is unverifiable: error while executing keyfunc: unable to find appropriate key netbird-management | 2026-01-08T13:09:40Z ERRO [context: HTTP, requestID: d5fqp57nbe4s73cbqq7g] shared/management/http/util/util.go:85: got a handler error: token invalid netbird-management | 2026-01-08T13:09:40Z ERRO [context: HTTP, requestID: d5fqp57nbe4s73cbqq7g] management/server/telemetry/http_api_metrics.go:201: HTTP response d5fqp57nbe4s73cbqq7g: GET /api/users/current status 401 netbird-management | 2026-01-08T13:09:40Z ERRO [context: HTTP, requestID: d5fqp57nbe4s73cbqq80] shared/auth/jwt/validator.go:124: getPublicKey error: unable to find appropriate key netbird-management | 2026-01-08T13:09:40Z ERRO [context: HTTP, requestID: d5fqp57nbe4s73cbqq80] shared/auth/jwt/validator.go:191: token could not be parsed: token is unverifiable: error while executing keyfunc: unable to find appropriate key netbird-management | 2026-01-08T13:09:40Z ERRO [context: HTTP, requestID: d5fqp57nbe4s73cbqq80] management/server/http/middleware/auth_middleware.go:91: Error when validating JWT: token could not be parsed: token is unverifiable: error while executing keyfunc: unable to find appropriate key ``` **To Reproduce** Steps to reproduce the behavior: 1. Install Netbird with `export NETBIRD_DOMAIN=netbird.example.com; curl -fsSL https://github.com/netbirdio/netbird/releases/latest/download/getting-started.sh | bash` 2. Setup first user 3. Login with this user 4. See error **Expected behavior** The login works and you are logged in. **Are you using NetBird Cloud?** Netbird Selfhosted 0.62.0 on Ubuntu 22.04 LTS and Netbird Selfhosted 0.62.1 on Ubuntu 24.04 LTS **NetBird version** `netbird version` **Is any other VPN software installed?** If yes, which one? **Debug output** To help us resolve the problem, please attach the following anonymized status output netbird status -dA Create and upload a debug bundle, and share the returned file key: netbird debug for 1m -AS -U *Uploaded files are automatically deleted after 30 days.* Alternatively, create the file only and attach it here manually: netbird debug for 1m -AS **Screenshots** <img width="469" height="80" alt="Image" src="https://github.com/user-attachments/assets/b2df4b47-da1d-4a4c-b77e-8171f406f95e" /> **Additional context** Add any other context about the problem here. **Have you tried these troubleshooting steps?** - [x] Reviewed [client troubleshooting](https://docs.netbird.io/how-to/troubleshooting-client) (if applicable) - [x] Checked for newer NetBird versions - [x] Searched for similar issues on GitHub (including closed ones) - [x] Restarted the NetBird client - [x] Disabled other VPN software - [x] Checked firewall settings
saavagebueno added the triage-needed label 2026-08-05 01:23:40 -04:00
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#9833