Quickly Set Up Nginx Proxy Manager with Docker and Enable HTTPS
This guide walks you through installing Nginx Proxy Manager via Docker, configuring reverse proxy hosts, obtaining Let’s Encrypt SSL certificates, and securing access with HTTPS, all using a user‑friendly web interface suitable for beginners.
This article introduces Nginx Proxy Manager, a visual management interface for Nginx that lets users— even beginners—create reverse proxy hosts, obtain trusted SSL certificates, and manage multiple proxies through a clean web UI.
Features
Beautiful, secure UI built on Tabler
Create forwarding domains, redirects, streams, and 404 hosts without deep Nginx knowledge
Free SSL via Let’s Encrypt or custom certificates
Access lists and basic HTTP authentication for hosts
Advanced Nginx configuration for super‑users
User management, permissions, and audit logs
Installation
1. Install Docker and Docker‑Compose
2. Create a docker-compose.yml file
<code>version: '3'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
- '80:80'
- '81:81'
- '443:443'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
</code>3. Run
<code>docker-compose up -d
# If using docker-compose-plugin
docker compose up -d
</code>4. Access the web UI
After the containers start, open
http://127.0.0.1:81to see the interface.
5. Log in
The default credentials are:
<code>Username: [email protected]
Password: changeme
</code>On first login you will be prompted to change the password.
6. Main dashboard after login
Practical Example: Reverse‑Proxy the Admin Interface
We will bind
http://a.test.comto the admin UI running on port 81 and enable HTTPS.
Prerequisites
Nginx Proxy Manager installed
A domain name
The domain
a.test.comresolves to the server’s IP
Reverse‑Proxy Configuration
Access the manager at
ip:81, log in, and click the green Add Proxy Host button. In the Details dialog fill in:
Domain Names : a.test.com
Forward Hostname / IP : (see explanation below)
Forward Port : 81
Block Common Exploits : enable
Other fields can be left at defaults
Forward Hostname / IP explanation : If the target service runs on a different machine, use its reachable IP. If it runs on the same host, use the IP of the Docker bridge interface obtained with
ip addr show docker0. Do not use
127.0.0.1because the container and host are on separate networks.
After saving, you can reach the admin UI via
a.test.com(still HTTP). The next steps secure it with HTTPS.
3. Obtain an SSL Certificate
In the manager, go to
Access Lists → Add SSL Certificate → Let’s Encryptand request a certificate for
a.test.com.
4. Enable HTTPS
Edit the previously created proxy host, select the SSL certificate, and check
Force SSLto enforce HTTPS.
Conclusion
This tutorial covered installing Nginx Proxy Manager with Docker, creating a reverse‑proxy for the admin interface, obtaining a Let’s Encrypt certificate, and enforcing HTTPS. For more details, refer to the official documentation.
Official docs: https://nginxproxymanager.com/guide/
macrozheng
Dedicated to Java tech sharing and dissecting top open-source projects. Topics include Spring Boot, Spring Cloud, Docker, Kubernetes and more. Author’s GitHub project “mall” has 50K+ stars.
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.