Edits to Nextcloud.cfg do not remain

A friend’s Nextcloud server changed it’s Port Number it used recently, so on Linux I edited ~/.config/Nextcloud/nextcloud.cfg to change just that 1 Port Number but the edits do not appear to stay & it continues to attempt to use the non-working older port #…

Is there another way to update this config to use the new Port Number?

Is the client fully stopped before you edit the config file?