Nginx Proxy Manager
A powerful, self-hosted web interface for managing Nginx reverse proxy hosts with SSL/TLS certificates, featuring a clean, intuitive dashboard.
β¨ Features
π Quick Start
Prerequisites
Docker Compose (Recommended)
Create a docker-compose.yml file:
version: '3.8'
services: app: image: 'jc21/nginx-proxy-manager:latest' container_name: nginx-proxy-manager restart: unless-stopped ports: - '80:80' - '81:81' - '443:443' volumes: - .//data - ./letsencrypt:/etc/letsencrypt environment: - DB_SQLITE_FILE=/data/database.sqlite
Start the application:
docker-compose up -d
Docker Run
docker run -d \
--name nginx-proxy-manager \ -p 80:80 \ -p 81:81 \ -p 443:443 \ -v $(pwd)//data \ -v $(pwd)/letsencrypt:/etc/letsencrypt \ --restart unless-stopped \ jc21/nginx-proxy-manager:latest
π Initial Setup
1. Access the Admin Panel
http://your-server-ip:81[email protected]changeme2. Change Default Password
3. Configure Your First Proxy Host
ποΈ Architecture
βββββββββββββββββββ
β Web Browser β ββββββββββ¬βββββββββ β HTTPS/HTTP βΌ βββββββββββββββββββ β Nginx Proxy β β Manager (Nginx) β ββββββββββ¬βββββββββ β βΌ βββββββββββββββββββ β Your Backend β β Services β βββββββββββββββββββ
π Common Use Cases
1. **Host Multiple Websites**
example.com β 192.168.1.10:3000
api.example.com β 192.168.1.20:8080 blog.example.com β WordPress container
2. **Add SSL to Legacy Apps**
3. **Development Environments**
myapp.local β localhost:3000
api.local β localhost:4000 db.local β phpMyAdmin container
4. **Access Control**
π§ Configuration Examples
Basic Proxy Host
Domain Names: app.yourdomain.com
Scheme: http Forward Hostname: 192.168.1.100 Forward Port: 3000
SSL Configuration
Advanced Configuration
Custom Nginx configurations can be added in the "Advanced" tab for specific needs.
π οΈ Maintenance
Backup Your Data
# Backup configuration and database
tar czf npm-backup-$(date +%Y%m%d).tar.gz data/ letsencrypt/
Update to Latest Version
docker-compose pull
docker-compose up -d
View Logs
docker-compose logs -f
# or docker logs nginx-proxy-manager -f
π Troubleshooting
Common Issues
1. Port 80/443 Already in Use
# Check what's using the ports
sudo netstat -tulpn | grep :80 sudo netstat -tulpn | grep :443
2. SSL Certificate Issues
3. Can't Access Admin Panel (Port 81)
sudo ufw statusdocker ps4. Database Issues
# Reset to default (will lose configuration)
docker-compose down -v docker-compose up -d
π Security Best Practices
1. Change Default Credentials - Immediately after first login 2. Use Strong Passwords - For admin panel and basic auth 3. Keep Updated - Regularly update to latest version 4. Firewall Configuration - Restrict access to port 81 5. Regular Backups - Backup your data volume regularly 6. Use SSL Everywhere - Enable SSL for all public-facing hosts
π API Usage
Nginx Proxy Manager provides a REST API for automation:
# Get authentication token
curl -X POST http://your-server:81/api/tokens \ -H "Content-Type: application/json" \ -d '{"identity":"[email protected]","secret":"yourpassword"}'
# List proxy hosts curl -X GET http://your-server:81/api/nginx/proxy-hosts \ -H "Authorization: Bearer YOUR_TOKEN"
π€ Contributing
We welcome contributions! Please see our Contributing Guide for details.
1. Fork the repository 2. Create a feature branch 3. Make your changes 4. Submit a pull request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
β€οΈ Support
π Acknowledgments
A Docker-based application that provides a simple, powerful web interface to manage Nginx as a reverse proxy. Its primary goal is to make setting up forwarding domains, redirections, and free SSL certificates from Let's Encrypt easy for everyone, without needing deep Nginx expertise.