Skip to content

eventdb uses local SQLite even when PostgreSQL is configured #3759

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
5 tasks
yubin-lin1996 opened this issue Apr 29, 2025 · 0 comments
Open
5 tasks

eventdb uses local SQLite even when PostgreSQL is configured #3759

yubin-lin1996 opened this issue Apr 29, 2025 · 0 comments

Comments

@yubin-lin1996
Copy link

Describe the problem

When deploying the self-hosted NetBird management service in a Kubernetes environment, and configuring PostgreSQL as the storage backend (via NETBIRD_STORE_TYPE=postgres and NETBIRD_STORE_ENGINE_POSTGRES_DSN=...), the main database works correctly with PostgreSQL.

However, even in this setup, a local event.db SQLite file is still created inside the management container's filesystem. This suggests that the event database (eventDB) does not follow the same configuration and silently defaults to SQLite.

This behavior becomes problematic in production Kubernetes deployments, where container filesystems are ephemeral. As a result, whenever the manager Pod is restarted, the event.db file is lost, and with it, any events or logs stored in it. This leads to a loss of observability and historical data, which is critical for auditing and debugging purposes in production environments.

To Reproduce
Deploy netbird/management with NETBIRD_STORE_TYPE=postgres and NETBIRD_STORE_DATA_SOURCE set correctly.

Start the pod and verify PostgreSQL is used.

Observe that a local event.db file is still created in the container.

Logs do not indicate a switch to PostgreSQL for event storage.

Steps to reproduce the behavior:

Image

Expected behavior

A clear and concise description of what you expected to happen.

Are you using NetBird Cloud?

self-host NetBird's control plane.

NetBird version

0.43

Is any other VPN software installed?

no

Debug output

netbird status -dA

As well as the file created by

netbird debug for 1m -AS

We advise reviewing the anonymized output for any remaining personal information.

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?

  • 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant