Skip to content

GeoIPupdate installation

smilebasti edited this page Dec 7, 2025 · 3 revisions

To use npmGrafStats the GeoLite2-City.mmdb is a requirement! A complete installation example is available with the docker-compose.yml file.

You can download it manually for free from your maxmind.com account or you can use their auto-updater docker-image. If you want to see the ASN of each IP add the ASN database but this is optional.

The GeoLite2-City.mmdb GeoLite2-ASN.mmdb must be in ./geolite directory.

GeoLite2-City.mmdb Auto update

Use this Docker Compose file to automatically update the GeoLite2-City.mmdb and optionaly the GeoLite2-ASN.mmdb

Set your ID and Key from your maxmind.com account.

This example assumes that your npmGrafStats container also uses the /home/docker directory

services:
  geoipupdate:
    image: maxmindinc/geoipupdate
    environment:
      - GEOIPUPDATE_ACCOUNT_ID=<replace>
      - GEOIPUPDATE_LICENSE_KEY=<replace>
      - GEOIPUPDATE_EDITION_IDS='GeoLite2-City GeoLite2-ASN'  #GeoLite2-ASN is optional
      - GEOIPUPDATE_FREQUENCY=24
    volumes:
      - /home/docker/geolite:/usr/share/GeoIP

A complete installation example is available with the docker-compose.yml file.

For original installation instructions see: https://dev.maxmind.com/geoip/updating-databases

Clone this wiki locally