Skip to main content

Nginx Proxy Manager

Setup

  1. Create a docker network
docker network create scoobydoo
  1. Create a docker-compose.yml file
services:
npm:
image: jc21/nginx-proxy-manager:latest
restart: unless-stopped
ports:
- 80:80
- 81:81
- 443:443
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
healthcheck:
test: ['CMD', '/bin/check-health']
interval: 10s
timeout: 3s

networks:
default:
external: true
name: scoobydoo
  1. Start the container
docker-compose up -d
  1. Open the web interface
http://localhost:81
  1. If you are using headless server, you can use SSH tunneling
ssh -L 8181:localhost:81 user@server

Then open the web interface

http://localhost:8181
  1. Login with the default credentials and change the password
Email: admin@example.com
Password: changeme

Set Reverse Proxy For NginxProxyManager

  1. Go to Hosts -> Proxy Hosts -> Add Proxy Host

  2. Fill in the form

Domain Names: npm.example.com
Scheme: http
Forward Hostname / IP: npm
Forward Port: 81

  1. Remove the default port 81 from docker-compose.yml
services:
npm:
image: jc21/nginx-proxy-manager:latest
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
healthcheck:
test: ['CMD', '/bin/check-health']
interval: 10s
timeout: 3s

networks:
default:
external: true
name: scoobydoo
  1. Restart the container
docker-compose down && docker-compose up -d
  1. Now if you go to npm.example.com you will see the NginxProxyManager web interface