Guideschevron_rightServers

Servers · 7 min read · Updated

How to Install Nginx Proxy Manager on a VPS

To install Nginx Proxy Manager on a VPS, run its official jc21/nginx-proxy-manager image with Docker Compose on ports 80 and 443, keep its admin port 81 bound to the server, open the admin interface over an SSH tunnel, set up your account, then add a proxy host for each domain with a free Let's Encrypt certificate. It is a light container that fits alongside your apps on our smallest VPS (6 GB, $37.50 a month).

1. Prepare the Server

On Ubuntu 24.04, secure the server and install Docker. Point each domain you will serve at the server's IP address with an A record, and allow ports 80 and 443. Nothing else may be listening on those ports, so stop any Nginx or Apache already installed.

2. Start Nginx Proxy Manager

In ~/npm/compose.yaml:

services:
  app:
    image: 'jc21/nginx-proxy-manager:2.17.1'
    restart: unless-stopped
    environment:
      TZ: "America/New_York"
    ports:
      - '80:80'
      - '443:443'
      - '127.0.0.1:81:81'      # admin interface, on the server only
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
cd ~/npm
docker compose up -d
docker compose logs -f app      # the first start can take a minute

The tag is the release current when this was written; use the newest from the project's setup page, and update deliberately. The official example publishes port 81 to the world; the 127.0.0.1: prefix keeps it private, which matters because Docker opens published ports past ufw (see why ufw does not block Docker ports).

3. Sign In to the Admin Interface

# on your own computer
ssh -L 8181:127.0.0.1:81 [email protected]
# then open http://localhost:8181

On the first visit, set up the administrator account with your own email address and a strong password, as the interface asks, and turn on two-factor authentication if your version offers it.

4. Add a Site With HTTPS

  1. Open Hosts → Proxy Hosts → Add Proxy Host.
  2. Enter the domain, the scheme the app speaks (usually http), and where it listens: for a container on the same server, its container name and port, with both containers on the same Docker network.
  3. Turn on Websockets Support for apps that need it, such as chat and dashboards.
  4. On the SSL tab, request a new Let's Encrypt certificate, and turn on Force SSL and HTTP/2. Save.

To reach other containers by name, put them on a shared network:

docker network create proxy
# then in each compose.yaml, including Nginx Proxy Manager's:
networks:
  default:
    name: proxy
    external: true

If the certificate fails, the domain usually does not point at the server yet or port 80 is blocked; see fixing certificate validation errors.

Backups and What to Run Behind It

The data and letsencrypt folders hold every host, certificate and account; back them up with the rest of the server. Good first apps behind it: Uptime Kuma, Vaultwarden, Umami and n8n. How many fit on one server is covered in how many websites a VPS can host.

Common Questions

  • What is Nginx Proxy Manager?

    A free web interface for Nginx as a reverse proxy: you add a domain, point it at an app, and it fetches and renews the Let's Encrypt certificate. It suits running several self-hosted apps on one server without editing Nginx files.

  • Nginx Proxy Manager or Caddy?

    Both give automatic HTTPS. Nginx Proxy Manager is managed in a browser, which many people find easier; Caddy is a short text file, which is easier to keep in version control and back up. Pick the one you will keep up to date.

  • Why keep port 81 private?

    Port 81 is the admin interface, from which anyone signed in can reroute every site on the server. Bind it to the server itself and reach it through an SSH tunnel, so it is never exposed to the internet.

  • Can it proxy apps on other servers?

    Yes: enter the other server's private or public address as the forward host. Between our servers in the same location, private networking keeps that traffic off the internet.

Plans and prices

VPS Plans

KVM servers with NVMe storage and full root access, built in minutes.

See all plans
  • Bronze

    3 vCPU · 6 GB RAM · 75 GB NVMe

    2 TB transfer

    $37.50/mo

    Configure inAshburnDallas
  • Silver

    4 vCPU · 8 GB RAM · 100 GB NVMe

    4 TB transfer

    $46.50/mo

    Configure inAshburnDallas
  • Gold

    6 vCPU · 12 GB RAM · 150 GB NVMe

    6 TB transfer

    $60.00/mo

    Configure inAshburnDallas
  • Diamond

    8 vCPU · 16 GB RAM · 200 GB NVMe

    8 TB transfer

    $73.50/mo

    Configure inAshburnDallas

Network port: 10 Gbps in Ashburn, VA, 50 Gbps in Dallas, TX. Pick the location when you configure.

Keep Reading

All guides