add private instance support and split the env