Nginx Proxy Manager: SSL Termination Made Simple
Date: 2025-11-24 Tags: Networking, Reverse Proxy, SSL, Docker Author: Wissam Ztaoui
Introduction
Nginx Proxy Manager (NPM) is a powerful, user-friendly interface for managing Nginx reverse proxies. It simplifies the process of exposing internal services to the internet, handling SSL/TLS certificates via Let’s Encrypt, and managing access lists. This guide covers deploying NPM via Docker and configuring a secure reverse proxy.
1. Deployment
We will deploy NPM using Docker Compose. It requires a database (SQLite or MariaDB) to store configurations.
Docker Compose Configuration
version: '3.8'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
- '80:80' # HTTP Traffic
- '81:81' # Admin Interface
- '443:443' # HTTPS Traffic
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
Installation
- Save the above configuration to
docker-compose.yml. - Start the stack:
docker-compose up -d
2. Initial Configuration
- Access the Admin Interface at
http://<YOUR_SERVER_IP>:81. - Default Credentials:
- Email:
admin@example.com - Password:
changeme
- Email:
- Security First: Immediately change the email and password upon first login.
3. Creating a Proxy Host
To expose a service (e.g., Portainer running on port 9000):
- Navigate to Hosts > Proxy Hosts.
- Click Add Proxy Host.
- Details Tab:
- Domain Names:
portainer.example.com - Scheme:
http - Forward Hostname / IP:
172.17.0.1(Docker Host IP) or container name if on the same network. - Forward Port:
9000 - Cache Assets: Enable for static sites.
- Block Common Exploits: Enable for security.
- Websockets Support: Enable (required for Portainer).
- Domain Names:
4. SSL/TLS Configuration
NPM automates certificate management with Let’s Encrypt.
- Go to the SSL Tab in the Proxy Host dialog.
- SSL Certificate: Select “Request a new SSL Certificate”.
- Force SSL: Enable to redirect HTTP to HTTPS.
- HTTP/2 Support: Enable for performance.
- HSTS Enabled: Enable for strict transport security.
- Email Address: Enter your email for Let’s Encrypt notifications.
- Click Save. NPM will validate the domain ownership and issue the certificate.
5. Access Lists
To restrict access to sensitive services (like the NPM admin panel itself):
- Go to Access Lists > Add Access List.
- Name:
Internal Only. - Authorization: Add a username/password for Basic Auth.
- Access: Allow specific IP ranges (e.g.,
192.168.1.0/24) and deny all others. - Apply this list to any Proxy Host via the Details Tab.
Conclusion
Nginx Proxy Manager abstracts the complexity of manual Nginx configuration, making secure, SSL-encrypted reverse proxying accessible for any self-hosted infrastructure.