Cannot stop windows service with portOffset

Keycloak was installed and all working fine.
Had to install onto another system where port 8080 was already in use.
in standalone.xml, I edited
jboss.socket.binding.port-offset:5

Installed as windows service and that starts correctly using port 8085.

However the service cannot be stopped. Not seeing much in logs, but service state goes into a “stopping” state, but it never actually stops, have to kill the underlying process.

Anyone know if using portOffset is valid for windows service, or if there is a better way to change the port number(s) required by Keycloak running as service. NOTE, other app is tomcat based so overlaps with a few Keycloak ports.

Has anyone any feedback on this?

Or indeed, I just want to run on a different port, is there a more reliable way to do that?

if anyone comes across this in future…

solution:
when running service.bat to install the service, add the parameter:
/controller localhost:9995
where 9995 is calculated as 9990 + value of {jboss.socket.binding.port-offset:5} defined in standalone.xml