Making certbot use an HTTP proxy?

I've successfully set up a server to use Let's Encrypt, employing DNS records via Cloudflare. Publishing DNS entries on Cloudflare entails running HTTPS requests to an API at Cloudflare.

My initial enrollment worked, because I set up HTTP_PROXY and HTTPS_PROXY in the environment of my shell. But when I then subsequently try forcing a renewal, it fails, because of HTTPS connectivity issues.

What's the cleanest way to make certbot use a proxy for outgoing HTTP requests? I could write a script which exports the HTTP(S)_PROXY variables and then do the renewal. But I'm thinking there might be a cleaner way, perhaps using some config parameter in Certbot?

--
Regards,
Troels Arvin

4 Likes

I don't think there are any undocumented certbot settings for that. Here are two threads with comments by a certbot dev for different options to set the variable. I thought the systemd method was clever although is only works with scheduled tasks.

5 Likes

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