This worked great. For those looking to apply the same solution. And running Nextcloud in snap. You need a cert.pem, key.pem and chain.pem file. The latter can be found here: https://developers.cloudflare.com/ssl/origin-configuration/origin-ca/#cloudflare-origin-ca-root-certificate The cert and key can be generated from your Cloudflare Dashboard under Domains > SSL/TLS > Edge Certificate.Place all three files in /var/snap/nextcloud/12345/certs/live/ where 12345 can vary for you.Finally sudo nextcloud.enable-https custom cert.pem key.pem chain.pem Profit!
This worked great. For those looking to apply the same solution. And running Nextcloud in snap. You need a cert.pem, key.pem and chain.pem file. The latter can be found here: https://developers.cloudflare.com/ssl/origin-configuration/origin-ca/#cloudflare-origin-ca-root-certificate The cert and key can be generated from your Cloudflare Dashboard under Domains > SSL/TLS > Edge Certificate.
Place all three files in
/var/snap/nextcloud/12345/certs/live/where 12345 can vary for you.Finally
sudo nextcloud.enable-https custom cert.pem key.pem chain.pemProfit!