Introduction
This tutorial shows how to install Nginx on Ubuntu 26.04 LTS, confirm that the service is running, and verify that the default web page is reachable on a dedicated server.
After completing the steps, you will have a working Nginx installation that starts automatically and responds locally with the standard welcome page.
Prerequisites
- A dedicated server running dedicated server Ubuntu 26.04 LTS
- Root access or a normal administrative user with sudo privileges
- Network access to Ubuntu package repositories
Tutorial steps
Begin by refreshing the package index so Ubuntu can install the current Nginx package metadata.
sudo apt updateInstall Nginx from the default Ubuntu repositories.
sudo apt install nginxIf UFW is enabled on the server, allow the Nginx application profile so HTTP traffic can reach the web service.
sudo ufw allow 'Nginx'Enable Nginx to start automatically during boot.
sudo systemctl enable nginxVerification
Check that the Nginx service is active and loaded.
sudo systemctl status nginxConfirm that local HTTP requests return the default Nginx page headers and content.
curl -I http://localhostcurl http://localhostIf the installation succeeded, you can also confirm the package state with the system service output, which should show Nginx is installed and running. On a browser test from the server or a permitted client, the default Nginx welcome page should load.
If UFW is enabled, verify that the Nginx application profile is allowed.
sudo ufw statusThe output should list the Nginx profile as permitted when the firewall is active.
Troubleshooting
If systemctl status nginx shows that Nginx failed to start, review the unit status output for a configuration or port-binding error before making changes.
If curl http://localhost does not return the default page, confirm that Nginx is running and that no other service is already using port 80.
If remote access fails but local tests succeed, check whether the firewall profile was allowed and whether the request is reaching the dedicated server.
Rollback
If you need to remove the installation, stop and disable Nginx, then uninstall the package.
sudo systemctl stop nginxsudo systemctl disable nginxsudo apt remove nginxAfter removal, verify that the service no longer starts and that the default web page is no longer served from the server.
Conclusion
You have installed Nginx on Ubuntu 26.04 LTS, enabled it to start on boot, and verified that it serves the default page on your dedicated server. You can now confirm the service is active and that local HTTP requests return the Nginx welcome content.

