1

I want to run a micro-payara on the localhost interface only. How can I manage that?

I didn't find any command line options: https://payara.gitbooks.io/payara-server/documentation/payara-micro/appendices/cmd-line-opts.html

sealor
  • 135
  • 8

1 Answers1

2

You're correct, there's no command line option to specify the address on command line. You have to go a bit deeper and specify a command file with the --prebootcommandfile option.

The command file (let's call it commands.txt) should contain the following line:

set configs.config.server-config.network-config.network-listeners.network-listener.http-listener.address=localhost

The command-line to apply that file is:

java -jar payara-micro.jar --prebootcommandfile commands.txt
Michael Easter
  • 23,733
  • 7
  • 76
  • 107
OndroMih
  • 7,280
  • 1
  • 26
  • 44
  • That didn't work for me with payara micro `5.194`. Maybe the config option has changed? – thomas.mc.work Jan 09 '20 at 19:01
  • Well, I found out it did. But in the log output `Instance Configuration` is showing the FQDN of the host, which I wouldn't expect in this situation. Or am I wrong about that? – thomas.mc.work Jan 09 '20 at 19:13