Connection to Postgres #2387

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

Originally created by @FlashGordon86 on GitHub (Oct 17, 2025).

I'm trying to connect my self-hosted NetBird instance (Docker) to an existing PostgreSQL database. I've successfully created the necessary database, user (netbird), and password.

I configured the connection using the NETBIRD_STORE_ENGINE_POSTGRES_DSN environment variable as described in the official documentation.

NETBIRD_STORE_ENGINE_POSTGRES_DSN="host=postgres user=netbird password=12345Test dbname=netbird port=5432"

Crucially, I'm able to connect to the PostgreSQL database from an external client using the netbird user and password, confirming the credentials themselves are correct and the database is accessible.

However, the NetBird instance is failing to connect, resulting in the following error in the PostgreSQL logs:

postgres | 2025-10-17 13:49:12.004 CEST [5125] FATAL: password authentication failed for user "netbird"
postgres | 2025-10-17 13:49:12.004 CEST [5125] DETAIL: Connection matched file "/var/lib/postgresql/18/docker/pg_hba.conf" line 14: "host all all 0.0.0.0/0 md5"

The error suggests a password authentication issue, despite the credentials working externally. The pg_hba.conf line indicates that the connection attempt is being matched to an md5 authentication requirement.

Has anyone else encountered this specific issue when connecting NetBird to PostgreSQL in a Docker environment?

Are you using NetBird Cloud?

Self hosted

NetBird version

V 0.59.6

Is any other VPN software installed?

no

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
  • [ x] Checked firewall settings
Originally created by @FlashGordon86 on GitHub (Oct 17, 2025). I'm trying to connect my self-hosted NetBird instance (Docker) to an existing PostgreSQL database. I've successfully created the necessary database, user (netbird), and password. I configured the connection using the NETBIRD_STORE_ENGINE_POSTGRES_DSN environment variable as described in the official documentation. `NETBIRD_STORE_ENGINE_POSTGRES_DSN="host=postgres user=netbird password=12345Test dbname=netbird port=5432"` Crucially, I'm able to connect to the PostgreSQL database from an external client using the netbird user and password, confirming the credentials themselves are correct and the database is accessible. However, the NetBird instance is failing to connect, resulting in the following error in the PostgreSQL logs: ``` postgres | 2025-10-17 13:49:12.004 CEST [5125] FATAL: password authentication failed for user "netbird" postgres | 2025-10-17 13:49:12.004 CEST [5125] DETAIL: Connection matched file "/var/lib/postgresql/18/docker/pg_hba.conf" line 14: "host all all 0.0.0.0/0 md5" ``` The error suggests a password authentication issue, despite the credentials working externally. The pg_hba.conf line indicates that the connection attempt is being matched to an md5 authentication requirement. Has anyone else encountered this specific issue when connecting NetBird to PostgreSQL in a Docker environment? **Are you using NetBird Cloud?** Self hosted **NetBird version** V 0.59.6 **Is any other VPN software installed?** no 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 - [-] Disabled other VPN software - [ x] Checked firewall settings
saavagebueno added the triage-needed label 2025-11-20 07:09:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2387