NginX Proxy Manager and Local DNS

Reverse Proxy with NginX Proxy Manager (NPM) allows for many self-hosted services behind one IPv4 WAN IP as explained in my tutorial “Why you need Reverse Proxy”. In this video we are looking at a unique way to use NPM on your local network even during an Internet outage.

Hosted services require static addresses and I recommend the use of DHCP address reservations at your router to manage all static addressing. Not all routers support local DNS resolution (example: Ubiquiti Unifi Routers).

In this video, we leverage using Pi-Hole configured with Local DNS in conjunction with NPM.

I am assuming that you already have both NPM and Pi-hole installed on your local network.

First, make sure your router has your Pi-Hole configured as the first DNS. I am using a Ubiquiti UDM Pro and your router settings will be similar, but different. My Pi-hole is addressed at in my example screenshot below.

Next, go to the local DNS section on your Pi-Hole.

Be sure that you have DHCP Address Reservations for your hosting servers on your router. Here’s an example of the DHCP Address Reservation for my RocketChat server on my UDM Pro.

On your Pi-Hole, you can define the address of your server in order to ssh to it by name.

You can also define a DNS entry for your hosted service which will use the same subdomain name you defined at your DNS Server provider, but you will point this entry to the address of your NPM server. In my case, my NPM server is at

If you want to point to your Pi-hole for local DNS, but you do not have your system configured for DHCP, you will edit the following file:

sudo nano /etc/resolvconf/resolv.conf.d/head

This file is the correct place to edit the nameservers, despite the disclaimer. My file points to my Pi-hole at as well as the cloudflare servers.

Make your changes to the file and CTRL O, Enter to save your updates and CTRL X to exit the editor.

You can either reboot your computer or you can perform the following commands to update without rebooting.

sudo systemctl restart resolvconf.service
sudo systemctl restart systemd-resolved.service

You will be able to “ssh” to your servers that you added to the Pi-Hole local DNS and when you access your locally hosted web services that you added, they will work even if your Internet connection is offline and access to those services will use the Let’s Encrypt SSL certificates that are locally cached in your instance of NPM.