Nextcloud breaks when i enable https:

nextcloud works great before i enable https with this:
sudo nextcloud.enable-https lets-encrypt
then it doesnt work when i try to access it with my domain but it does with the local ip (although firefox does give me an error that it has a liscence for [] but not ip)
this happened before and i reinstalled nextcloud and it still does it after reinnstalling the snap and re-enabling https.
any help would be appreciated!
edit: it did say this after i put in the info it wanted:
Attempting to obtain certificates… done
find: Failed to restore initial working directory: /home/arnaud: Permission denied
Restarting apache… done

Can you please define “it doesn’t work” ?

oh sorry, it times out:
The connection has timed out

An error occurred during a connection to

The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the web.