The above is confusing as there is no hostname in the config.

Everything below can be replaced with `Socket.hostname.sub(/\..*/, '')`