NGINX Proxy Manager: How to redirect from https to http to NPM web ui?

I have configured my HA to run off 1 URL without a port number in the path through duckdns and NGINX proxy manager, which works fine. However, I cannot get to my NGINX Proxy Manager admin through the port 81 (which it is configured to) via the domain name and 81 port (https://[CUSTOM] since the NPM web ui runs off http. How do I configure that so it directs to the unsecure url, or if possible, have NPM run in https so I can just go to my web ui through a custom subdirectory (https://[CUSTOM]

One way would be to use a sub-sub-domain on duckdns and have NPM proxy that to port 81. So for example “” proxies to “http://your-ha-server:81”. This won’t magically fix the “Open Web UI” button, but will give you a path there. You don’t need to set anything special up on duckdns for this to work, as letsencrypt uses a wildcard certificate (*

However, do you really want to open NPM to the internet nasties? On the very-very-rare occasion I need access to NPM from outside home I do so via something with 2FA (I use Google Remote Desktop).

I tried it this way:

location /nginx/ {
    rewrite /nginx(/.*) $1 break;

    proxy_http_version 1.1;
    proxy_set_header Accept-Encoding "";
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $http_host;
    proxy_cache_bypass $http_upgrade;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_redirect off;


which seems to work (kinda) but now I am presented with a white screen. What is the issue now? UI Screenshot added.

I actually just want to be able to click on my addon button and go to the UI while I am local. When I do I get a 404 issue and need to actually punch in my IP:8123, not my url (which I have set to be internal and external url)