This site runs best with JavaScript enabled.

Install Nginx Proxy Manager on a Pi4

Post status

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!

  1. Install Docker and Docker-Compose
  1. Create a docker-compose.yml file similar to this:
version: '3'
services:
app:
container_name: nginx
image: 'jc21/nginx-proxy-manager:latest'
restart: always
ports:
- '80:80'
- '81:81'
- '443:443'
environment:
DB_MYSQL_HOST: 'db'
DB_MYSQL_PORT: 3306
DB_MYSQL_USER: 'npm'
DB_MYSQL_PASSWORD: 'npm'
DB_MYSQL_NAME: 'npm'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
depends_on:
- db
db:
container_name: maria_for_nginx
image: 'yobasystems/alpine-mariadb:10.4.17-arm32v7'
restart: always
environment:
MYSQL_ROOT_PASSWORD: 'npm'
MYSQL_DATABASE: 'npm'
MYSQL_USER: 'npm'
MYSQL_PASSWORD: 'npm'
volumes:
- ./data/mysql:/var/lib/mysql
  1. Bring up your stack
docker-compose up -d
  1. 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.

http://127.0.0.1:81

Default Admin User:

Email: admin@example.com
Password: changeme

Immediately after logging in with this default user you will be asked to modify your details and change your password.

  1. Upgrading to new versions
docker-compose pull
docker-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.

Links to this post:

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 ›

Sebastian Auner © 2023