Setting Up Nginx Proxy Manager
Nginx Proxy Manager (NPM) is a Docker-based GUI for managing reverse proxies and SSL certificates — perfect for running multiple services on one server without touching config files.
Requirements
- Docker and Docker Compose installed (see the Docker section)
- Ports 80, 443, and 81 available
Create docker-compose.yml
mkdir ~/npm && cd ~/npm
nano docker-compose.yml
services:
app:
image: jc21/nginx-proxy-manager:latest
restart: unless-stopped
ports:
- "80:80"
- "443:443"
- "81:81"
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
docker compose up -d
Access the Admin UI
Visit http://YOUR_SERVER_IP:81
Default credentials: admin@example.com / changeme — change these immediately after first login.
Add a Proxy Host
- Click Proxy Hosts → Add Proxy Host
- Enter your domain name (e.g.,
app.yourdomain.com) - Forward hostname:
localhost(or another IP), Port: your app's port (e.g.,3000) - On the SSL tab, select Request a new SSL certificate and enable Force SSL
- Click Save
NPM will automatically request and renew a Let's Encrypt certificate for your domain.