Skip to content

Configure GeoIP databases

Use the bundled country database or download GeoLite2 city and ASN databases.

Use the bundled country database by default, or add MaxMind credentials for city and ASN enrichment.

  1. For country-only geolocation, leave SUPERMETRY_GEOIP_PATH empty. Supermetry loads its bundled DB-IP Lite database.

  2. To use MaxMind GeoLite2 data, add both credentials and choose editions in the environment file.

    SUPERMETRY_MAXMIND_ACCOUNT_ID=YOUR_ACCOUNT_ID
    SUPERMETRY_MAXMIND_LICENSE_KEY=YOUR_LICENSE_KEY
    SUPERMETRY_MAXMIND_EDITIONS=GeoLite2-City,GeoLite2-ASN
    SUPERMETRY_DATA_DIR=/var/lib/supermetry

    Allowed editions are GeoLite2-City, GeoLite2-ASN, and GeoLite2-Country. Supermetry validates existing files and downloads missing editions during startup.

  3. Restart Supermetry.

    Terminal window
    sudo systemctl restart supermetry
    sudo systemctl status supermetry --no-pager
  4. To force an update later, run:

    Terminal window
    sudo -u supermetry env SUPERMETRY_ENV_FILE=/etc/supermetry/supermetry.env \
    /usr/local/bin/supermetry geoip update

    With MaxMind configured, Supermetry also checks for updates every 24 hours.

  5. Keep the geolocation credit visible in the dashboard footer. It shows IP geolocation by DB-IP.com for the bundled data or IP geolocation by MaxMind for GeoLite2 data.

What you should see: startup succeeds and the footer names the active GeoIP provider.