Getting server port from preferences.