From the server implementations that I have seen, people normally use a properties file with all the passwords (that may be encrypted with hardcoded key(s)).
I have therefore, created a server that takes localhost inputs.
However, that is vulnerable to sniffers on the host machine.
Is there a better way?