CORS fails and causes /peers to load

Hi,

On my Ubuntu 24.04 LTS system I am trying to set up self-hosted Netbird using my Keycloak on auth.domainname.io with Github as IdP. I have followed the official documentation and have it working mostly according to the guide, except for a couple settings aimed at my own setup.

The page /peers keeps loading indefinitely. It seems that communication between the dashboard and management portal is not succeeding.

Steps to reproduce the behavior:

  1. Follow official documentation: Advanced guide - NetBird Docs
  2. Keycloak as OIDC with Github as IDP
  3. JSON imported realm in Keycloak
  4. Setup.env

Going to vpn.domainname.io it directs to Keycloak login, on Keycloak login the user can choose to login with Github and will be directed to Github. User successfully gets directed from Github back to the application, vpn.domainname.io/peers. The /peers page will keep loading indefinitely and there are not many errors to be found.

What I did find was a CORS related error in the browser’s developer tools, network tab:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at `vpn.domainname.io:33073/api/users`. (Reason: CORS request did not succeed). Status code: (null).

I am using the latest netbird version for self hosting with docker-compose setup. I have filled in the setup.env file and used configure.sh to generate the docker-compose file.
There is no other VPN software installed on these servers, nor my client.

I have no issue providing anonymized logs if someone could explain what command to run and in which container, dashboard, management.

My main question now being, how do I enable or add the cors-allow-origin header with the correct URI? Or is there something else that I am missing.

Nevermind the problem is not CORS, I had the audience set wrong. But now I still get errors:

2025-10-21T16:16:49Z ERRO [requestID: ece1918a-ac0f-4970-a436-8fe21fef3ff4, context: HTTP] management/server/http/middleware/auth_middleware.go:69: Error when validating JWT: token could not be parsed: token is unverifiable: error while executing keyfunc: unable to find appropriate key

Kind of at a loss. The whole setup from documentation does not work for me. The backend does not accept requests or something.

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

Kind regards