10
Reverse-proxying from a docker network
(lemmy.dbzer0.com)
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
Be civil.
No spam.
Posts are to be related to self-hosting.
Don't duplicate the full text of your blog or readme if you're providing a link.
Submission headline should match the article title.
No trolling.
Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details.
Resources:
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
For homeassistant I had to add this in configuration.yaml
Where 172.21.0.2 is my NPM docker IP
Edit: its NPM IP and not HA like I wrote first time
This. Also, make sure the proxy is proxying websocket traffic as well. I do it with pure nginx like this:
Thanks. I tried it like this and still get a 400 Bad Request error.
Someone below mentioned adding some more IPs to the trusted_proxies list so I tried that as well without result. The IP I used for the reverse-proxy is the IP listed in portainer under the network for the proxy container. Just to reiterate, the container is running on a different device than homeassistant (technically same device but different VM but that shouldn't make a difference).
My NPM window looks the same as yours. Im not sure mate, I would try disabling firewall just to see is that the problem. Im not expert in that area and nothing else comes to my mind sorry. Im also running everything under one host