Letsencrypt cert not valid after 1 of 2 trusted domains expired

Nextcloud version (eg, 20.0.5): 25.0.3 SNAP
Operating system and version (eg, Ubuntu 20.04): Ubuntu 22.04
Apache or nginx version (eg, Apache 2.4.25): part of snap bundle
PHP version (eg, 7.4): part of snap bundle

The issue you are facing:

My Nextcloud instance was accessible from 2 external domains, A and B. Domain A is the one that I originally set this instance up under, but both A and B were listed as trusted domains. I let domain A expire because I only wanted to use domain B from now on, but now I can’t access Nextcloud through a browser because I get a “NET::ERR_CERT_DATE_INVALID” error.

I tried running “nextcloud.enable-https lets-encrypt”, which appears to succeed, but I never regain the ability to log back into my Nextcloud.

Can I either fully transfer things over to domain B, or copy my files, decks, etc. to a clean install? Frankly, I’m tired of dealing with the snap, so any advise on migrating to a regular install would be appreciated as well.

Steps to replicate it:

  1. Let domain ownership expire
  2. Have Nextcloud try and fail to renew cert for domain
  3. Lose ability to log in

The output of your Nextcloud log in Admin > Logging:

Can’t get in to do that.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

Please advise on where to find this on the snap.

The output of your Apache/nginx/system log in /var/log/____:

“”

Hmm. The certificate will only have one expiration date as a whole, not one per subject alternate name.

Look at the certificate in your browser and see if it’s in date. I wonder if it’s not actually updating.

What do you mean when you say you let domain A expire? You mean the domain registration is expired?

1 Like

The certificate only shows domain A, which is expired and won’t be renewed. You’re correct that I mean that the domain registration expired.

Nextcloud is trying to renew certs just for domain A, but I need it to switch everything over to domain B. Can I manually edit any config files or similar to make that work? I’m having trouble finding anything in the snap install.