To enable geoblocking in Pangolin Community you must download and place the Maxmind geoip database into the config/ directory and update the config file. This can be done for free.
Remember to keep the GeoIP database updated regularly, as IP-to-country mappings can change over time. You can just repeat the download and extraction steps periodically to ensure your database is current.
It is possible to automate this process with a Docker container from Maxmind themself.
Have a look at this Community guide on how to implement this!
You can use the installer to download and place the database for you, just grab the latest installer:
curl -fsSL https://pangolin.net/get-installer.sh | bash
Then run the installer again:
Manual Installation Steps
Download and extract the GeoIP database
Download and extract the GeoLite2 Country database using the following commands:# Download the GeoLite2 Country database
curl -L -o GeoLite2-Country.tar.gz https://github.com/GitSquared/node-geolite2-redist/raw/refs/heads/master/redist/GeoLite2-Country.tar.gz
# Extract the database
tar -xzf GeoLite2-Country.tar.gz
# Move the .mmdb file to the config directory
mv GeoLite2-Country_*/GeoLite2-Country.mmdb config/
# Clean up the downloaded files
rm -rf GeoLite2-Country.tar.gz GeoLite2-Country_*
Update the Pangolin config file
Update your Pangolin configuration to point to the new GeoIP database file. Edit your config/config.yml file to include the following entry:server:
maxmind_db_path: "./config/GeoLite2-Country.mmdb"
Restart Pangolin
Restart your Pangolin instance to apply the changes: docker compose restart pangolin
Alternativly you can create an account at Maxmind to get a license key and download the database directly from them.