Postgres ActivityEvent Environment Variable in setup.env Not Being Set in Docker Compose YML #2302

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

Originally created by @dparks-daxko on GitHub (Sep 23, 2025).

Describe the problem

When we set the NB_ACTIVITY_EVENT_STORE_ENGINE and NB_ACTIVITY_EVENT_POSTGRES_DSN environment variables in setup.env, these environment variables are not being set on the management container. This makes the Activity Events DB continue to use the sqlite engine. I believe the docker-compose.yml.tmpl should be updated with the two new environment variables in PR 3890 to enable Postgres.

Manually adding the missing environment variables to the management container in the docker-compose.yml file (generate from configure.sh) and restarting the container will cause it to switch to the postgres engine.

To Reproduce

Steps to reproduce the behavior:

  1. Git clone https://github.com/netbirdio/netbird.git
  2. cd netbird/infrastructure_files
  3. echo 'NB_ACTIVITY_EVENT_STORE_ENGINE=postgres' > setup.env
  4. echo 'NB_ACTIVITY_EVENT_POSTGRES_DSN="host=redacted user=redacted password=redacted dbname=redacted port=redacted' >> setup.env
  5. configure.sh

Expected behavior

I expect the NB_ACTIVITY_EVENT_STORE_ENGINE and NB_ACTIVITY_EVENT_POSTGRES_DSN environment variables to be present on the management container.

Are you using NetBird Cloud?

Self-hosted

NetBird version

0.57.1

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 @dparks-daxko on GitHub (Sep 23, 2025). **Describe the problem** When we set the `NB_ACTIVITY_EVENT_STORE_ENGINE` and `NB_ACTIVITY_EVENT_POSTGRES_DSN` environment variables in setup.env, these environment variables are not being set on the management container. This makes the Activity Events DB continue to use the sqlite engine. I believe the [docker-compose.yml.tmpl](https://github.com/netbirdio/netbird/blob/main/infrastructure_files/docker-compose.yml.tmpl#L86) should be updated with the two new environment variables in PR [3890](https://github.com/netbirdio/netbird/pull/3890) to enable Postgres. Manually adding the missing environment variables to the management container in the docker-compose.yml file (generate from configure.sh) and restarting the container will cause it to switch to the postgres engine. **To Reproduce** Steps to reproduce the behavior: 1. Git clone `https://github.com/netbirdio/netbird.git` 2. `cd netbird/infrastructure_files` 3. `echo 'NB_ACTIVITY_EVENT_STORE_ENGINE=postgres' > setup.env` 4. `echo 'NB_ACTIVITY_EVENT_POSTGRES_DSN="host=redacted user=redacted password=redacted dbname=redacted port=redacted' >> setup.env` 5. `configure.sh` **Expected behavior** I expect the NB_ACTIVITY_EVENT_STORE_ENGINE and NB_ACTIVITY_EVENT_POSTGRES_DSN environment variables to be present on the management container. **Are you using NetBird Cloud?** Self-hosted **NetBird version** `0.57.1` **Have you tried these troubleshooting steps?** - [ ] 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) - [ ] Restarted the NetBird client - [ ] Disabled other VPN software - [ ] Checked firewall settings
saavagebueno added the triage-needed label 2025-11-20 07:07:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2302