Skip to content

Automated Let's Encrypt certificate generator on Azure Functions for App Services

Notifications You must be signed in to change notification settings

kolarcz/azure-letsencrypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Automated Let's Encrypt certificate generator on Azure Functions for App Services

Useful for App Services based on Container / Docker

Setup

  • create Azure Function App (with Hosting Plan: Consumption)
  • in Azure Function App add:
    • Application settings:
      • WEBSITE_NODE_DEFAULT_VERSION = 8.10.0
      • OPENSSL_PATH = D:\Program Files (x86)\Git\usr\bin\openssl.exe
      • TEST = false
    • Connection strings (with type Custom):
      • CLIENT_ID = How to get client id & secret »
      • CLIENT_SECRET = How to get client id & secret »
      • SUBSCRIPTION_ID = Azure AD > Subscriptions > Subscription ID
      • TENANT = Azure AD > Azure Active Directory > Properties > Directory ID
      • PFX_PASSWORD = Random password
      • AZURE_STORAGE_CONNECTION_STRING = Connection string to any storage for Let's Encrypt challenges
      • AZURE_STORAGE_CONTAINER = Container name in storage for Let's Encrypt challenges
  • in Azure Function App create function from template: Timer trigger / Javascript (named: TimerTriggerJS1)
  • copy wwwroot to Azure Function App wwwroot
  • run npm install in wwwroot
  • change parameters in file index.js for your App Service
  • in your app add redirect from path /.well-known/acme-challenge/:key to https://«storage_name».blob.core.windows.net/«storage_container»/:key (example for: expressjs)
  • run TimerTriggerJS1 function

About

Automated Let's Encrypt certificate generator on Azure Functions for App Services

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published