Super quick post here to explain my problem and solution for why my Nextcloud Snap Letsencrypt certificate wouldn’t renew on my ubuntu server and how I fixed it.
I got a warning that my SSL certificate was expired when I was using my nextcloud client.
I read a few blogs on how to renew it and the solution was always to simply run:
nextcloud.enable-https lets-encrypt
So, I did that and everything seemed like it was working but… it didn’t work. Although there were no errors in the script, I continued to get the expired certificate warning.
I then recalled that I had attempted to set up another piece of software on the same server using the ‘usual apache’ and the ‘usual letsencrypt’ (certbot --apache
). When those two instances running together wasn’t working, I just uninstalled apache again, and kept the Nextcloud snap running. However – I had not deleted any of the original letsencrypt stuff nor the config files in the /etc/apache/ directory.
So, I just went into /etc/apache/sites-available directory and deleted all those config files (you might want to keep the 000-default.conf file or whatever it’s called) with:
sudo rm filename.conf
Then I re-ran the command above:
nextcloud.enable-https lets-encrypt
And then everything seemed to work again.
So it seems that for whatever reason on this server there are conflicts between the ‘native ssl certs’ and the ‘snap certs’. I am not smart enough to know more, but hoping that this will help someone else with the same challenge.