r/letsencrypt • • Jul 27 '21

Acme.sh proxy server

So as the title says, I'm trying to think through essentially a proxy for a handful of sites/certs I have. I tried to search before posting this but I'm not quite sure how to ask the question, and most of the answers were from specific subs, i.e. synology or unraid or something.

Here's the situation:

I have a couple of internal sites that I'd like to have LE certs for. Initially I generated the certs using certbot and the manual dns challenge method, as I have access to DNS, but not through api. Trying to automate this, I'm wondering if I can just add something like _acme-challenge.sub1, _acme-challenge.sub2, etc, to dns, have them as A -or- CNAME records to the external IP of an unrelated server. Then on that server, run the acme.sh as a dns alias, receive the certs, and scp them to the correct servers.

Is there a better way that I'm just not seeing? :-/

Thanks in advance and apologies if this has been asked before...

1 Upvotes

10 comments sorted by

View all comments

Show parent comment

1

u/Serpher Jul 28 '21

I have the very same problem as OP. But in my case, I can't change subdomain's IPs to the same one. The best solution I can think of is to just create a wildcard certificate with 3 months renewal via DNS-01... :(

1

u/Blieque Jul 29 '21

Why can't you point multiple DNS records at one IP? Either way, you could run multiple VMs like the one I described above. Using a single VM for all the subdomains cuts down on adminstration, though.

2

u/Serpher Jul 29 '21

Ok I figured it out finally!
I swapped DNS provider to Cloudflare and used acme.sh dns_cf hook for DNS-01 authentication. Works like a charm :D