use localhost port mapping in server mode