First stop the docker service, and then modify the environment variables nc_domain and overwritehost of the nextcloud-aio-nextcloud container. It is always in /var/lib/docker/containers/ID/config.v2.json, restart docker after modification. It works for me.