get hostname from env first