OH2 On different Port?

i’m still really just getting started with OH2 and the new Karaf start up stuff has me looking in different places for things. And I’m still trying to setup OH2 on the my same Ubuntu Virtual Machine that is running OH1

I noticed in the OH2 /runtime/etc/services.cfg I see the use of port 8080. Is this the only place you would change the port to something else? And then would running the openhab:install-service then correctly start OH2 on a different port?

Also, can you run OH2 with Https secure?

This might help you: https://github.com/openhab/openhab-distro/blob/master/docs/sources/getting-started.md#configuring-which-https-ports-to-use

I assume you refer to https://github.com/openhab/openhab-distro/blob/master/distributions/distribution-resources/src/main/resources/runtime/etc/services.cfg#L23?
This is actually a good catch - this setting only concerns UPnP, but I guess that UPnP might hence not work if you set Jetty to a different port than 8080. This would need to be fixed.

I added an according issue: UPnP stream port needs to be changed if Jetty port is changed · Issue #68 · openhab/openhab-distro · GitHub

Thanks the help and push in the right direction. But I must be looking or misunderstanding where you should actually make that change. Which file do you modify is do you need to run the Start script and then enter the information there?

On a windows machine, I’ve tried doing the following in the CMD prompt after OpenHab was running, but seems it still only runs on port 8080?

openhab> export OPENHAB_HTTP_PORT=8011
Command not found: export
openhab> OPENHAB_HTTP_PORT=8011
8011

Have the same problem, can´t find where to change the http port. Running openhab 2 on Win 7

As simple as stated here:

You can change these default ports by specifying the environment variables OPENHAB_HTTP_PORT and OPENHAB_HTTPS_PORT

When using Windows, try something like this.

Ok, that simple. It was the “export” command that confused me, dosen´t work in Windows. It should be nice if you could tell what OS you refer to when give the examples. As an non Linux person its sometimes hard to understand.

your “here” link still gets you to a 404 - Page not found.