Use port only if defined in config