MQTT in docker container SSL #834
Replies: 3 comments 3 replies
-
DO you really mean weewx is talking http to your broker? That doesn't make sense as brokers speak mqtt not http. Is your mqtt broker using tls on port 8883? Generally, browsers do not allow use of non-TLS resources from https page loads. If your mqtt broker is not running over TLS, with a certificate anyone can validate (e.g. letsencrypt), then I think you should fix that. However, my advice might be generally right but not on point for your problem. You can also open up the debugging window in your browser, or in firefox and see what the errors are. (It also seems odd to run mqtt at home and weewx in the cloud, but that is "seems odd" not "wrong".) |
Beta Was this translation helpful? Give feedback.
-
Sorry, I thought proxmox was a cloud provider. You need to use tcpdump, and look at logs. But if you are using TLS for web, you should do that for mqtt also. |
Beta Was this translation helpful? Give feedback.
-
I haven't seen much documentation on doing MQTT with nginx. My solution was to set up a 2nd broker (main MQTT is on my weewx pi) running on my nginx vm (both are in a DMZ) I have it configured to act as a one way bridge from the pi, and then that then relay's the secure websocket to the browser. If you do the same as me, be mindful of the ownership/groups of the certs and keys so that both mosquitto and nginx are able to read them. Bridge config is as follows:
|
Beta Was this translation helpful? Give feedback.
-
so i've been hacking at this forever with no luck
i'm running weewx on a vm on my proxmox server
i'm running my own mqtt broker in a container in another server on my home network
i have weewx happily talking to my mqtt broker over http - but when i connect to my weather website over https it wont' talk to my mqtt broker
any suggestion would be appreciated
Beta Was this translation helpful? Give feedback.
All reactions