How to Install Nginx on Debian 10. Nginx is high performance light-weight HTTP and reverse proxy web server capable of handling large websites. This guide explains how to install Nginx and details of the installation on Debian 10.
This tutorial is tested on Google Compute Engine VM Instance running Debian 10. This setup will also work on other cloud services like AWS, DigitalOcean, etc or any VPS or Dedicated servers.
- A running system or server or a virtual machine with Debian 10
- Minimal experience in running SSH shell commands.
Start by updating the packages to the latest available version using the following commands.
sudo apt update sudo apt upgrade
Once you have all packages are up to date you can proceed to install Nginx.
Install Nginx on Debian 10
Nginx is available in the default Debian 10 repositories. So it is easy to install Nginx with just a single command.
sudo apt install nginx
Once the installation is completed, Nginx will start automatically.
Verify the Installation
To verify the status of the Nginx service you can use the
sudo systemctl status nginx
● nginx.service - The nginx HTTP and reverse proxy server Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled) Active: active (running) since Wed 2019-12-02 11:37:16 UTC; 27s ago
This indicates Nginx is up and running on your Debian 10 server.
Configure UFW/Firewall for Nginx
Debian does not install UFW by default, so you need to install it using the following command.
sudo apt install ufw
Allow connections to SSH and the ports for Nginx.
sudo ufw allow ssh sudo ufw allow 'Nginx Full'
sudo ufw enable
To check the status you can use the following command.
sudo ufw status verbose
Now you can check your browser by pointing it to your public IP address (
You will see the Nginx welcome page.
Nginx Configuration Details
- Nginx location:
- Main Nginx configuration file:
- Additional Nginx configuration files for websites:
- Enabled Nginx configuration files for websites:
- Default web root for the your website:
- Nginx error log file:
- Nginx access log file:
Become a Linux System Administrator and maintain virtual servers in a multi-user environment.
Now you have learned how to install Nginx on your Debian 10 server on any hosting platforms.
Thanks for your time. If you face any problem or any feedback, please leave a comment below.