Config Openhabian + Pihole + Nginx all on one device

I know its not recommended to install multiple things on on device, but hardware is much faster nowadays.

So I´ve setup and configured openhabian + grafana + frontail to run via nginx reverse proxy on my ubuntu 20.04 setup with php 7.4.x.

In addition I manged to install pihole+ unbound using the default lighttpd and setup nginx redirecct rule.

So all is fine using nginx like …/ /frontail …/grafana …/pihole

To reduce memory it would therefore make sense to use nginx only for pihole as well, but I’m really struggling as soon as I turn off lighttpd.

In addition I would like to change the default location / that open openhab3 uses to location /openhab, but this is also not working as expected.

I currently have the feeling that openhabian is again adding some extra redirects that is always pointing back to /.

Has anyone else setup using different nginx locations ?

That isn’t the point. It’s about (not) creating complex dependencies. Those are harmful to reliability, and you will want a Home Automation server to run 24/7 reliably.
You’re already seeing the implications before you even managed to set it up.
FWIW openHABian is not supported on Ubuntu let alone that on RPi hardware.
And good luck should you need to replace your ‘fully stacked’ box or any of the SW components.

I’m sure this could be made to work, but I wouldn’t recommend it. For one thing, as Markus points out, the more you put onto one machine, the more chances there are that something will go wrong and take down the whole machine. And when the machine goes down, more than just one function goes down. Since reliability of home automation is important, adding more stuff to the home automation server increases both the likelihood and impact of down time.

In addition, you are piling up unsupported (“We do not support Ubuntu so no promises.”) on top of unsupported (" * This is an unsupported configuration created by the community") configurations. You will have problems and it’s going to be challenging to find help. so that’s another thing that should give you pause.

Finally, prior to OH 3 I saw attempts to put openhab at a /openhab url location. I only ever saw it partially work with Apache. I never saw a working configuration in NGINX. I suspect even less will work even with the Apache config with MainUI. And this too is yet another not a supported configuration for openHAB. So you are likely out of luck on that front.

I won’t tell you not to proceed. But you will largely be on your own. We can’t help with unsupported configs. That’s sort of the definition of unsupported.

I find this a bit surprising… Why wouldn’t openhabian offer way to add a nginx installation, if such simple change of location /openhab is not possible?

The openHABian nginx installation does what users want it to i.e. securely proxy a standard OH installation to the outside. No need to move that.