3 minutes reading time (629 words)

Configure SSL for an Azure Web App using Let's Encrypt

Generate a free SSL Certificate for your Azure Web App using Let's Encrypt to secure your website with HTTPS. 

Find Azure resource details for Let's Encrypt

In this guide we will create an Azure App registration for Let's Encrypt and generate an SSL certificate for our website. 

To create the Let's Encrypt certificate, we will need to collect the following info:

Azure Tenant ID
Azure Subscription ID
Application (client) ID
Application Client secret
Resource group name
Storage account connection string

Azure Active Directory - Properties
Copy the Tenant ID

Subscription
Copy the subscription ID

Storage account
Access Keys - show keys

Copy the Connection string

Create App registration for Let's Encrypt

App registrations - New registration

Name: Let's Encrypt - Planet Express
Redirect URI: https://www.planetexpress.live
Click Register

Copy the Application (client) ID

Create client secret

Certificates & secrets - New client secret
Description: Let's Encrypt - Planet Express Login
Click Add

Copy the client secret value

Add permissions for Let's Encrypt

Resource groups 
Access control (IAM) - Add - Add role assignment

Role: Contributor
Assign access to: select Let's Encrypt - Planet Express
Save

Add Azure Let's Encrypt App Extension

App Service - Extensions - Add

Choose Extension

Azure Let's Encrypt

Accept legal terms

Click OK

Add Azure Let's Encrypt extension - Click OK

Generate Let's Encrypt SSL Certificate

App service - Extensions - Azure Let's Encrypt

Click Browse

Enter the following details:

Azure Tenant ID
Azure Subscription ID
Application (client) ID
Application Client secret
Resource group name

Storage account connection string
Tick update Application Settings and Virtual Directory

Click Next

Custom domains and SSL - Next

Use the [Ctrl] key to select both hostnames. The certificate will need names for the www and non-www versions of your website.

Enter email address then click Request and Install Certificate

Set Web app to HTTPS only

App Service - TLS/SSL settings
HTTPS Only - On

Browse to the site to check the new SSL certificate

Related Posts

 

Comments 11

Guest - Lukas on Friday, 03 June 2022 06:08

How to automate renewal for this?

How to automate renewal for this?
TechLabs on Wednesday, 08 June 2022 20:21

Hi, I have a draft blog for automating the certificate renewal. Hopefully will get time to publish it soon!

Hi, I have a draft blog for automating the certificate renewal. Hopefully will get time to publish it soon!
TechLabs on Tuesday, 26 July 2022 18:50

Hi Lukas, automatic renewal is easier with an App Managed Certificate. Check out this guide

Configure SSL for an Azure Web App using an App Managed Certificate
https://techlabs.blog/categories/azure/configure-ssl-for-an-azure-web-app-using-an-app-managed-certificate

Hi Lukas, automatic renewal is easier with an App Managed Certificate. Check out this guide [b]Configure SSL for an Azure Web App using an App Managed Certificate[/b] [url=https://techlabs.blog/categories/azure/configure-ssl-for-an-azure-web-app-using-an-app-managed-certificate][/url]
Guest - Adam on Sunday, 19 June 2022 17:40

wow this is amazing! Good job!

wow this is amazing! Good job!
TechLabs on Tuesday, 21 June 2022 19:10

Hey, thanks for the feedback! Im glad you found the guide useful

Hey, thanks for the feedback! Im glad you found the guide useful :)
Guest - Adam on Sunday, 19 June 2022 21:03

Turns out you can create a free certificate auto renewed by azure.https://azure.microsoft.com/en-us/updates/secure-your-custom-domains-at-no-cost-with-app-service-managed-certificates-preview/

Turns out you can create a free certificate auto renewed by azure.https://azure.microsoft.com/en-us/updates/secure-your-custom-domains-at-no-cost-with-app-service-managed-certificates-preview/
TechLabs on Tuesday, 21 June 2022 19:11

Thanks for the link! I will try that for the next Azure web app I set up.

Updated guide for App Managed Certificates:

Configure SSL for an Azure Web App using an App Managed Certificate
https://techlabs.blog/categories/azure/configure-ssl-for-an-azure-web-app-using-an-app-managed-certificate

Thanks for the link! I will try that for the next Azure web app I set up. Updated guide for App Managed Certificates: [b]Configure SSL for an Azure Web App using an App Managed Certificate[/b] [url=https://techlabs.blog/categories/azure/configure-ssl-for-an-azure-web-app-using-an-app-managed-certificate][/url]
Guest - Ben on Thursday, 30 March 2023 11:18

This link is broken

This link is broken
TechLabs on Saturday, 29 April 2023 12:31

Thanks for letting me know, I've updated the link.

Thanks for letting me know, I've updated the link.
Guest - CloudNovice on Friday, 01 July 2022 15:27

Is there a way to export this certificate?
Thanks.

Is there a way to export this certificate? Thanks.
TechLabs on Wednesday, 27 July 2022 09:46

Hi,
It might be possible to download the certificate using the Kudu portal. However, when I tested this, it didn't work.

https://github.com/sjkp/letsencrypt-siteextension/wiki/How-to-Retrieve-Certificate

You can now use Azure Managed App certificates for web apps which are easier to set up than Let's Encrypt and can be auto renewed.

Configure SSL for an Azure Web App using an App Managed Certificate
https://techlabs.blog/categories/azure/configure-ssl-for-an-azure-web-app-using-an-app-managed-certificate

Hi, It might be possible to download the certificate using the Kudu portal. However, when I tested this, it didn't work. [url=https://github.com/sjkp/letsencrypt-siteextension/wiki/How-to-Retrieve-Certificate]https://github.com/sjkp/letsencrypt-siteextension/wiki/How-to-Retrieve-Certificate[/url] You can now use Azure Managed App certificates for web apps which are easier to set up than Let's Encrypt and can be auto renewed. [b]Configure SSL for an Azure Web App using an App Managed Certificate[/b] [url=https://techlabs.blog/categories/azure/configure-ssl-for-an-azure-web-app-using-an-app-managed-certificate][/url]
Already Registered? Login Here
Saturday, 23 September 2023
You can help support this website by buying me a coffee!
Buy Me A Coffee