# Not renewing after changing server

**URL:** <https://community.letsencrypt.org/t/not-renewing-after-changing-server/10725>\
**Category:** Help\
**Created:** [February 12, 2016, 12:11pm UTC](https://community.letsencrypt.org/t/not-renewing-after-changing-server/10725 "2016-02-12T12:11:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Swift-R](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/swift-r/32/3019_2.png) [@Swift-R](https://community.letsencrypt.org/u/Swift-R)\
**Post date:** [February 12, 2016, 12:11pm UTC](https://community.letsencrypt.org/t/not-renewing-after-changing-server/10725/1 "2016-02-12T12:11:57Z")

</div>

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 dns.domain.net
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 dns.domain.net
An unexpected error occurred:
OSError: [Errno 22] Invalid argument: '/etc/letsencrypt/live/dns.domain.net/cert.pem'
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.

---

<div class="post-metadata">

**Author:** ![sahsanu](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/sahsanu/32/89984_2.png) [@sahsanu](https://community.letsencrypt.org/u/sahsanu)\
**Post date:** [February 12, 2016, 1:01pm UTC](https://community.letsencrypt.org/t/not-renewing-after-changing-server/10725/2 "2016-02-12T13:01:07Z")

</div>

Hello @Swift-R,

What is the content of dir **/etc/letsencrypt/live/dns.domain.net/**?

`ls -l /etc/letsencrypt/live/dns.domain.net/`

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.

> [@Swift-R](#):
>
> Document root path has also changed so I tried changing it in /etc/letsencrypt/renew.

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.

Cheers,  
sahsanu

---

<div class="post-metadata">

**Author:** ![Swift-R](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/swift-r/32/3019_2.png) [@Swift-R](https://community.letsencrypt.org/u/Swift-R)\
**Post date:** [February 12, 2016, 1:15pm UTC](https://community.letsencrypt.org/t/not-renewing-after-changing-server/10725/3 "2016-02-12T13:15:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sahsanu](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/sahsanu/32/89984_2.png) [@sahsanu](https://community.letsencrypt.org/u/sahsanu)\
**Post date:** [February 12, 2016, 1:27pm UTC](https://community.letsencrypt.org/t/not-renewing-after-changing-server/10725/4 "2016-02-12T13:27:48Z")

</div>

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