Debian 12 / 13 · amd64
Install nginx GeoIP2.
One command on your destination server. The installer adds the signed module repository and the official nginx.org repository, then installs a matching nginx and GeoIP2 module pair.
1. Run the installer
curl -fsSL https://mmdb.netcube.bg/apt/install.sh | shRun as root or a regular user. Root runs directly; otherwise authentication uses installed sudo, or falls back to su (root password). It never installs sudo. If neither is available, open a root shell (for example, su - where available) and rerun. Requires curl and an interactive terminal. This downloads and runs code as root: inspect the script first if you prefer.
It shows your installed nginx version and the proposed version, then asks [y/N]. Answer y to add both repositories and install or upgrade nginx with its matching module. Answer n to cancel.
- Missing prerequisites (
python3,ca-certificates,gnupg) require manual installation. The bootstrap stops and prints an explicit APT command, even with--yes; it never installs prerequisites automatically. - Existing nginx configuration is backed up under
/var/backups/nginx-geoip2-*. Yournginx.confand its existing include layout are preserved. - Debian's standard nginx can be migrated after confirmation. Downgrades, unrelated removals, extra Debian modules and mixed source files are refused.
- No automatic service restart, cron job or client updater.
2. Enable the module when ready
Add this once at the top level of /etc/nginx/nginx.conf, before events and http:
load_module /usr/lib/nginx/modules/ngx_http_geoip2_module.so;Configure your MMDB and GeoIP2 variables separately. Check configuration before your planned restart, especially after an nginx version change:
sudo nginx -t
# Only after a successful test, during your maintenance window:
sudo systemctl restart nginxExisting workers may still run the old binary. A vendor migration may leave the service stopped; the installer deliberately does not restart it for you.
Updates are manual
sudo apt update
sudo apt upgradeThe module depends on an exact nginx version. Old module versions remain in the archive.
Preview, legacy version and manual setup
Preview without changing repositories or nginx (prerequisites must already be installed):
curl -fsSL https://mmdb.netcube.bg/apt/install.sh -o /tmp/ip-signal-install.sh
sh /tmp/ip-signal-install.sh --dry-run
# Select the newest legacy release instead:
sh /tmp/ip-signal-install.sh --legacyFor automation, --yes explicitly approves the safe transaction without installer confirmation prompts; it does not bypass OS authentication or permit downgrades or arbitrary removals. HTTPS authenticates the bootstrap script; APT metadata and packages are verified using pinned signing keys.