Moving from Sury to nginx‑modules

Ondřej Surý retired the mainline nginx repository in summer 2025, announced the stable repository shutdown in January 2026, and removed everything in April 2026. The repo is gone. Migration is one apt transaction. Since Sury supported up to nginx 1.28 and we start at nginx 1.30, nginx will upgrade and restart. Module names and include paths differ, so review your config before reloading.

Ondřej Surý maintained the Sury nginx repository for years and made it the go-to source for nginx modules on Debian and Ubuntu. A lot of production systems ran reliably because of that work. Thank you, Ondřej.

Before you start

Check which Sury modules you currently have installed. Some of them we don't replace, and you need to handle those before switching.

List installed Sury modules
$ dpkg -l | grep -E '^ii\s+libnginx-mod-' | awk '{print $2}'

Modules we replace

These swap automatically via apt upgrade:

Modules we don't replace

If any of these are installed and in use, you need to resolve them before migrating:

  • libnginx-mod-http-geoip: GeoIP v1. MaxMind killed the database in 2018. Migrate to nginx-module-geoip2 and a GeoLite2 database.
  • libnginx-mod-http-lua / libnginx-mod-http-ndk: Use OpenResty instead.
  • libnginx-mod-http-echo: Replace with return 200 "text"; in your nginx config.
  • libnginx-mod-http-image-filter, perl, xslt: Available from the official nginx.org repository.
  • libnginx-mod-http-uploadprogress, libnginx-mod-http-upstream-fair, libnginx-mod-http-auth-pam: Not currently available. If any are critical for you, open an issue on GitHub with a maintainer attached.
Important: If you proceed with modules listed above still active in your config, nginx will likely fail to start after the migration. Remove the load_module directives for those modules first, or have a plan for them.

Back up your config (optional but smart)

Backup nginx config
$ sudo tar czf /root/nginx-config-backup-$(date +%Y%m%d).tar.gz /etc/nginx/

Run the migration

This removes Sury's nginx source, adds ours, and upgrades in a single transaction.

If you use Sury for PHP packages as well, use the targeted removal instead of the blanket one. Leave the Sury PHP source alone.

Full migration
# Remove Sury's nginx source
# If you use Sury for PHP too, only remove the nginx-specific file
sudo rm -f /etc/apt/sources.list.d/sury-nginx.list

# Add Blendbyte
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://apt.blendbyte.net/nginx/blendbyte-archive-keyring.gpg \
  | sudo tee /etc/apt/keyrings/blendbyte.gpg >/dev/null

echo "deb [signed-by=/etc/apt/keyrings/blendbyte.gpg] https://apt.blendbyte.net/nginx $(lsb_release -cs) main" \
  | sudo tee /etc/apt/sources.list.d/blendbyte.list

# Optional: pin to avoid conflicts with other module sources
cat <<EOF | sudo tee /etc/apt/preferences.d/blendbyte-nginx
Package: nginx-module-*
Pin: origin apt.blendbyte.net
Pin-Priority: 1001
EOF

# Run the upgrade (apt replaces Sury packages with ours in one transaction)
sudo apt update && sudo apt upgrade

Verify it worked

Verify
$ sudo nginx -t && sudo systemctl reload nginx
$ sudo tail -20 /var/log/nginx/error.log

nginx -t should report test is successful. Check the error log for anything unexpected. If nginx is running cleanly, you're done.

Rolling back

The Sury repo has been fully removed, so rolling back to it is not an option. If something goes wrong, restore your nginx config from the backup you made above and open an issue on GitHub with your distro, nginx version, and the error output.

Something go wrong? Open an issue on GitHub with your distro, nginx version, and the error output. Migration issues get priority.