acm icon indicating copy to clipboard operation
acm copied to clipboard

Automatic wildcard certificate management for Cloudflare and Heroku

trafficstars

outline-acm

This script can be run on Heroku using CRON and will automatically create and manage a wildcard SSL certificate issued by LetsEncrypt. If you're running a Heroku application with dynamic subdomains this is a great way to get a free SSL cert. Found this useful? Considering sponsoring our open source.

Deployment

Deploy to Heroku and set up the schedule to look like this:

image

Ensure all environment variables in cert.sh are set in the environment:

  • DOMAIN
  • CLOUDFLARE_EMAIL
  • CLOUDFLARE_API_KEY
  • HEROKU_API_KEY
  • HEROKU_APP