NGINX proxy manager is a reverse proxy management system, that is based on NGINX with a nice and clean web UI. You can also obtain trusted SSL certificates, manage several proxies with individual configs, customizations, and intrusion protection. It is open-source and maintained GitHub. It’s perfect for small environments like home labs or small server environments. You can easily expose any web service or application with it. It includes a free SSL certificate management by letsencrypt that can also be used to obtain wildcard certs. To deploy the NGINX proxy manager you need a small MySQL database container and the NGINX container. Let’s have a look at how to deploy this easily with docker-compose.
Create a new A record on my server that is called “proxy.example.com” that points to the public IP of the virtual server.
Create the docker-compose file. Create the new project folder in the /opt directory called nginxproxymanager. Then I create a docker-compose.yaml file
with the following template.
version: '3'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
ports:
- '80:80'
- '81:81'
- '443:443'
restart: always
environment:
DB_MYSQL_HOST: "db"
DB_MYSQL_PORT: 3306
DB_MYSQL_USER: ${USERNAME}
DB_MYSQL_PASSWORD: ${PASSWORD}
DB_MYSQL_NAME: ${MYSQLNAME}
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
db:
image: 'jc21/mariadb-aria:10.4'
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${ROOTPASSWD}
MYSQL_DATABASE: ${DATABASE}
MYSQL_USER: ${USERNAME}
MYSQL_PASSWORD: ${PASSWORD}
volumes:
- ./data/mysql:/var/lib/mysqlStore passwords in plain text is not a good idea. Create .env file with the
following content:
USERNAME=proxy
PASSWORD=supergeheim
MYSQLNAME=npm
ROOTPASSWD=rootsupergeheim
DATABASE=npmNotice: Please change the names and take strong passwords, not npm.
docker-compose up -dNow we can log in to the web UI. Simply use your browser to connect to your
server by using the IP address or an FQDN and connect on port “81”. Log in with
the username admin@example.com and the password changeme. Next, you should
change your username and password, and that’s it!
If the NGINX Proxy Manager, Docker and Docker Compose are installed on the same server, the internal IP address is required.
ip addr show docker0
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:5d:50:ff:be brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft foreverThe IP Address is: 172.17.0.1
Configure the details.
Change to SSL.
The configuration details.


