Environment based port