Prerequisites
- Docker and Docker Compose installed
- Ports 80 and 443 forwarded to the host (or a Cloudflare proxy in front)
- A domain name
01The Compose file
Pinned version: updates happen when you decide (2.16.0 is the latest release at the time of writing). Two volumes keep the configuration and the certificates.
services:
app:
image: 'jc21/nginx-proxy-manager:2.16.0'
restart: unless-stopped
ports:
- '80:80' # public HTTP
- '443:443' # public HTTPS
- '81:81' # admin interface: LAN only
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt02First login
Start the stack, then open the interface on port 81. The first start can take a few minutes. Set your own admin credentials immediately, and never publish port 81 on the Internet: no forward, no proxy host to it without authentication.
docker compose up -d03Publish a service
Hosts › Proxy Hosts › Add: the domain name, then the service’s internal address and port. Tick “Websockets Support” for applications that need it, and “Block Common Exploits” to filter obviously malicious requests.
SSL tab: request a Let’s Encrypt certificate and enable “Force SSL”. Behind Cloudflare, prefer the DNS challenge option, which needs no open port, and a wildcard certificate shared by every host.
04Restrict access
Access Lists: an access list combines allowed addresses (the local network, the VPN) and optionally HTTP authentication. Attached to an admin host, it keeps it from being reachable by the whole Internet, even if its name is public.
Key takeaways
- Pinned version, controlled updates.
- Port 81: never exposed.
- One proxy host per domain name, HTTPS forced.
- Access Lists in front of anything that administers.