Reverse Proxy Manager on Raspberry Pi

I was looking for some time to easily manage the binding of multiple web application hosted in my docker host machine. I have found a good candidate in Nginx Proxy Manager from Jamie Curnow

To best fit the installation, I rearranged the default setup for a fastest deploy in my environment based on PhotonOS and Portainer for Raspberry PI.

Base configuration

Open an ssh console and create a new folder where you store a configuration file. Note that “npm” means “Nginx Proxy Manager”.

mkdir /var/npm
nano /var/npm/config.json

Than paste the configuration parameters as follow.

  "database": {
    "engine": "mysql",
    "host": "db",
    "name": "npm",
    "user": "npm",
    "password": "npm",
    "port": 3306

Enter into the Portainer UI, go to the Stacks menu and add a new stack.

Service stack creation

Choose a name for example “npm”, paste on the Web editor the script and deploy the stack.

version: "2"
    image: jc21/nginx-proxy-manager:latest
    restart: always
      # Public HTTP Port:
      - "80:80"
      # Public HTTPS Port:
      - "443:443"
      # Admin Web Port:
      - "81:81"
      # Make sure this config.json file exists as per instructions above:
      - /var/npm/config.json:/app/config/production.json
      - npm-data:/data
      - npm-letsencrypt:/etc/letsencrypt
      - db
    image: mariadb:latest
    restart: always    
      MYSQL_DATABASE: "npm"
      MYSQL_USER: "npm"
      MYSQL_PASSWORD: "npm"
      - npm-mysql:/var/lib/mysql

If all goes to the right way you should see your service up and healthy

Now you could proceed with the proxy configuration at the link http://<host-address>:81

Default credential

Password: changeme

Complete your customization and good work!