Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/msimerson/maxmind-geolite-mirror/llms.txt

Use this file to discover all available pages before exploring further.

maxmind-geolite-mirror is a lightweight Node.js CLI tool that downloads and keeps MaxMind GeoLite2 databases up-to-date on your server. It checks whether the remote copy is newer before downloading, so running it repeatedly is safe and bandwidth-efficient.

Quickstart

Install the tool and download your first GeoLite2 databases in minutes

License Key Setup

Configure your MaxMind license key via environment variable or config file

Scheduling Updates

Automate weekly database updates with cron or a systemd timer

API Reference

Explore the public Node.js module API for programmatic use

What it does

maxmind-geolite-mirror downloads the three GeoLite2 databases — Country, City, and ASN — from MaxMind’s servers and stores them as .mmdb files on your local filesystem. On each run it sends an If-Modified-Since header, so files are only re-downloaded when MaxMind has published a new version.
1

Install the CLI globally

npm install -g maxmind-geolite-mirror
2

Set your MaxMind license key

export MAXMIND_LICENSE_KEY=your_license_key_here
3

Create the database directory

mkdir -p /usr/local/share/GeoIP
4

Run the mirror

maxmind-geolite-mirror
The tool downloads GeoLite2-Country.mmdb, GeoLite2-City.mmdb, and GeoLite2-ASN.mmdb to /usr/local/share/GeoIP/.

Key features

  • Conditional downloads — uses If-Modified-Since so only changed databases are fetched
  • Three databases — Country, City, and ASN in .mmdb format
  • Zero runtime dependencies — built entirely on Node.js built-ins (https, fs, zlib)
  • Redirect support — follows HTTP 302 redirects automatically
  • Flexible configuration — license key and database path via environment variables
A free MaxMind account and license key are required to download GeoLite2 databases. Sign up at maxmind.com to get your key.

Build docs developers (and LLMs) love