invisible port handling and env vars