I solved it!
This is what I did (not sure if all details are necessary)
I took a backup and made a snapshot of the VPS.
Uninstalled most apps. Kept only the most important. I removed CollaboraCode completely.
Opened the terminal and put the server in maintenance mode
Removed Docker completely by issuing
sudo apt-get purge docker-ce docker-ce-cli containerd.io
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd
did the upgrade - this time I got NC21RC3
Put maintenance mode off
Checked for errors and found "Your web server is not set up correctly to resolve “/.well-known/webfinger” and “/.well-known/nodeinfo”.
Put the server in maintenanemode again
edited the nextcloud.conf (nano /etc/nginx/conf.d/nextcloud.conf) according to the different proposals in the thread above.
Everything in vain.
BUT - I had somewhere read a comment that the problem may be the browsers cache. I checked in an incognitowindow and - voila - no error. I did ctrl+F% in chrome brower and now there were no errors in the ordinary window either.
The final version in nextcloud.conf is below. Anything may have worked…
access_log off;
}
#changed the following
location ^~ /.well-known {
location = /.well-known/carddav { return 301 /remote.php/dav/; }
location = /.well-known/caldav { return 301 /remote.php/dav/; }
location = /.well-known/webfinger { return 301 //index.php/.well-known/webfinger; }
location = /.well-known/nodeinfo { return 301 //index.php/.well-known/nodeinfo; }
location /.well-known/acme-challenge { try_files $uri $uri/ =404; }
location /.well-known/pki-validation { try_files $uri $uri/ =404; }
return 301 /index.php$request_uri;
}
I now installed docker and collabora from scratch and it worked with no problem.
So my problem was the browsers cache and remaining old Collabora Docker things.