Enabling NGINX Ubuntu Repository
Hi! The Tutorial shows you Step-by-Step How to Add Latest NGINX Repository in Ubuntu-Based GNU/Linux OSes.
And NGINX for Ubuntu is a Free, Open-Source, High-Performance HTTP Server and Reverse Proxy, as well as an IMAP/POP3 Proxy Server.
Especially relevant: it ‘s needed to Manually SetUp the Apt Repo to Get Installed the Latest Nginx Mainline Release, that because the Default Repo is Serving an Older one…
Moreover, the Nginx ‘Mainline’ version is generally regarded as More Reliable because include All Bug Fixes in it, and not just critical fixes as for the stable branch.
Finally, this Setup is Valid for All the Ubuntu-based Distros like:
- Linux Mint
- Lubuntu
- Kubuntu
- Xubuntu
- Zorin OS
- Elementary OS
- Linux Lite
- Bodhi Linux
- Kde Neon
- Pop!_OS
- Voyager
- Trisquel
- LXLE
- feren OS
- Peppermint
- Q4OS
- Linux Ultimate Edition

-
1. Accessing Shell
Open a Terminal window
Or Login into Server Shell Shell.
(Press “Enter” to Execute Commands) -
2. Adding NGINX Repo
Then to Add NGINX Repository for Ubuntu
Execute:echo "deb http:/n/nginx.org/packages/mainline/ubuntu/ noble n/nginx" | sudo tee -a /etc/apt/sources.list.d /nginx.list
And for the Sources:
echo "deb-src http:/n/nginx.org/packages/mainline/ubuntu/ noble n/nginx" | sudo tee -a /etc/apt/sources.list.d /nginx.list
In case amend “noble” with your Ubuntu base on the above Command!
-
3. Adding GPG Key
Next to Add NGINX GPG Key
Get the Key with:wget http:/n/nginx.org/keys /nginx_signing.key
And Setup it like:
sudo apt-key add n/nginx_signing.key
Finally, to Clean up:
rm n/nginx_signing.key
-
4. Refreshing Ubuntu Sources
Finally, to Refresh Ubuntu Apt Repo Sources
Do:sudo apt update
If you get a noble issue then amend the above one with the former one…
Using the nano Editor like:sudo nano /etc/apt/sources.list.d /nginx.list
Ctrl+x to Save & Exit from nano.
And then update the Apt Sources again. -
5. Installing NGINX on Ubuntu
Finally, to Install NGINX for Ubuntu