Moving from Sury to nginx‑modules

The Sury nginx repo is gone. Ondřej closed the stable repo in April 2026 and that's that. The good news: migration is a single apt transaction. The small catch: Sury topped out at nginx 1.28 and we start at nginx 1.30, so nginx will upgrade and restart. Module names and include paths are different too, so read your config before you reload.

This migration switches you from Sury's nginx to nginx.org's nginx. Sury built their own nginx binary. Our modules are built against nginx.org's, and the two are not compatible. The migration script below handles adding the nginx.org repo and upgrading nginx as part of the same transaction.
Ondřej Surý ran the Sury nginx repo for years and a huge chunk of production nginx on Debian and Ubuntu ran on it. Lot of reliable systems because of that work. Thank you, Ondřej.

Before you start

Check what Sury modules you have installed. Some we don't replace, and you need a plan for those before you pull the trigger.

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

Modules we replace

These swap in automatically with apt upgrade:

Modules we don't replace

Still running any of these? Sort them out first or nginx won't start after the swap:

  • libnginx-mod-http-geoip: GeoIP v1. MaxMind killed that database in 2018. Move to nginx-module-geoip2 and a GeoLite2 database.
  • libnginx-mod-http-lua / libnginx-mod-http-ndk: Use OpenResty. It's what you actually want anyway.
  • libnginx-mod-http-echo: Just use return 200 "text"; in your nginx config. You don't need a module for that.
  • libnginx-mod-http-image-filter, perl, xslt: These come from the official nginx.org repository. Grab them there.
  • libnginx-mod-http-uploadprogress, libnginx-mod-http-upstream-fair, libnginx-mod-http-auth-pam: Not available here. If you need one of these, open an issue on GitHub and bring a maintainer.
Heads up: If any of the modules above are still in your nginx config when you migrate, nginx won't start. Remove the load_module directives for them first, or sort out replacements before switching.

Back up your config (optional, but do it anyway)

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

Run the migration

Removes Sury's nginx source, adds nginx.org and Blendbyte, upgrades everything in one shot.

If you also use Sury for PHP, only remove the nginx-specific source file. Don't touch the PHP one.

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 nginx.org stable repo (replaces Sury's nginx binary)
curl https://nginx.org/keys/nginx_signing.key \
  | gpg --dearmor \
  | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null

DISTRO=$(. /etc/os-release && echo "$ID")
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \
http://nginx.org/packages/${DISTRO} $(lsb_release -cs) nginx" \
  | sudo tee /etc/apt/sources.list.d/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 everything's happy

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

nginx -t should say test is successful. Scan the error log for anything weird. If it's all clean, you're done. Go do something else.

Rolling back

The Sury repo is gone, so there's nothing to roll back to. If something breaks, restore your nginx config from the backup and open an issue on GitHub with your distro, nginx version, and the error output.

Something went sideways? Open an issue on GitHub with your distro, nginx version, and the error output. Migration issues get looked at first.