Migration guide
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.
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.
$ dpkg -l | grep -E '^ii\s+libnginx-mod-' | awk '{print $2}' Modules we replace
These swap automatically via apt upgrade:
-
libnginx-mod-http-brotli-filter→nginx-module-brotli -
libnginx-mod-http-brotli-static→nginx-module-brotli-static -
libnginx-mod-http-geoip2→nginx-module-geoip2 -
libnginx-mod-stream-geoip2→nginx-module-stream-geoip2 -
libnginx-mod-http-headers-more-filter→nginx-module-headers-more -
libnginx-mod-http-subs-filter→nginx-module-substitutions -
libnginx-mod-http-cache-purge→nginx-module-cache-purge -
libnginx-mod-http-fancyindex→nginx-module-fancyindex -
libnginx-mod-http-dav-ext→nginx-module-dav-ext
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 withreturn 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.
load_module
directives for those modules first, or have a plan for them.
Back up your config (optional but smart)
$ 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.
# 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
$ 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.