sets up host in the initialzier based on the environment