Changing port number on openHAB 2.0

same, after a lot of hair pulling I managed to change McMyadmin to jump ports and free up 8080 for openHAB, on with the show :smiley:

With the latest versions of the linux packages, this should now be the same across all systems. Editing the /etc/default/openhab2 file with the lines:

OPENHAB_HTTP_PORT=9090
OPENHAB_HTTPS_PORT=9091

will change the appropriate ports. Thanks @ralle for pushing this fix.

If it still doesn’t work as expected for some, let me know and I will work to resolve it.

2 Likes

Thank you! Although I switched my other applications and am running openHAB on default ports, so can’t test…

Hi,
I installed latest stable openHab2 on RPi3 and successfully changed ports in /etc/default/openhab2 as mentioned above.

The problem I have is that voice control with HABDroid only seems to work when I use port 8080.

Is this a bug or do I have to change ports in additional files?

UPDATE:
Everything works with latest HABDroid from git-repo on S5mini

1 Like

have the latest version, not working for me to change the port to 80

running on an RPi

Port 80 is a restricted port, you’ll need to openhab with root privileges to use it.

It might be more beneficial to run a reverse proxy instead.

thanks, it is working now, but still can’t pair Hue Emulator with Google Assistant

Afaik, it does not work with Google Assistant, only with Google Home, see Google Home Integration.

Can some tell me how to get a fresh openhabian install to use port 80 with ngnix reverse proxy ?

Which file(s) need changing ?

You don’t need to change the openHAB2 ports that are used by default (8080 for http, 8443 for https) when using a reverse proxy like nginx or apache.
The proxy is running on port 80.
The clients connect to the proxy on 80 and the proxy connects to OH2 on 8080.

Check the link on Benjy’s post on how to set up a reverse proxy:

If you want to use the upcoming Google’s stuff, you need to switch openHAB2 to listen to port 80 natively (no use of proxy).
This is more difficult since:

Kai, to share my experience: Traveling to Munich (I am not living in Germany) I took the chance to buy a Google home and trying it out at a friend who as an original Philips Hue. The procedure in the google home app had been still the same. Back home, google home stayed on hue-adapter.appspot.com and I was able to include my openhab! Thanks for all the support.

Absolute beginner here who had the same problem after installing openhab-2.1.0 on a Mac mini running OS X Server on El Capitan 10.11.6
Solution here thanks to Udo_Hartmann.

Hi

I have changed the default port from 8080 to 8090. Everything is working fine locally but i can’t access the PaperUI or HABPanel via the cloud service.
openHAB Cloud
org.openhab.openhabcloud

Where do I define the changed port to this binding?

The only change made so far is:

openhabian@openHABianPi:/$ nano /etc/default/openhab2

# The ports openHAB will bind its HTTP/HTTPS web server to.
OPENHAB_HTTP_PORT=8090
OPENHAB_HTTPS_PORT=8053

Please advice

//Michael Stjerna

I guess you don’t need to, since the openHAB Cloud service connects from your local installation to the cloud (from inside to outside) by design, so you don’t need to open your Internet connection.

And both Paper UI and HABPanel cannot be accessed as far as I know, only basic UI.

Sure, that works too:

https://home.myopenhab.org/start/index

enter your credentials from your account and you are good to go …

Yes I got this working when I run on port 8080 but not on port 8090 that I use now.
There need to be some configuration for the remote “myopenhab” port settings…

Port for the local access is changed here:

openhabian@openHABianPi:/etc/openhab2/services$ nano /etc/default/openhab2

# The ports openHAB will bind its HTTP/HTTPS web server to.
OPENHAB_HTTP_PORT=8090
OPENHAB_HTTPS_PORT=8053

Hi

Problem solved, Cloud connected to my wifi IP-Address instead of the physical interface of the Raspberry PI.

2017-09-06 11:21:10.342 [INFO ] [egram.internal.TelegramActionService] - Bot StarmanBot loaded from config file
2017-09-06 11:21:11.477 [WARN ] [g.eclipse.smarthome.core.net.NetUtil] - Found multiple local interfaces - ignoring 192.168.1.20
2017-09-06 11:21:11.479 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at http://192.168.0.230:8090
2017-09-06 11:21:11.482 [WARN ] [g.eclipse.smarthome.core.net.NetUtil] - Found multiple local interfaces - ignoring 192.168.1.20
2017-09-06 11:21:11.484 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at https://192.168.0.230:8053
2017-09-06 11:21:14.934 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = 14f2396dsa5-d1ab4a, base URL = http://localhost:8090)

I removed the Wifi and got it to work again…

//Michael Stjerna

1 Like

I don’t know if this is the correct place to put this information, but i just had to change the port on my first ever install of OpenHabian2… on Ubuntu 16.10… There was another service already on 8080…

I have installed the “unstable version” of the software, (for x10 support) and the server is now up, but it’s reporting the wrong port numbers into the log file…

Hi,

i plan to setup openhab in docker.
And i have another container also using port 8080 and 8443.

I set up the docker like described in this article: https://docs.openhab.org/installation/docker.html

Is it possible to change the port in the docker container?
And if it is possible, how can i do it, because currently have no clue how to edit the start.sh file (if possible).

Hi I’m very much a newbie to everything from programming to configurations, my start.bat of the version of OH2 as of about ten days (ie early Jan 2020) ago has Karaf as the webserver, and I’ve found that the port number can be changed in OpenHAB\runtime\bin\setenv.bat (using Win10, but the same should be true of other environments’ setenv files I guess) down around line# 86 or so. That’s worked for me, HTH.