When Nextcloud is installed via Proxmox helper script, and you restore a snapshot and you cannot anymore login, then you need to execute this commands:
mkdir -p /var/tmp/nextcloud
chown -R nextcloud /var/tmp/nextcloud
chmod -R 700 /var/tmp/nextcloud
The tmp folder was not in the backup, so there is no tmp folder after restoring.