Set stack and realm by ENV