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. You can achieve this manually through the script provided below.

Here are the steps to update the GeoLite2 databases:

Step 1. Switch to the infrastructure files directory:

cd netbird/infrastructure_files/

Step 2. Run the script to download the GeoLite2 databases:


After successfully running the script, two database files (geonames.db and GeoLite2-City.mmdb) are created in the netbird/infrastructure_files/ directory.

Step 3. The next step involves moving these files into our management service container.

Move the geonames.db database:

docker-compose cp geonames.db management:/var/lib/netbird/

Move the GeoLite2-City.mmdb database:

docker-compose cp GeoLite2-City.mmdb management:/var/lib/netbird/
  1. To complete the process, restart the management service to ensure that it loads the updated databases:
docker-compose restart management

This completes the upgrade process. Your GeoLite2 databases are now up-to-date. By following the guide above, your GeoLite2 databases should always be updated with the latest geolocation data.