simplify server setup logic