Mosquitto Addon, Nginx Proxy Manager

I’ve installed the Mosquitto addon on Hassio as well as Nginx Proxy manager for external access.
For location purpose, i want to track my phone GPS via Owntrack… but the problem is that i’m struggling to get the MQTT component working from the outside.

When i set my integration to my local IP address:

It works perfectly.

Then i want to make mosquitto accessible from outside. I set a new rule on Nginx proxy manager:

And when i go back to integration and try to establish communication with the Mosquitto broker it doesn’t work at all…

Has someone ever experienced those kind of trouble ? I tried almost everything but i think i did something wrong.

Thanks in advance

No one can help me there ?

MQTT isn’t transported over HTTP. You need to have nginx proxy a TCP connection for you.

I do this with with a hand-built configuration, I don’t know if the plugin has the ability to do that? Perhaps if you select something different that “http” in the “scheme” box, somehow?

In my case, I proxy MQTT-over-TLS from the “outside” to MQTT unencrypted on port 1883 to mosquitto. Just proxying a TCP connection should be even easier.


Can you find a solution because I have the same concerns

Sincerely, Pierre

For the moment, i stopped the idea to get mqtt over nginx platform. I’ll try that maybe later. If you have a solution, don’t hesitate to share it here !

Have you seen tailscale? I installed tailscale on my linux server and also on my HA box using a custom integration. I have access to everything everywhere at all times. No portforwarding, reverse proxies needed at all. Guthub handles the oauth ( and i have 2fa on github) so it’s more secure than anything i could knock together.
Here was my walkthrough:

1 Like

Totally agree.

As long you have a limited number of devices needing remote access to your HA (typically, your phone), Tailscale is far easier and more secure than opening up to the world via a reverse proxy and managing SSL and certificates.

1 Like