netbird self-hosted, Installation of control server fails due to connection problems of Zitadel to postgres #2413

Open
opened 2025-11-20 07:09:29 -05:00 by saavagebueno · 3 comments
Owner

Originally created by @rbasche on GitHub (Oct 25, 2025).

The installation skript bash getting-started-with-zitadel.sh fails on Ubuntu LTS 24.04:

Use Postgres as default Zitadel database.
For using CockroachDB please the environment variable 'export ZITADEL_DATABASE=cockroach'.
Rendering initial files...

Starting Zitadel IDP for user management


[+] Running 4/4
 ✔ zitadel Pulled                                                                              2.9s 
   ✔ 4ddcc5bed8d8 Pull complete                                                                0.4s 
   ✔ e14e515b84e5 Pull complete                                                                0.5s 
   ✔ 8579c47e7b22 Pull complete                                                                2.0s 
[+] Running 4/4
 ✔ Network netbird_netbird      Created                                                        0.1s 
 ✔ Container netbird-zdb-1      Healthy                                                        6.1s 
 ✔ Container netbird-caddy-1    Started                                                        0.6s 
 ✔ Container netbird-zitadel-1  Started                                                        6.2s 

Initializing Zitadel with NetBird's applications

Waiting for Zitadel's PAT to be created  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .^C

The log output shows:

zitadel-1  | time="2025-10-25T21:28:40Z" level=info msg="initialization started" caller="/home/runner/work/zitadel/zitadel/cmd/initialise/init.go:75"
zdb-1      | 2025-10-25 21:28:40.141 UTC [131] FATAL:  password authentication failed for user "root"
zdb-1      | 2025-10-25 21:28:40.141 UTC [131] DETAIL:  Connection matched file "/var/lib/postgresql/data/pg_hba.conf" line 128: "host all all all scram-sha-256"
zitadel-1  | time="2025-10-25T21:28:40Z" level=fatal msg="unable to initialize the database" caller="/home/runner/work/zitadel/zitadel/cmd/initialise/init.go:68" error="failed to connect to `user=root database=postgres`: 172.18.0.3:5432 (zdb): failed SASL auth: FATAL: password authentication failed for user \"root\" (SQLSTATE 28P01)"
zitadel-1 exited with code 1 (restarting)

To Reproduce

Follow the suggested installation process

Expected behavior

Installation finishes without errors

Are you using NetBird Cloud?

No, it is the installation attempt for the self-hosted control server

NetBird version

latest

Is any other VPN software installed?

No

Debug output

see log excerpts above

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

Have you tried these troubleshooting steps?

  • [ x] Reviewed client troubleshooting (if applicable)
  • Checked for newer NetBird versions
  • [ x] Searched for similar issues on GitHub (including closed ones)
  • Restarted the NetBird client
  • Disabled other VPN software
  • [ x] Checked firewall settings
Originally created by @rbasche on GitHub (Oct 25, 2025). The installation skript bash getting-started-with-zitadel.sh fails on Ubuntu LTS 24.04: ``` Use Postgres as default Zitadel database. For using CockroachDB please the environment variable 'export ZITADEL_DATABASE=cockroach'. Rendering initial files... Starting Zitadel IDP for user management [+] Running 4/4 ✔ zitadel Pulled 2.9s ✔ 4ddcc5bed8d8 Pull complete 0.4s ✔ e14e515b84e5 Pull complete 0.5s ✔ 8579c47e7b22 Pull complete 2.0s [+] Running 4/4 ✔ Network netbird_netbird Created 0.1s ✔ Container netbird-zdb-1 Healthy 6.1s ✔ Container netbird-caddy-1 Started 0.6s ✔ Container netbird-zitadel-1 Started 6.2s Initializing Zitadel with NetBird's applications Waiting for Zitadel's PAT to be created . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .^C ``` The log output shows: ``` zitadel-1 | time="2025-10-25T21:28:40Z" level=info msg="initialization started" caller="/home/runner/work/zitadel/zitadel/cmd/initialise/init.go:75" zdb-1 | 2025-10-25 21:28:40.141 UTC [131] FATAL: password authentication failed for user "root" zdb-1 | 2025-10-25 21:28:40.141 UTC [131] DETAIL: Connection matched file "/var/lib/postgresql/data/pg_hba.conf" line 128: "host all all all scram-sha-256" zitadel-1 | time="2025-10-25T21:28:40Z" level=fatal msg="unable to initialize the database" caller="/home/runner/work/zitadel/zitadel/cmd/initialise/init.go:68" error="failed to connect to `user=root database=postgres`: 172.18.0.3:5432 (zdb): failed SASL auth: FATAL: password authentication failed for user \"root\" (SQLSTATE 28P01)" zitadel-1 exited with code 1 (restarting) ``` **To Reproduce** Follow the suggested installation process **Expected behavior** Installation finishes without errors **Are you using NetBird Cloud?** No, it is the installation attempt for the self-hosted control server **NetBird version** `latest` **Is any other VPN software installed?** No **Debug output** see log excerpts above **Screenshots** If applicable, add screenshots to help explain your problem. **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) - [ ] Checked for newer NetBird versions - [ x] Searched for similar issues on GitHub (including closed ones) - [ ] Restarted the NetBird client - [ ] Disabled other VPN software - [ x] Checked firewall settings
saavagebueno added the triage-needed label 2025-11-20 07:09:29 -05:00
Author
Owner

@xp1ode commented on GitHub (Oct 29, 2025):

I'm having the same issue.

@xp1ode commented on GitHub (Oct 29, 2025): I'm having the same issue.
Author
Owner

@joshuanj commented on GitHub (Oct 30, 2025):

I had this issue and was able to resolved it.

If you are attempting to re-run the installation script after a failed attempt, you have to remove:

  1. the associated docker volumes that were initialized for the database, and
  2. configuration files created by the setup script.

In my case, the newly created configuration files specified a new database password, while the previously attempt initialized a database using a previous password. Re-running the install script twice, provided detailed instructions for resetting the host.

docker compose down --volumes
Then delete the configuration files.

@joshuanj commented on GitHub (Oct 30, 2025): I had this issue and was able to resolved it. If you are attempting to re-run the installation script after a failed attempt, you have to remove: 1. the associated docker volumes that were initialized for the database, and 2. configuration files created by the setup script. In my case, the newly created configuration files specified a new database password, while the previously attempt initialized a database using a previous password. Re-running the install script twice, provided detailed instructions for resetting the host. `docker compose down --volumes` Then delete the configuration files.
Author
Owner

@xp1ode commented on GitHub (Oct 30, 2025):

I had this issue and was able to resolved it.

If you are attempting to re-run the installation script after a failed attempt, you have to remove:

1. the associated docker volumes that were initialized for the database, and

2. configuration files created by the setup script.

In my case, the newly created configuration files specified a new database password, while the previously attempt initialized a database using a previous password. Re-running the install script twice, provided detailed instructions for resetting the host.

docker compose down --volumes Then delete the configuration files.

This worked perfect, netbird is up and running on my VPS. Thank you so much for the help. I had been struggling for quite a bit.

@xp1ode commented on GitHub (Oct 30, 2025): > I had this issue and was able to resolved it. > > If you are attempting to re-run the installation script after a failed attempt, you have to remove: > > 1. the associated docker volumes that were initialized for the database, and > > 2. configuration files created by the setup script. > > > In my case, the newly created configuration files specified a new database password, while the previously attempt initialized a database using a previous password. Re-running the install script twice, provided detailed instructions for resetting the host. > > `docker compose down --volumes` Then delete the configuration files. This worked perfect, netbird is up and running on my VPS. Thank you so much for the help. I had been struggling for quite a bit.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2413