Nginx VPS Hosting: Your Own Nginx Server
Nginx is a web server and reverse proxy that serves static files, passes requests to application servers, terminates TLS and balances load across backends. Developers run it in front of Node, Python and PHP apps, and to serve static sites with little memory.
The one-click install puts Ubuntu 24.04's nginx package on the server together with Certbot and its Nginx plugin, enables and starts the nginx systemd service, tries to add ufw's Nginx Full rule (it does not turn ufw on), and replaces the default page at /var/www/html/index.html with a one-line "Nginx is running" page. Nginx listens on port 80. No site of yours, no proxy and no certificate is configured yet.
Ubuntu 24.04 ships Nginx 1.24.0 and delivers fixes as package updates, so the version number stays at 1.24.0. On nginx.org, 1.24 is now a legacy branch; the current stable branch is 1.30 and mainline is 1.31, as of this page's check.
What it needs
Nginx is event-driven and light: serving static files or proxying to an app uses little memory, and its docs set no hardware figures. The catalogue's minimum is 1 vCPU and 256 MB; the recommended 1 GB leaves room for the app behind it. That fits the Veloxa Nano size: 1 vCPU, 1 GB RAM and 25 GB of disk for $4 a month, billed at $0.01 an hour and capped at the monthly price. If the server outgrows it, raise memory from the console: on a container the change applies without a restart.
Sites and reverse proxying
The default site in /etc/nginx/sites-enabled/default serves /var/www/html. For your own site, write a server block to /etc/nginx/sites-available/, link it into sites-enabled, test the configuration and reload. This one proxies an app listening on port 3000:
server {
listen 80;
server_name example.com;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
ln -s /etc/nginx/sites-available/example /etc/nginx/sites-enabled/
nginx -t
systemctl reload nginx
nginx -t checks the syntax first, so a typo does not take the site down. Remove the default site with rm /etc/nginx/sites-enabled/default when you no longer need it.
Reaching it on VeloxaHost
Every server gets a block of ports (10 by default) on the region's shared IPv4 address. The first forwards to SSH; under How to connect on the server's page, forward another to port 80 and open http://<shared address>:<port>.
For a domain with HTTPS, use a dedicated IPv4 address (a paid add-on with limited availability) and point the domain's DNS at it. Certbot, already installed, then gets a Let's Encrypt certificate and writes the HTTPS settings into your server block; it validates over port 80, which is why it needs the dedicated address:
certbot --nginx -d example.com
Certbot's docs say most installations set up automatic renewal; systemctl list-timers shows whether a renewal timer is there. IPv6 is not available in US East yet.
Backups and updates
Your sites live in /var/www, the configuration in /etc/nginx and, once you use Certbot, certificates in /etc/letsencrypt. Turn on automatic snapshots on the server page (hourly up to weekly, kept for 1 to 30 days) or scheduled backups (every 6 hours up to weekly, keeping 1 to 10); both capture these folders with the rest of the disk.
To update Nginx and Certbot, take a snapshot, then run apt update && apt upgrade from the browser terminal.
FAQ
Can Nginx sit in front of other one-click apps?
Yes, on the same server: install the app, then proxy to its port as above. Servers cannot reach each other over the host's bridge, so a backend on another server has to be reached through that server's own forwarded port on the shared address.
Nginx or Apache?
Both serve static sites and proxy apps. Apache reads per-directory .htaccess files, which many PHP applications ship; Nginx keeps every rule in its own configuration. For routing several apps by host name with automatic discovery, there is also Traefik.
Why is the certificate request failing?
Let's Encrypt's HTTP check connects to port 80 on the domain. On the shared IPv4 address only your forwarded ports are reachable, so request certificates once the domain points at a dedicated IPv4 address.
What license is Nginx under?
Nginx is released under the 2-clause BSD license.
Which VeloxaHost size fits Nginx?
The recommended 1 vCPU and 1 GB of RAM is a Veloxa Nano: 1 vCPU, 1 GB RAM and 25 GB of disk for $4 a month, billed at $0.01 an hour and capped at that price.