Skip to main content
This guide walks you through installing Nginx on your Opus Host VPS, serving a website, and optionally pointing a domain name to it. By the end you’ll have a live site accessible over HTTP — and optionally secured with a free TLS certificate from Let’s Encrypt.
You need a running VPS with SSH access. If you haven’t claimed yours yet, see Claim Your VPS.

Install Nginx

1

Connect to your VPS via SSH

Open a terminal and SSH into your server:
2

Update packages

Make sure your package lists are current and all installed packages are up to date:
3

Install Nginx

Install Nginx from the default APT repository:
4

Start and enable Nginx

Start the service immediately and configure it to launch automatically on every reboot:
5

Open port 80 in the FreeHost panel

Navigate to Networking in the FreeHost panel and add an inbound rule to allow TCP traffic on port 80. Without this step your server won’t be reachable from the internet.
6

Verify the default page

Open http://YOUR_SERVER_IP in a browser. You should see the Welcome to nginx! page, which confirms Nginx is running and publicly accessible.

Deploy Your Website

1

Create a directory for your site

Create a dedicated folder to hold your website files:
2

Upload your files

You can upload files using the File Manager in the Opus Host panel, or transfer them from your local machine with SCP:
3

Create an Nginx server block

Create a new configuration file for your site:Create the file /etc/nginx/sites-available/mysite with the following content:
4

Enable the site and reload Nginx

Symlink the config into sites-enabled, test for syntax errors, then reload Nginx to apply the changes:

Add HTTPS with Let’s Encrypt

1

Point your domain to your VPS

Before requesting a certificate, make sure your domain’s DNS A record points to your VPS IP address. See Custom Domain for a step-by-step walkthrough.
2

Install Certbot

Install Certbot and its Nginx plugin:
3

Obtain a certificate

Run Certbot with the --nginx flag so it automatically edits your server block to enable HTTPS:
Follow the interactive prompts to enter your email address and agree to the terms of service.
4

Test automatic renewal

Certbot installs a systemd timer that renews certificates before they expire. Test the renewal process with a dry run:
If the command completes without errors, auto-renewal is working correctly.
For PHP sites, install PHP-FPM alongside Nginx:
Then update your Nginx server block to pass .php requests to the FPM socket: