How to install latest Nginx on Debian 8

SystemMen - In this article, I will show you how to install the latest Nginx on Debian 8. By default, for Debian 8, you will install Nginx 1.6.x. So if you want to use the latest Nginx version then how? This article will show you how to do it.

Add repository for Nginx

The operating system version I am using is Debian 8.10, its code name is Jessie. By default, Debian 8.x has Nginx 1.6.x support in its repository. But here, I’m talking about wanting to use Nginx latest version.

First, we need to add Nginx’s repository to the server. You open the file /etc/apt/sources.list and add the following 2 lines of code to the file.

deb jessie nginx
deb-src jessie nginx
how-to-install-latest-nginx-on-debian-8-01 How to install latest Nginx on Debian 8
Add Nginx’s repository to the server Debian 8.

Next, you need to download the Nginx key and add it to the Debian 8 server. To download the key, type the following command.


Then, you type the following command to add the key to the server.

apt-key add nginx_signing.key

Install the latest Nginx

And now, you can update the new packages.

apt-get update -y

To install latest nginx, you type the following command.

apt-get install nginx -y

You wait for a few minutes to finish installing Nginx.

Check the Nginx version

At this time, Nginx latest mainline version is 1.13.10 as in the image below.

how-to-install-latest-nginx-on-debian-8-02 How to install latest Nginx on Debian 8
The latest Nginx version at this time.

And now, you can check the Nginx version in your server. You type the following command.

nginx -v
how-to-install-latest-nginx-on-debian-8-03 How to install latest Nginx on Debian 8
Check the Nginx version in server Debian 8.

With this article, you can install the latest Nginx on Debian 8 easily, no trouble at all. I’ve done successful tests and hopefully you too.

«« »»