Set up hostname and port in a config file