Not renewing after changing server

I changed my server from Fedora to Debian and backed /etc/letsencrypt directory. On the new server, I have restored that directory and installed a new let’s encrypt client from github.

Now this happens when I try to renew the certificate:

$ sudo ./letsencrypt-auto certonly --renew-by-default --webroot -w /var/www/html -d
Checking for new version...
Requesting root privileges to run letsencrypt...
   /root/.local/share/letsencrypt/bin/letsencrypt --no-self-upgrade certonly --renew-by-default --webroot -w /var/www/html -d
An unexpected error occurred:
OSError: [Errno 22] Invalid argument: '/etc/letsencrypt/live/'
Please see the logfiles in /var/log/letsencrypt for more details.

Document root path has also changed so I tried changing it in /etc/letsencrypt/renew.

Please let me know if you need the log files.

1 Like

Hello @Swift-R,

What is the content of dir /etc/letsencrypt/live/

ls -l /etc/letsencrypt/live/

Just because that are symlinks and maybe you didn't backup them properly.

Log file /var/log/letsencrypt/letsencrypt.log could give more info regarding your problem.

As far as I know those files are not taked into account if created with letsencrypt client version prior to 0.4.0. I mean, letsencrypt client ignores them if they are not created using last version that adds the renew feature.


Are they supposed to be symlinks? Because they’re not…

Yest, they should be symlinks pointing to last issued files in …/…/archive/{certx.pem,chainx.pem,privkeyx.pem,fullchainx.pem} where x is a number from 1 to 5.