# Moving DNS01 renewal on a different host

**URL:** https://community.letsencrypt.org/t/moving-dns01-renewal-on-a-different-host/230930
**Category:** Help
**Created:** [December 27, 2024, 10:31am UTC](https://community.letsencrypt.org/t/moving-dns01-renewal-on-a-different-host/230930 "2024-12-27T10:31:33Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![oza4h07](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/oza4h07/32/71056_2.png) [@oza4h07](https://community.letsencrypt.org/u/oza4h07)
#### Post date: [December 27, 2024, 10:31am UTC](https://community.letsencrypt.org/t/moving-dns01-renewal-on-a-different-host/230930/1 "2024-12-27T10:31:33Z")

</div>

A couple of months ago, I set up a LE cert using a DNS01 challenge on a Debian 9 host.  
This Debian 9 host died a couple of days ago.  
I can't directly check which certbot version was running on it.  
This cert was copied on several Freeradius instances requiring a cert.

I would like to port the LE cert renewal process on a different host.  
For this, I'm planning to reuse a Debian 11 host I currently manage another LE cert (with an HTTP01 challenge). On this Debian 11 host, certbot 1.12.0 is installed.

I've go a full backup of /etc/letsencrypt directory from Debian 9 host.  
I'm thinking of

1. copying some backed-up files to the new Debian 11 host
2. forcing once, by hand, the old cert renewal
3. leaving certbot renewing both certs (the HTTP01 and the DNS01 ones)

Can this be done ?

I was thinking of just copying the following files or directories:

1. /etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/ into /etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/
2. /etc/letsencrypt/renewal/.conf into /etc/letsencrypt/renewal/
3. /etc/letsencrypt/renewal-hooks/deploy/script1.sh into /etc/letsencrypt/renewal-hooks/deploy

Do I need to copy some content from /etc/letsencrypt/archive or /etc/letsencrypt/live ?  
Do I need to /etc/letsencrypt/accounts/acme-staging-v02.api.letsencrypt.org/

Looking at csr and keys directories, I see a bunch of files bearing similar names on both hosts. Shall I care about this ?

Best regards

---

<div class="post-metadata">

### Author: ![MikeMcQ](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/mikemcq/32/52772_2.png) [@MikeMcQ](https://community.letsencrypt.org/u/MikeMcQ)
#### Post date: [December 27, 2024, 11:48am UTC](https://community.letsencrypt.org/t/moving-dns01-renewal-on-a-different-host/230930/2 "2024-12-27T11:48:04Z")

</div>

Welcome @oza4h07

I don't recommend merging some Certbot folders from one system to another.

Just request a new cert on the Debian 11 system. The DNS Challenge will not interfere with your existing cert using the HTTP Challenge.

The only unusual item is the `script1.sh` renewal hook. Having it in that folder means it applies to every cert that Certbot is managing on that machine. If it isn't appropriate to run it for your HTTP Challenge cert you could modify the script so it is. Or, just use --deploy-hook on the command when using the DNS Challenge for new cert. Ask more questions if you are not sure.

---

<div class="post-metadata">

### Author: ![oza4h07](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/oza4h07/32/71056_2.png) [@oza4h07](https://community.letsencrypt.org/u/oza4h07)
#### Post date: [December 27, 2024, 1:31pm UTC](https://community.letsencrypt.org/t/moving-dns01-renewal-on-a-different-host/230930/3 "2024-12-27T13:31:59Z")

</div>

Can I re-use the same domain name on the Debian 11 system or shall I use new one ?

---

<div class="post-metadata">

### Author: ![MikeMcQ](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/mikemcq/32/52772_2.png) [@MikeMcQ](https://community.letsencrypt.org/u/MikeMcQ)
#### Post date: [December 27, 2024, 1:41pm UTC](https://community.letsencrypt.org/t/moving-dns01-renewal-on-a-different-host/230930/4 "2024-12-27T13:41:21Z")

</div>

> [@oza4h07](#):
>
> Can I re-use the same domain name on the Debian 11 system

I don't understand that question. You said you used the DNS Challenge on the Debian 9 system. And, that you just want to move that cert request process to Debian 11. You can get a cert using DNS Challenge on any machine. You could get 10 certs with different names on the same system. Now, where you use those certs and how is a different story. But, you were just asking about the cert renewal.

If you share your actual domain names this would have been easier 🙂

But, don't you just copy this DNS Challenge cert to your FreeRadius systems ?

And, what did that deploy hook do? Did it copy the cert to those systems?

---

<div class="post-metadata">

### Author: ![oza4h07](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/oza4h07/32/71056_2.png) [@oza4h07](https://community.letsencrypt.org/u/oza4h07)
#### Post date: [December 27, 2024, 3:09pm UTC](https://community.letsencrypt.org/t/moving-dns01-renewal-on-a-different-host/230930/5 "2024-12-27T15:09:18Z")

</div>

I'm sorry my last question was not very understandable.

Anyway, your answer was both very informative and very clear.  
I just ran the command bellow and everything went fine.

certbot certonly --manual --manual-auth-hook /etc/letsencrypt/acme-dns-auth.py --preferred-challenges dns --debug-challenges -d [foobar.com](http://foobar.com)

Thank you very much !

---

<div class="post-metadata">

### Author: ![linkp](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/linkp/32/60089_2.png) [@linkp](https://community.letsencrypt.org/u/linkp)
#### Post date: [December 27, 2024, 3:20pm UTC](https://community.letsencrypt.org/t/moving-dns01-renewal-on-a-different-host/230930/6 "2024-12-27T15:20:54Z")

</div>

> [@oza4h07](#):
>
> --manual --manual-auth-hook

That is going to make automating your renewals unpleasant. Have you looked into using a DNS service that works with automation? Others here can probably give you a good review of using `acme-dns` as one way of introducing automation to your existing DNS.

Edit: ignore this reply. I didn't read enough of the command that I selectively quoted to notice that `acme-dns` was being used. I only use HTTP-01 challenges with `certbot`. My DNS‐01 challenges are handled by another ACME client.

---

<div class="post-metadata">

### Author: ![petercooperjr](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/petercooperjr/32/84698_2.png) [@petercooperjr](https://community.letsencrypt.org/u/petercooperjr)
#### Post date: [December 27, 2024, 3:24pm UTC](https://community.letsencrypt.org/t/moving-dns01-renewal-on-a-different-host/230930/7 "2024-12-27T15:24:13Z")

</div>

It looks like that command line _is_ calling a hook that calls acme-dns of some sort, though?

It's really confusing that "manual intervention" and "custom script" are both called "manual" by Certbot. 🙂

---

<div class="post-metadata">

### Author: ![linkp](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/linkp/32/60089_2.png) [@linkp](https://community.letsencrypt.org/u/linkp)
#### Post date: [December 27, 2024, 3:41pm UTC](https://community.letsencrypt.org/t/moving-dns01-renewal-on-a-different-host/230930/8 "2024-12-27T15:41:18Z")

</div>

Thank you for pointing that out. I, of course, stopped reading when I saw `--manual` and didn't notice `acme-dns-auth.py` until reading it again after your reply.

---

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)
#### Post date: [January 26, 2025, 3:42pm UTC](https://community.letsencrypt.org/t/moving-dns01-renewal-on-a-different-host/230930/9 "2025-01-26T15:42:04Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
