Install Nginx Proxy Manager on a Pi4

seedling
planted May 21, 2021
Nginx is a DevOps tool to create a HTTPS proxy for a webservice that you want to expose to the internet. This is a guide how to get it working on a RaspberryPi 4.
We use the Nginx Proxy Manager to get nginx running via Docker easily and without the need to configure it that much.
These instructions are taken from the Nginx Proxy Manager Quick Setup.
I had an issue with the database and Pi4 in the setup from the link. The yml in this document is working! Use it instead of the one in the documentation!
- Install Docker and Docker-Compose
- Create a docker-compose.yml file similar to this:
version: '3'services:app:container_name: nginximage: 'jc21/nginx-proxy-manager:latest'restart: alwaysports:- '80:80'- '81:81'- '443:443'environment:DB_MYSQL_HOST: 'db'DB_MYSQL_PORT: 3306DB_MYSQL_USER: 'npm'DB_MYSQL_PASSWORD: 'npm'DB_MYSQL_NAME: 'npm'volumes:- ./data:/data- ./letsencrypt:/etc/letsencryptdepends_on:- dbdb:container_name: maria_for_nginximage: 'yobasystems/alpine-mariadb:10.4.17-arm32v7'restart: alwaysenvironment:MYSQL_ROOT_PASSWORD: 'npm'MYSQL_DATABASE: 'npm'MYSQL_USER: 'npm'MYSQL_PASSWORD: 'npm'volumes:- ./data/mysql:/var/lib/mysql
- Bring up your stack
docker-compose up -d
- Log in to the Admin UI
When your docker container is running, connect to it on port 81 for the admin interface. Sometimes this can take a little bit because of the entropy of keys.
Default Admin User:
Email: admin@example.comPassword: changeme
Immediately after logging in with this default user you will be asked to modify your details and change your password.
- Upgrading to new versions
docker-compose pulldocker-compose up -d
This project will automatically update any databases or other requirements so you don't have to follow any crazy instructions. These steps above will pull the latest updates and recreate the docker containers.
Don't panic if your service breaks over night
If something is broken: Keep calm and analyze, before trying any quick fixes that break even more. Your internet is gone… Read this post ›