Nginx Proxy Manager ‐ Installation and configuration - mluchettii/github-wiki-mluchetti GitHub Wiki

Environment: Raspberry Pi OS (Debian), Docker

Table of Contents

Installation

First, create a directory structure for NPM, then cd into that directory:

mkdir -p nginx-proxy-manager/{data,letsencrypt} && cd nginx-proxy-manager

Now create a docker-compose.yml using nano docker-compose.yml and paste the following YAML configuration:

services:
  app:
    image: 'docker.io/jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt

Write the file, and then bring up the stack by running sudo docker compose up -d.

Configuration

Login

Access the NPM admin panel via the LAN IP address of your machine:

http://192.168.1.x:81/ (or similar)

Proceed to log in using the default credentials:

Email:     [email protected]
Password:  changeme

Then create your user account.

NPM Dashboard

Create a Proxy Host

Click on ‘Proxy Hosts’ and in the following screen click on ‘Add Proxy Host’.

Details tab

Enter your registered domain name(s), hostname/IP you want to forward, and the port that the application is listening on. Some applications require having Websockets Support enabled for the site to work properly, so be sure to review the application’s documentation for setting up a reverse proxy.

SSL tab

Request a new SSL Certificate from Let’s Encrypt. Again, some services may require HTTP/2 support and/or HSTS to be enabled.

As for DNS challenge, select your DNS provider and paste in the API token that you obtained from your provider, such as Cloudflare.

Agree to the Let’s Encrypt ToS and click Save to generate the new SSL certificate and create the new proxy host.

If successful, the Status of the new proxy host will be Online. Click the Source URL to access your application.

Notice that you did not receive a warning from your browser about accessing an insecure HTTP website and that there is now a padlock symbol next to the URL. This indicates that the HTTP connection to this website is encrypted with SSL.