[SOLVED] No access to OpenHAB2 via Port 8080

I face a problem, that it’s not possible for me to access the OpenHAB2 GUI over Port 8080. As I understood it’s not possible to change the port at the moment.

I’m testing OpenHAB2 on a Raspberry 2, in parallel with OpenHAB1 (which runs on port 8181).
OpenHAB2 is started with sudo (to eliminate any permission problems).

Before startup “sudo netstat -lpn |grep :8080” shows no service on this port.
After startup java is listening on this port.

But my browser (Chrome) reports ERR_EMPTY_RESPONSE and shows nothing.

Anyone an idea what could be the reason?

You can set the environment variable OPENHAB_HTTP_PORT and OPENHAB_HTTPS_PORT to change the ports used by openHAB. If no variable is set, they will be set to the defaults in runtime/karaf/bin/setenv.sh.

Did you get any error message in the logs?

Thanks, this solved the problem. I changed the HTTP and the HTTPS port.
I assume the problem was that the HTTPS 8443 was already in use and therefore also the user interface was also not available over HTTP.

1 Like

Could you add this somewhere to the documentation? Would be great :slight_smile:

1 Like

how to set environment in raspbian? Sorry i am noob an i had same problem

You can do it in your shell init or just add it in start.sh

i’m having this issue also on raspbian. So how can this be solved?
Thanks :wink:

what issue?

(assuming an apt-get installation): to change the ports that OH2 listens to:

modify /etc/default/openhab2
and change:

1 Like

I checked port numbers and they are 8080,8443 but I cannot access OH over browser.
I connected screen to HDMI, after rebooting there is information “service reachable at http://openhabiandevice:8080”, the same when I check service status over PuTTy.

It is fresh installation of current Openhabian on RasperyPi 3B+

I can access
“sudo openhabian-config”,
log viewer at
but nothing on 8080 or 8443

One more strange behavior is this info when I try to move root to USB
“Incompatible selection detected!
Move root to USB can only be used on a Raspberry Pi!”
I was doing this one year ago on the same hardware and it was working.

Any ideas?