OpenHab 3 behind nginx reverse proxy (nginx Proxy Manager)


I am running OpenHab 3 behind a nginx reverse proxy.
The reverse proxy is configured via Nginx Proxy Manager.

Currently I does not have used the advanced configuration inside of the nginx proxy manager.

I use the OpenHab Android app. Most of it work pretty well:
(I am using always my public address - not the local one and not

  • HABPanel
  • NFC Handling

But the new openHAB 3 UI does not work. If I try to switch to it the following error is displayed:
"An error occurred while loading openHAB 3 UI"

Another question:
Because I am not using, is it still possible to use sendNotification(<recipient_mail_address>", "Message") - or is this based on ?

With best regards,

PS: Merry Christmas and Happy New Year

Can you access the UI from a browser on the same device using the internal IP address of openHAB?

I tested following connections:

  1. Laptop via local address (http port 8080) → WORKED

  2. Laptop via public address (https sub domain) → WORKED

  3. Mobile Phone via local (http port 8080) → WORKED

  4. Mobile Phone via public address (https sub domain) → 401 Authorization Required.
    (strange: I am using basic auth - there should be a popup displayed to enter username and password)

But inside of the android app (same mobile phone) I worked with username and password.

In the incognito mode at the mobile it worked - the browser asked for username and password.
It seems that chrome has stored something.

I had some problems with enabling/disabling things via ui using the Nginx Proxy manager.
I have added a custom location with some additional header entries, i was using within openhabian befor using nginx proxy manager.

This solved all my problems that occured so far.

Here are my additional headers:

# Cross-Origin Resource Sharing.
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow_Credentials' 'true' always;
add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range' always;
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH' always;

# openHAB 3 api authentication
add_header Set-Cookie X-OPENHAB-AUTH-HEADER=1;

We have some NGINX reverse proxy threads flying around here with those headers have solved auth problems too.



Thanks, it helped.

First, I copied into the advanced configuration. But then I checked your screenshot and saw that you used the Custom locations tab.

Any idea with the notifications? Or should I create a new thread for it?


Yeah nginx proxy manager needs it that way.
They also have a little hint in the advanced tab.

(I have been there too and learned it that way. :grinning_face_with_smiling_eyes: )

About the notifications:
I think the way you have described above is limited to myopenhab but i am not sure since i am not using it myself.
I do most of my Notifications via Telegram or Pushover. (Pushover is connected to other services besides openHAB anyway in my environment.)

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.