Home Assistant Community Add-on: Nginx Proxy Manager

This has been an ongoing issue for a long time. You can even find the issue reported on GitHub, but no clear solution to fixing it. I can’t find it now, but I did see somewhere on one of the GitHub issues, ways of retrieving the old configuration/settings.

I’ve got a problem with this add-on. It won’t start. I have the MariaDB add-on installed and running. It’s holding all my HA data.

I get this in the proxy manager log:
cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/01-log-level.sh
cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
cont-init: info: running /etc/cont-init.d/mysql.sh
[22:41:20] ERROR: This add-on now requires the MariaDB core add-on 2.0 or newer!
[22:41:20] FATAL: Make sure the MariaDB add-on is installed and running
cont-init: info: /etc/cont-init.d/mysql.sh exited 1
cont-init: info: running /etc/cont-init.d/nginx.sh

I have no idea why this is happening. Anyone have any suggestions?

Thanks!

I’ve been having this issue anytime my server is restarted for a few months now. In my case restarting MariaDB then restarting Nginx Proxy Manager fixes this for me. Just make sure MariaDB is up and running first after the restart.

Also check the logs of MariaDB to make sure it’s actually running.

Buster,

I tried your idea of restarting MariaDB first and then Nginx Proxy Manager, That did the trick. It’s now working.

I’ve had issues with add-ons not starting when booting HA. I hope some QA testing will be done on issues like this. It’s a real pain in the rear to have to restart something that’s already running.

Glad it worked for you too. I’ve been doing it for at least 2 months now.

Hi there,
and thanks for the solution :slight_smile:

I also have same problem… if I restart HA and after I try to log in the NPM web page of administration, everything there is empty. But my proxy sites is stil work…

If I restat Maria DB and after I restart NPM then all it’s ok… also the NPM webpage.

Thanks all
Denis

I have solved by restart Maria DB and after restart NPM
Thanks
Denis

Fixed it for me!

Also of note for others using the linuxserver.io swag container, don’t include the normal include /config/nginx/proxy.conf; as there are some header defaults in there you don’t need when defining them inside the server’s location block like this.

Thanks again!

I am having an issue with using this to forward an ipv6 hostname over SSL to HA (i.e. port 443 inbound to the proxy and outbound to port 8123). The ipv6 address for HA works on 8123 on the LAN. I can open 8123 and ipv6 address of HA on my Edgerouter and HA works remotely. The add-on got a certificate from Let’s Encrypt for the ipv6 hostname just fine, and nginx receives SSL ipv6 on 443 and forwards to ipv4 HA on 8123 just fine. But I can’t forward to HA’s ipv6 interface. If forward to the ipv6 address enclosed in brackets, I get a 502 error. If I remove the brackets, I get a 500 error.

Hairpin or nat loopback enabled on router? I dont think i can use the ipaddress either but domain works fine. Might be the network config in ha too

I’ve just encountered the same issue. By the way, everything worked fine.
I just had to create the redirection again

Hi,
I have one problem and I can find a solution for it. I use ssl for my local host. in nginx proxy manager I set it up so that I can connect to my_domain.com using ssl. I have cert provided by Dynu DNS addon.
The problem I’m facing is with uptime kuma and nginx proxy manager addon. I can’t access web gui using
https://mydomain:81 - for nginx
https://mydomain:3001 - for uptime kuma
The problem is when I want to access my_domain:81 or my_domain:3001 ports I get
ERR_SSL_PROTOCOL_ERROR
I can access web gui if I use my local domain without ssl.

nginx itself is accessed on http, not https. If you want to access nginx GUI remotely using SSL, make a FQDN for nginx with your DDNS provider (like nginx.mydomain). Then, in nginx forward that FQDN to your internal IP address for nginx/ha via http on port 81, and get a certificate for that FLDN using the Let’s Encrypt function in nginx. All of that is done when creating the forwarding rule. Go to https://ngninx.mydomain from a remote connection and you should get to nginx GUI.

I tried that for uptime kuma and this works. I created uptimekuma.mydomain,com get a cert for it and configured nginx that I can access uptimekuma.mydomain.com. And this works and I can log in to my dashboard. But I can do this only if I go to the uptimekuma.mydomain.com. If I want to open uptime kuma using web ui from addon I got ssl error.
I have maybe a complicated setup but in a few words I set up my system like this.
For remote access I use nabu casa because I’m behind nat and I want to use alexa without to much sweat. To make this work i use dns rewrite in adguard to resolve mydomain.com to my ha ip address.
I use dynu dns addon to get my cert.
Now, my problem is with uptime kuma and nginx proxy manager that I can’t log in web ui from my ssl domain. When I go to addon and try to open web ui from my local ssl domain I get
https://mydomain.com:3001
ERR_SSL_PROTOCOL_ERROR
The same thing is with nginx proxy manager.

Ok, I found out that you can use the same ssl cert for different ports using two server blocks in nginx config.
I created subdomain as upitimekuma.mydomain.com but I can’t get this thing working. I switched from nginx proxy manager addon to nginx ssl proxy.

I also have the problem the NPM webpage is empty. The proxy sites are working. However a restart of Maria DB and NPM doesn’t solve the problem. Below the logging.

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/00-banner.sh
Add-on: Nginx Proxy Manager
Manage Nginx proxy hosts with a simple, powerful interface
Add-on version: 0.12.3
You are running the latest version of this add-on.
System: Home Assistant OS 9.3 (aarch64 / raspberrypi4-64)
Home Assistant Core: 2022.11.3
Home Assistant Supervisor: 2022.10.2
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/01-log-level.sh
cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
cont-init: info: running /etc/cont-init.d/mysql.sh
cont-init: info: /etc/cont-init.d/mysql.sh exited 0
cont-init: info: running /etc/cont-init.d/nginx.sh
cont-init: info: /etc/cont-init.d/nginx.sh exited 0
cont-init: info: running /etc/cont-init.d/npm.sh
cont-init: info: /etc/cont-init.d/npm.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun manager (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
s6-rc: info: service legacy-services successfully started
[23:21:25] INFO: Starting NGinx…
[23:21:25] INFO: Starting the Manager…
[11/17/2022] [11:21:26 PM] [Global ] › :information_source: info No valid environment variables for database provided, using default SQLite file ‘/data/database.sqlite’
[11/17/2022] [11:21:26 PM] [Global ] › :information_source: info Generating SQLite knex configuration
[11/17/2022] [11:21:26 PM] [Global ] › ⬤ debug Wrote db configuration to config file: ./config/production.json
[11/17/2022] [11:21:29 PM] [Migrate ] › :information_source: info Current database version: none
[11/17/2022] [11:21:29 PM] [Setup ] › :information_source: info Logrotate Timer initialized
[11/17/2022] [11:21:29 PM] [Setup ] › :information_source: info Logrotate completed.
[11/17/2022] [11:21:29 PM] [IP Ranges] › :information_source: info Fetching IP Ranges from online services…
[11/17/2022] [11:21:29 PM] [IP Ranges] › :information_source: info Fetching https://ip-ranges.amazonaws.com/ip-ranges.json
[11/17/2022] [11:21:30 PM] [IP Ranges] › :information_source: info Fetching https://www.cloudflare.com/ips-v4
[11/17/2022] [11:21:30 PM] [IP Ranges] › :information_source: info Fetching https://www.cloudflare.com/ips-v6
[11/17/2022] [11:21:30 PM] [SSL ] › :information_source: info Let’s Encrypt Renewal Timer initialized
[11/17/2022] [11:21:30 PM] [SSL ] › :information_source: info Renewing SSL certs close to expiry…
[11/17/2022] [11:21:30 PM] [IP Ranges] › :information_source: info IP Ranges Renewal Timer initialized
[11/17/2022] [11:21:30 PM] [Global ] › :information_source: info Backend PID 269 listening on port 3000 …

this message surgests there isn’t a valid DB

[11/17/2022] [11:21:26 PM] [Global ] › :information_source: info No valid environment variables for database provided, using default SQLite file ‘/data/database.sqlite’

However I don’t know how to solve this.I already tryed to reset de DB but this did’s solve the problem

There is any Home Assistant integration for Nginx Proxy Manager? For example to enable/disable hosts with HA automations… Thanks

Perhaps a stupid question but I’m trying to setup Nginx proxy manager along with duckdns. I have forwarded port 80 and 441 and when opening my IP i see the nginx succes page.
However when I try to add the host and request an SSL certificate it gives me an internal error. When checking the logs it says check /data /logs /letsencrypt /letsencrypt .log for more info.

But I can’t find that file anywhere on my system (using the addon Terminal)
image

Am I in the wrong session? I have homeassistant in proxmox and when opening the display there you don’t have much options because of the homeassistant cli

It should be 80 and 443 (don’t know if it is a typo here or you tried to forward port 441).

Anyway, you could use DNS challenge on the setup and there would be no need for port 80 to be forwarded.

Yes, you would need to connect to the NPM docker, not the ssh docker.