Skip to content
In-house anti-DDoS, included on VPS, game servers and web hosting · hosted in France · cancel anytime See our plans
CloudFive
Log in

01

What a reverse proxy is for

On a VPS, several web services often want the same ports: a website, a Nextcloud, an Uptime Kuma, a panel. Only one application can listen on port 443. The reverse proxy solves this: it is the only one receiving the traffic, reads the requested domain name (cloud.example.com, statut.example.com…) and forwards the request to the right service, which listens on an internal port.

It also centralises HTTPS: it holds the certificates and encrypts traffic with visitors. The services behind it do not have to manage any certificate.

Nginx Proxy Manager (NPM) is a web interface on top of the Nginx server. It suits you well if you would rather click than write configuration files. It does not replace a web server for a classic PHP site: for that, see hosting a website on a VPS. If you also want to deploy your applications from an interface, Coolify includes its own proxy: do not install both on the same VPS, they would fight over ports 80 and 443.

02

Install Nginx Proxy Manager with Docker Compose

You need a recent Linux VPS (Debian 12, Ubuntu 22.04 or 24.04), the basic settings from securing a Linux VPS, and Docker with the Compose plugin: follow installing Docker on a VPS. No other program may already listen on ports 80 and 443 (an Apache or Nginx installed with the system, for example).

Create a shared Docker network, which NPM and your other applications will join, then the service folder:

sudo docker network create proxy
sudo mkdir -p /opt/nginx-proxy-manager
cd /opt/nginx-proxy-manager
sudo nano compose.yaml

Paste this file, based on the example in the official documentation:

services:
  npm:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      - '80:80'
      - '443:443'
      - '127.0.0.1:81:81'
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
    networks:
      - proxy

networks:
  proxy:
    external: true
  • Ports 80 and 443: HTTP and HTTPS traffic. Port 80 is also used by Let's Encrypt to check that you control the domain.
  • Port 81: the administration interface. It is published here on 127.0.0.1 only: Docker writes its own filtering rules before UFW's, and a port published without this address would be open to the whole Internet, even if UFW blocks it.
  • ./data: the NPM database (SQLite by default), its settings and its logs.
  • ./letsencrypt: the certificates obtained and their private keys.

The latest tag follows the newest version. To control updates, replace it with a specific version number taken from the project's releases page. Then start the container and open the web ports in the firewall:

sudo docker compose up -d
sudo docker compose logs -f
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp

The first start can take a little while: NPM generates keys. Leave the logs with Ctrl+C.

03

First login and administrator account

Since port 81 can only be reached from the VPS, open an SSH tunnel from your computer, then go to http://localhost:8181:

ssh -L 8181:127.0.0.1:81 utilisateur@IP_DU_VPS

On the first visit, the interface asks you to create the administrator account: an email address and a password. On an older version that shows a login screen straight away, enter the default credentials given in that version's documentation, then immediately change the address and password in your profile.

  • Choose a long, unique password: this account controls all your domains and certificates.
  • Do this step right after launch, before exposing the interface any other way.
  • For another person, create a separate user with only the rights they need, rather than sharing the administrator account.
04

Create a proxy host and a Let's Encrypt certificate

Prepare DNS. At your registrar, create an A record for the subdomain (for example statut.example.com) pointing to the VPS's IPv4 address. Let's Encrypt will not issue a certificate until the name points to the server.

Connect the application to the proxy network. In the application's Compose file, add the same networks block as above, and do not publish its port: NPM will reach it over Docker's internal network, by its service or container name. For example, for an Uptime Kuma whose container is called uptime-kuma and listens on port 3001.

Create the proxy host from the hosts menu (Hosts, then Proxy Hosts, then Add Proxy Host):

  1. Details tab: the domain name (statut.example.com), the http scheme, the destination hostname (uptime-kuma) and its port (3001). Tick Block Common Exploits, and Websockets Support if the application needs it (Uptime Kuma, many panels and live consoles do).
  2. SSL tab: choose Request a new SSL Certificate, tick Force SSL to redirect HTTP to HTTPS, and HTTP/2 Support. Accept the Let's Encrypt terms, then save.

NPM obtains the certificate in a few seconds and then renews it on its own, as long as port 80 stays open and DNS points to the VPS. If the request fails, check in this order: the DNS record (dig +short statut.example.com), port 80 being open, then that no other program uses that port.

A service outside Docker: enter the machine's IP address and the service's port. A wildcard certificate (*.example.com): NPM requests it through a DNS challenge, with API access to your DNS provider. The guide installing Nextcloud on a VPS gives an example of an application that needs suitable headers and upload size behind a proxy.

05

Protect port 81, back up and update

The administration interface controls all your domains: never open it directly to the Internet. Two ways to use it day to day:

  • The SSH tunnel shown above: nothing is exposed, this is the safest method.
  • A proxy host for NPM itself: for example npm.example.com to 127.0.0.1, port 81, with a certificate. First create an access list (Access Lists) that only allows your IP addresses, or that also asks for a login, then apply it to this host. An HTTPS address with just a password remains a target: the access list adds a barrier.

If you reach the VPS through a VPN, the interface can also be reachable only through the tunnel: see installing WireGuard on a VPS.

Back up. Everything fits in the two folders data and letsencrypt. Stop the container to copy the database in a consistent state:

cd /opt/nginx-proxy-manager
sudo docker compose stop
sudo tar czf /root/npm-$(date +%F).tar.gz data letsencrypt
sudo docker compose start

Copy the archive off the VPS (scp, rsync): it contains your certificates' private keys, so protect it.

Update. Make a backup, read the release notes, then:

cd /opt/nginx-proxy-manager
sudo docker compose pull
sudo docker compose up -d
sudo docker image prune -f
06

On CloudFive

CloudFive does not offer a managed Nginx Proxy Manager: you install it yourself on a VPS, with root access. The Ryzen VPS, from €5.99 per month, is well suited:

  • an AMD Ryzen 9 9950X, with DDR5 memory and NVMe storage;
  • Docker and Docker Compose install with the official script, as nesting is enabled on our VPS (see the Docker VPS page);
  • a dedicated IPv4 address, needed to point your domains, and basic anti-DDoS protection included;
  • snapshots from the customer area, to take before an update.

The servers are in France, on our own network, monthly with no commitment, with support in French 7 days a week by ticket, on Discord and by phone. The other tiers are on the VPS page.

07

Frequently asked questions

How do I install Nginx Proxy Manager on a VPS?

Install Docker, then run the jc21/nginx-proxy-manager image with Docker Compose, with ports 80, 443 and 81 and two volumes for /data and /etc/letsencrypt. Publish port 81 on 127.0.0.1 and open the interface through an SSH tunnel to create the administrator account.

Which ports does Nginx Proxy Manager use?

Ports 80 and 443 over TCP for HTTP and HTTPS traffic, and port 81 for the administration interface. Only 80 and 443 should be open to the Internet; port 81 is protected with an SSH tunnel or an access list.

Does Nginx Proxy Manager renew certificates on its own?

Yes. Let's Encrypt certificates requested from the interface are renewed automatically, as long as port 80 stays open and the domain name still points to the VPS.

How do I point a domain to a container with Nginx Proxy Manager?

Create a DNS A record to the VPS's IP, put the container on the same Docker network as NPM, then create a proxy host with the domain name, the container name and its internal port. Then request the certificate in the SSL tab.

Can Nginx Proxy Manager and Coolify run on the same VPS?

It is not recommended: Coolify ships its own proxy, which also wants ports 80 and 443. Pick one or the other, or put them on two different VPS.

Support CloudFive AI

An answer right away, a real team behind it.

CloudFive AI answers you at any hour, in seconds. When it doesn’t know, or as soon as you ask, the team that runs the machines takes over. No offshore call centre.

  • TicketThe team replies in under 2 hours, 7 days a week.
  • CloudFive AIAt any hour, on ia.cloudfive.fr, Discord and in your customer area.
  • DiscordThe team, the AI and other customers, in the help channel.
  • Your data stays with usAI runs on our servers in France; e-mails, IPs and passwords are masked.
A ticket in the customer area: a customer’s question about a Minecraft plugin, and the CloudFive team’s reply
A real ticket in the customer area, answered by the team (demo account; shown in French).
CUSTOMER AREA · APP

Your servers.
At your fingertips.

Restart a server, watch its resources live, pay an invoice or open a ticket — and get an alert when something goes wrong.

  • The status of all your services at a glance
  • Blocked attacks, filtered traffic, monthly peak
  • A notification when a server goes down or an invoice is due

App coming soon · in the meantime, everything works in your browser at manager.cloudfive.fr

The CloudFive app: the list of your services, with their status
The CloudFive app: the home screen, your services’ status, blocked attacks and an invoice to pay