What It Does
Each site you add is a proxy host: a domain name, and the address and port of the application that should answer it. Nginx Proxy Manager writes the Nginx configuration, requests and renews the certificate, and reloads Nginx for you. It suits a server with several containers or applications behind one public address. If you prefer to write the configuration by hand, see Nginx reverse proxy.
Before You Start
- Docker with Compose: see how to install Docker on Ubuntu.
- Ports 80 and 443 unused: stop any web server already listening there.
- DNS: A records for your domains pointing at the server, so certificates can be issued.
The Compose File
Create a shared network first, so other containers can join it later:
docker network create proxyThen a folder with this compose.yaml:
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:
default:
name: proxy
external: truedocker compose up -dThe data folder holds the settings database and the generated configuration; letsencrypt holds the certificates. Back up both.
Keep Port 81 Private
The admin interface is on port 81. The Compose file binds it to 127.0.0.1, which matters because ports published by Docker bypass UFW and firewalld (see Docker port mapping). Reach it through an SSH tunnel from your own computer:
ssh -L 8181:127.0.0.1:81 user@your_server_ipThen open http://localhost:8181. How tunnels work is explained in SSH port forwarding.
First Login
Since version 2.13 there is no default account: the first visit opens a setup screen where you create the administrator account. Older versions signed you in with a default account and then asked you to change it. Either way, set your own login and a strong password at once, before you add any hosts. Advanced setups can create the first account from environment variables instead, as the project's advanced configuration page describes.
Add a Proxy Host
- Open Hosts, then Proxy Hosts, and click Add Proxy Host.
- Enter the domain name, the scheme (usually http), the forward host, and the forward port.
- Turn on Websockets Support if the application uses live updates.
- Turn on Block Common Exploits.
- Save and open the domain in a browser.
For a container on the proxy network, the forward host is the container's name, for example app and port 3000; the application's own port then needs no ports: entry at all. See Docker networks.
Request a Certificate
In the SSL tab of the proxy host, choose to request a new certificate, turn on Force SSL and HTTP/2 support, accept the Let's Encrypt terms, and save. Port 80 must be reachable from the internet for this check. Renewal is automatic. For a wildcard certificate, use the DNS challenge with your DNS provider's API token.
Access Lists
An access list adds a login prompt, an allow list of IP addresses, or both, to a proxy host. Use one for internal tools you put behind the proxy, such as a monitoring dashboard. The login prompt is HTTP basic authentication, so only use it with HTTPS turned on.
When Something Fails
- 502 Bad Gateway: wrong forward host or port, or the application container is not on the same network.
- Certificate request fails: DNS does not point at the server yet, or port 80 is blocked.
- Logs:
docker compose logs -fshows the container's output.
Updated:
Linux VPS with Full Root Access
MUVCloud cloud servers run on KVM with Enterprise NVMe SSD storage and full root access, in Turkey, the Netherlands, and the USA.
More Guides
No Limits on Service or Support
You are not on your own as your projects grow. Our support engineers are ready 24/7, on several channels, whenever you need them.

- 100% customer satisfaction goal
- Our own hardware
- 24/7 ticket and email support
- 4 countries with locations