What you need
- A server or machine running Linux
- Docker and Docker Compose installed
- Ports 80 and 443 open on your firewall
- A domain name (optional but recommended for SSL)
The compose file
Create a folder, drop this file in it as docker-compose.yml, and you're halfway there.
# nginx-proxy-manager/docker-compose.yml
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
- '80:80' # Public HTTP
- '81:81' # Admin dashboard
- '443:443' # Public HTTPS
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
depends_on:
- db
db:
image: 'jc21/mariadb-aria:latest'
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: 'changeme'
MYSQL_DATABASE: 'npm'
MYSQL_USER: 'npm'
MYSQL_PASSWORD: 'changeme'
volumes:
- ./mysql:/var/lib/mysql
Replace both changeme values with real passwords before running this in production.
Steps
mkdir nginx-proxy-manager && cd nginx-proxy-manager
docker-compose.yml.
docker compose up -d
http://your-server-ip:81 in your browser.
Log in with the default credentials below, then change them immediately.
Email: admin@example.com
Password: changeme
You now have a full reverse proxy with a web UI. Go to Proxy Hosts → Add Proxy Host to start routing your domains. SSL certs from Let's Encrypt are one checkbox away.
Useful commands
# Check container status
docker compose ps
# View logs
docker compose logs -f app
# Stop everything
docker compose down
# Update to latest image
docker compose pull && docker compose up -d