Management Geolocation

Traditionally, NetBird's management system has relied on Geolocation databases. In version 0.26.0, we introduced support for posture checks. From this version onwards, NetBird uses the GeoLite2 City database from MaxMind to identify a peer's geographical location based on its IP address.

This guide outlines the steps to configure Management with the GeoLite2 database

Downloading the databases

Upon NetBird Application startup, our management checks if the GeoLite2 databases exist in its data directory. If not present, the databases will be downloaded from the following URLs:

After downloading, the management system prepares the databases for use. If the databases already exist, the system will load and utilize the existing ones.

Updating the GeoLite2 Database

The GeoLite2 databases are updated twice a week to reflect changes in geolocation data. It's crucial to keep your local GeoLite2 databases updated. When the management service is started, the service will query the Download URLs to check if the current database is outdated. If the database is outdated or does not exist, the files will be downloaded and loaded automatically. Restarting the management service will trigger the update check.

This behavior can be disabled by passing the --disable-geolite-update flag to the management command. When --disable-geolite-update is set, the service will download the geolite databases only if there is no file in the data directory. The database with the most recent date will be loaded if more than one exists. If a database does not exist, it will be downloaded and loaded, but it will not be updated on subsequent restarts of the management service.