How to change default port on Mac

I can launch openHAB in terminal but when I try to connect to localhost:8080 it gives me a white page. I believe that port 8080 is being used by a different process and I am also using 8443 for something else. How can I change the default port?

I have read about changing OPENHAB_HTTP_PORT, but where is that file located on a Mac?

I don’t know the best way to do it but I do know you can change them in

/{openhab_home}/userdata/etc/org.ops4j.pax.web.cfg

where {openhab_home} is where you installed openhab.

OPENHAB_HTTP_PORT and OPENHAB_HTTPS_PORT can be changed as environment variables.

1 Like