Initially set the hostname to localhost to workaround startup error.