It’s recommended to install YunoHost on fresh, dedicated systems. It’ll most likely not break anything but it’s best to have backup ready. It is possible to then expose docker containers, but I’d just recommend installing Nextcloud in ynh and transfer the contents over.
It looks like db is fried, I’d assume all the permission errors prevent it from running normally. Is there a healthcheck configured?