Skip to content

Maxmind Integration

ruslandoga edited this page Sep 24, 2024 · 11 revisions

Warning

Using city-level databases like MaxMind's GeoLite2-City requires ~1GB more RAM.

This guide shows how to add city-level geolocation to Plausible in three easy steps!

  1. Create an account: https://www.maxmind.com/en/geolite2/signup

  2. Generate a new license key after-account-create before-generate generate after-generate

  3. Add MAXMIND_LICENSE_KEY and MAXMIND_EDITION environmental variables to your environment file restart the container.

    $ cd plausible-ce
    
    $ echo "MAXMIND_LICENSE_KEY=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" >> .env
    $ echo "MAXMIND_EDITION=GeoLite2-City" >> .env
    
    $ docker compose up -d
    $ docker compose exec plausible env | grep MAXMIND_LICENSE_KEY
    MAXMIND_LICENSE_KEY=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

Done! Now the geolocation databases would be automatically downloaded and kept up to date.

Clone this wiki locally