In this context, Ingress is the method used to access an addon’s web interface through the HA interface and authentication. Ingress can only be used with addons that are specifically designed for it, not arbitrary URLs.
I wanted to expose some server on the network as well through ingress and managed to write a small add-on that uses a nginx reverse proxy server to provide an “ingress-ready” view of the resource. You can install it from here: https://github.com/tux2000/home-assistant-addons
Nginxproxymanager can do this with as many subdomains as you want while only exposing 80 and 443. 80 strictly for https(443) redirect. 443 for the https reverse proxy. To whichever backend IP and ports
Then use Adguard or other DNS service to prevent internal connections to fqdn’s from going out to the internet to be routed back in.
Then you can use the same fqdn Internally and externally
Thank your for your reply. I can confirm I was able to build your addon.
I tried to access a few websites on my LAN but it seems there are few incompatibility issues.
I tried the following sites:
OpenWRT web interface (Luci): does not load at all. 403 error on cgi-bin/luci/. Maybe it’s related to source IP restrictions that are not seen coming from lan, I need to investigate.
Proxmox VE: does not load at all (actually only HTML). The browser attempts to load resources directly on root path (https://xxx.ui.nabu.casa/proxmoxlib.js?ver=3.5.1), so 404 errors and unable to load the interface.
Frigate NVR (just to test since it’s useless because of Frigate Proxy addon): Broken interface but few images loaded. I saw this in the container log:
ws4py.exc.HandshakeError: Header HTTP_UPGRADE is not defined
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/ws4py/server/wsgiutils.py", line 101, in __call__
self. Result = application(self. Environ, self.start_response)
File "/usr/lib/python3.9/wsgiref/handlers.py", line 137, in run
raise HandshakeError('Header %s is not defined' % key)
Portainer: After a initial long loading (it looked like looping resources loading), it managed to load and it works perfectly fine.
I don’t know if it’s possible to build a universal ingress proxy because of the specifics of each application. However, I am already happy so see that Portainer works great.
Do you prefer individual issues for each site on GitHub or just a single one?
Thanx for writing this addon. I couldn’t find other examples how to use ingress with addons in HA. It is really useful. It doesn’t work though when using forms for my addon
Just found this, been looking for a way to do this for a long time.
Is there a way to add multiple instances of this addon with different names? I’m running two home assistant instances and need additional ways to access the second HA addons from the primary instance.
Also, accessing Webmin through here would be awesome.
If possible, it would be great if there were additional Destination: line items in the config, as well as sub-urls for the proxy to allow for multiple proxies. This would allow people to add custom panels.
For instance, I’m in the process of migrating my adguard from one HA instance to another, but I have both running at the same time rather than a solid cutover. I’m using your addon and just relabelled it in my config:
I just set this addon up and tried to direct it to my router IP address (192.168.0.1) however it looped back to HA (192.168.0.14). I can’t get it to view any other IP address, they just give me “502 Bad Gateway”. Any ideas?
Not sure exactly what is going on. Some routers might be trying to be “smart” and e.g. breaking out of the iframe that is used for ingress. How do you specify the destination of the redirect? Do you use protocol and port, e.g. http://192.168.0.1:80 ?
I use it to embed paperless-ngx into the HA UI which is running on another port of the same server. Is that working for you?