Sign inSign up

letstool/http2geoip

By letstool

Updated 4 months ago

Fast & lightweight HTTP gateway that serves IP geolocation database as a JSON REST API.

Image
Networking
API management
Web servers
0

1.4K

letstool/http2geoip repository overview

http2geoip

Lightweight HTTP gateway that geolocates IP addresses through a JSON REST API.

Send a POST /api/v1/geoip request, get geographic data back as structured JSON. Supports single and batch IP lookups (IPv4 and IPv6), with localized country and continent names in 7 languages. The database is downloaded from MaxMind on startup and refreshed daily — or synced from another http2geoip instance in peer mode.

The binary embeds a web UI (dark/light mode, 15 languages) and an OpenAPI 3.1 spec — no external files, no runtime dependencies beyond the mmdb database.

Quick start

docker run -p 8080:8080 \
  -v ./db:/data \
  -e GEOIP_DB_URL="https://<user>:<license_key>@download.maxmind.com/geoip/databases/GeoLite2-City/download?suffix=tar.gz" \
  letstool/http2geoip:latest

Open http://localhost:8080 to use the web UI, or query the API directly:

curl -s -X POST http://localhost:8080/api/v1/geoip \
  -H "Content-Type: application/json" \
  -d '{"ip":"8.8.8.8","lang":"en"}' | jq

Configuration

CLI flagEnvironment variableDefault
-listenGEOIP_LISTEN_ADDR127.0.0.1:8080
-db-urlGEOIP_DB_URL(none)
-db-dirGEOIP_DB_DIR/data
-update-hourGEOIP_UPDATE_HOUR02:00
-max-ipsGEOIP_MAX_IPS100

CLI flags take priority over environment variables.

docker run -p 8080:8080 \
  -v ./db:/data \
  -e GEOIP_DB_URL="https://<user>:<key>@download.maxmind.com/geoip/databases/GeoLite2-City/download?suffix=tar.gz" \
  -e GEOIP_LISTEN_ADDR=0.0.0.0:8080 \
  -e GEOIP_UPDATE_HOUR=03:00 \
  -e GEOIP_MAX_IPS=500 \
  letstool/http2geoip:latest

Peer mode

If you already have a running http2geoip instance, other containers can sync their database from it directly — no MaxMind account required on the peers:

docker run -p 8080:8080 \
  -e GEOIP_DB_URL=http://primary-geoip-host:8080 \
  letstool/http2geoip:latest

Repo

https://github.com/letstool/http2geoip


License

This project is licensed under the Apache License, Version 2.0.

Copyright (c) 2026 letstool.net

See also

ProjectGitHubDocker HubDescription
http2dnsletstool/http2dnsletstool/http2dnsFast & lightweight HTTP gateway that serves DNS queries as a JSON REST API
http2whoisletstool/http2whoisletstool/http2whoisFast & lightweight HTTP gateway that serves WHOIS queries as a JSON REST API
http2rdapletstool/http2rdapletstool/http2rdapFast & lightweight HTTP gateway that serves RDAP queries as a JSON REST API
http2geoipletstool/http2geoipletstool/http2geoipFast & lightweight HTTP gateway that serves IP geolocation database as a JSON REST API
http2certletstool/http2certletstool/http2certFast & lightweight HTTP gateway that serves X.509 certificate inspection as a JSON REST API
http2torletstool/http2torletstool/http2torFast & lightweight HTTP gateway that serves Tor IP database as a JSON REST API
http2sunletstool/http2sunletstool/http2sunFast & lightweight HTTP gateway that serves solar position algorithm as a JSON REST API
http2macletstool/http2macletstool/http2macFast & lightweight HTTP gateway that serves MAC address OUI database as a JSON REST API
http2countryletstool/http2countryletstool/http2countryFast & lightweight HTTP gateway that serves country database as a JSON REST API
http2prefixletstool/http2prefixletstool/http2prefixFast & lightweight HTTP gateway that serves Internet BGP routing database as a JSON REST API
http2registryletstool/http2registryletstool/http2registryFast & lightweight HTTP gateway that serves RIR/NIR Internet registry database as a JSON REST API

Tag summary

Content type

Image

Digest

sha256:fdb247c05

Size

3 MB

Last updated

4 months ago

docker pull letstool/http2geoip