Download and add the latest GeoLite2-City database to the repository. Use this when asked to update the GeoLite2 database or when a newer version is needed.
Follow these steps to update the GeoLite2-City MMDB database in this repository.
List the current database files to identify the latest version already present:
ls -lh *.mmdb
Fetch the latest release tag from the P3TERX/GeoLite.mmdb GitHub mirror:
curl -sI "https://github.com/P3TERX/GeoLite.mmdb/releases/latest" | grep -i location | sed 's/.*tag\///' | tr -d '\r'
If the latest release is already present in the repo, stop and inform the user that the database is up to date.
Download the latest GeoLite2-City.mmdb. Replace TAG with the value from step 2 (e.g., 2026.02.16). Convert dots to hyphens for the filename (e.g., 2026.02.16 → GeoLite2-City-2026-02-16.mmdb):
curl -L -o "GeoLite2-City-YYYY-MM-DD.mmdb" "https://github.com/P3TERX/GeoLite.mmdb/releases/download/TAG/GeoLite2-City.mmdb"
Check that the file is a valid MMDB and has a reasonable size (should be ~50MB+):
file GeoLite2-City-*.mmdb
ls -lh GeoLite2-City-*.mmdb
All files should report as "data" or similar binary format. If a file reports as HTML or is suspiciously small, the download failed — retry or report the error.
Also verify the SHA256 checksum against the published value from the mirror:
curl -L -o "GeoLite2-City.mmdb.sha256sum" "https://github.com/P3TERX/GeoLite.mmdb/releases/download/TAG/GeoLite2-City.mmdb.sha256sum"
sha256sum -c GeoLite2-City.mmdb.sha256sum
rm GeoLite2-City.mmdb.sha256sum
If the checksum does not match, delete the downloaded file and retry. Do not commit an unverified database.
Confirm git-lfs is installed and tracking .mmdb files:
git lfs install
cat .gitattributes
git lfs status
The .gitattributes file must contain: *.mmdb filter=lfs diff=lfs merge=lfs -text
Update the database table in README.md:
git checkout -b task/update-geolite2-db-YYYY-MM-DD
git add *.mmdb .gitattributes README.md
git commit -m "chore: update GeoLite2-City database to YYYY-MM-DD"
git push origin task/update-geolite2-db-YYYY-MM-DD
Open a PR targeting the default branch for the Chaos Monkeys team (@fulcrumapp/chaos-monkeys) to review.
*.mmdb files are tracked by git-lfs. Never commit them without git-lfs enabled.GeoLite2-City-YYYY-MM-DD.mmdb with hyphens, not dots.