Nginx Proxy Manager: Docker One‑Click Deployment and Configuration Guide
This article explains how to quickly set up Nginx Proxy Manager with Docker, covering project goals, key features, step‑by‑step deployment, default credentials, advanced Docker network and health‑check configurations, and provides useful code snippets and screenshots for reference.
Project Goal
The aim is to provide users with a simple way to create a reverse‑proxy host with SSL termination, keeping the setup as straightforward as possible to lower the entry barrier.
Features
Elegant and secure management UI based on Tabler.
Create forwarding domains, redirects, streams, and 404 hosts without needing Nginx knowledge.
Free SSL via Let\'s Encrypt or custom SSL certificates.
Access list and basic HTTP authentication for hosts.
Advanced Nginx configuration available for super‑users.
User management, permissions, and audit logs.
Quick Setup
Install Docker and Docker‑Compose.
Create a docker-compose.yml similar to the following:
version: '3.8'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
- '80:80'
- '81:81'
- '443:443'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencryptThis is the minimal required configuration.
Start the stack:
docker-compose up -d
# If using docker‑compose plugin
docker compose up -dLog in to the management UI at http://127.0.0.1:81 using the default credentials:
Email: [email protected]
Password: changemeAfter the first login, you will be prompted to change the password and update your details.
Screenshots
Advanced Configuration
Using Docker Networks
For services running on the same Docker host as NPM, create a custom Docker network to avoid exposing upstream ports on all host interfaces.
Create a network named scoobydoo:
docker network create scoobydooAdd the following to docker-compose.yml (and any other service files on the same host):
networks:
default:
external: true
name: scoobydooExample with Portainer:
version: '3.8'
services:
portainer:
image: portainer/portainer
privileged: true
volumes:
- './data:/data'
- '/var/run/docker.sock:/var/run/docker.sock'
restart: unless-stopped
networks:
default:
external: true
name: scoobydooNow you can create a proxy host in the NPM UI using portainer as the hostname and port 9000. The service name acts as the hostname, so ensure uniqueness within the same network.
Docker Health Check
The project does not include a HEALTHCHECK in the Dockerfile, but you can add one to a service in docker-compose.yml:
healthcheck:
test: ["CMD", "/bin/check-health"]
interval: 10s
timeout: 3sOpen‑Source Repository
https://github.com/NginxProxyManager/nginx-proxy-manager
Additional Notes
The article concludes with promotional links to other technical resources and a call to follow the WeChat public account for more content.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Architect's Guide
Dedicated to sharing programmer-architect skills—Java backend, system, microservice, and distributed architectures—to help you become a senior architect.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
