Skip to content
Let's Encrypt wrapper for Cloud-Foundry
Branch: master
Clone or download
bsyk Merge pull request #6 from bsyk/wrong_location
Fix log messages that give the location of the generated certificates
Latest commit 27a73aa Aug 3, 2016
Type Name Latest commit message Commit time
Failed to load latest commit information.
host Initial commit. Feb 2, 2016
.gitignore Upgrade to lets encrypt 0.5.0 May 3, 2016


Let's Encrypt wrapper for Cloud-Foundry

Create certificates for your Cloud-Foundry-hosted apps and domains using Let's Encrypt.

Using the --path argument of the map-route command, you can specify just a path to be directed to a separate app. The benefit, in this situation, is that you can renew your certificates with zero downtime for your apps by running the letsencrypt code in a separate instance without disrupting your application.

   map-route - Add a url route to an app

   cf map-route APP_NAME DOMAIN [--hostname HOSTNAME] [--path PATH]

   cf map-route my-app                              #
   cf map-route my-app --hostname myhost            #
   cf map-route my-app --hostname myhost --path foo #

   --hostname, -n   Hostname for the route (required for shared domains)
   --path           Path for the route

Firstly you must have your cf cli configured, domains created, and DNS configured to point to your CF provider.

Once you have that, just edit the domains.yml file checked out from this repo and run python

This will push the app, map all the routes for the auto-check that LetsEncrypt needs to do to verify that you own the domain. It maps host.domain/.well-known/acme-challenge to this app for each domain/host that you want to generate a certificate for.

The LetsEncrypt client will sign the requests, go through the verification and fetch the signed certificates that you can then fetch with the cf files command.

Just watch the logs to see when the process has finished. cf logs letsencrypt

While you could leave the app running, it probably makes sense to stop it when you don't need it, and just start it up when you need to renew certificates or add another host/domain. By default it will keep running for 1 week, then kill itself. DEA will then try to restart it for you...

You can’t perform that action at this time.