Automating SSL certificate generation for multiple VMs running behind Azure Load Balancer

I am working on the Azure platform and using 2 ubuntu VMs that sit behind the Azure load balancer. I serve multiple websites from these 2 VMs and thus need to automate SSL certificate generation. How could I do this? Right now, I have to undertake a very tedious task, where I first remove one machine from the load balancer and install on another. Similarly, I do for another VMs. What is the way forward? How could I take this ahead?

1 Like

Welcome to the Let's Encrypt Community, Suhail :slightly_smiling_face:

Perhaps this may help?

1 Like

Thank you. Is there an API that could be used? Currently, I have embedded shell commands in my code to automate.

1 Like

Hi @suhailgupta03


If you use http validation, you can use a redirect port 80 -> port 80 / 443 other domain.

Result: Create one subdomain without using a loadbalancer (or something fixed in your system, so always the same VM is used).

Then add redirects ->

Last: Run your ACME client with the webroot of

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