Adding a Let’s Encrypt Certificate to an Azure-Hosted Website
Tuesday, 21 March 2017
If you host your website in Azure, you might be interested in adding SSL support via Let's Encrypt. Azure doesn't offer any functionality to automate this or make it easy, but thankfully there are plenty of useful tools in the PowerShell community to make this easy.
- ACMESharp - A PowerShell module to interact with Let's Encrypt.
- Azure PowerShell - A set of PowerShell modules to interact with Azure.
What's been missing (until now!) is the glue. So now, here's the glue: Register-LetsEncryptCertificate.ps1.
So the steps:
- Install-Module AcmeSharp, Azure, AzureRM.Websites
- Install-Script Register-LetsEncryptCertificate.ps1
- Register-LetsEncryptCertificate -Domain www.example.com -RegistrationEmail firstname.lastname@example.org -ResourceGroup exampleResourceGroup -WebApp exampleWebApp
- Visit https://www.example.com