Linux Mint

How to Install NGINX on Linux Mint 21

In the Linux system, NGINX is a free, open-source, and highly scalable web server based on an asynchronous and event-driven structure. It performs different functions like reverse proxy, load balancing, web serving, media streaming, and HTTP cache serving. It was primarily designed for web serving only but later extended its services.

It is a high-performance HTTP server that top-ranked companies use. Also, it is adopted by most Linux users because of its rich features like stability, simple configuration, and high performance.

How to Install NGINX on Linux Mint 21

Update the Linux Mint system repository to upgrade and refresh all the packages up-to-date. This ensures that system will install the latest update of the required application:

$ sudo apt update

In the next move, execute the installation command to install the NGINX server on Linux Mint 21 system. It would be done using the mentioned command:

$ sudo apt install nginx

Confirm its installation and check if the system has installed the latest update of NGINX server:

$ nginx -v

Start the NGINX service with the help of command:

$ sudo systemctl start nginx

You can also enable to let the service start automatically:

$ sudo systemctl enable nginx

Now, check the status of NGINX service for further configuration:

$ sudo systemctl status nginx

Active status shows that you can configure NGINX service.

UFW Configuration

Enable the firewall by the following command:

$ sudo ufw enable

List down the available applications for the firewall using the command:

$ sudo ufw app list

Now, allow the server to enable HTTP (Port 80) and HTTPS (Port 443). It would be done using the NGINX Full command:

$ sudo ufw allow ‘Nginx FULL’

To adopt the changes, we have given to ufw service, reload the firewall through the command:

$ sudo ufw reload

Confirm the firewall rules we have updated above by using the status command:

$ sudo ufw status

Now, test the NGINX server its working by assigning your IP address if it works properly:

$ curl -i

How to Remove NGINX on Linux Mint 21

You can also remove it by typing the mentioned command:

$ sudo apt autoremove nginx --purge


Nginx software is a web-based server used for HTTP cache serving, media streaming, web serving, email proxy and reverse proxy. It is famous among Linux users because of its notable features like high performance, load balancing, stability, and many more.

This guide has mentioned a detailed guide on how to install the Nginx server on Linux Mint. We have seen a step-by-step process to install it. Moreover, the details configuration setup is also mentioned in this guide.

About the author

Syeda Wardah Batool

I am a Software Engineer Graduate and Self Motivated Linux writer. I also love to read latest Linux books. Moreover, in my free time, i love to read books on Personal development.