Skip to main content

How to add Nginx as a reverse proxy

The following commands are tailored for Ubuntu/Debian systems. If you’re using a different Linux distribution, you may need to adjust package management commands accordingly (e.g., yum for CentOS, brew for macOS).
1

Install Nginx

2

Install Certbot for SSL

3

Create the Webroot Directory

4

Create a temporary Nginx config for creating SSL certificates

Make sure to change subdomain.domain.tld to your actual subdomain and ensure that it is pointed to your server’s IP address.
Edit the file /etc/nginx/sites-available/subdomain.domain.tld:
Then create the symlink:
5

Obtain SSL Certificates Using Webroot method

6

Edit the Nginx config

Edit the file /etc/nginx/sites-available/subdomain.domain.tld.
7

Generate DH Parameters

(Needed if you are using the “robust” nginx config option)
8

Test your Nginx configuration

9

Automatic reload Nginx when SSL Certificates are renewed

10

Reload Nginx

11

Done!

Your Nginx reverse proxy is now running, securely serving your Postiz instance at your subdomain.domain.tld. 🎉