All Projects → xijo → Letsencrypt_heroku

xijo / Letsencrypt_heroku

Automated letsencrypt setup for heroku

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Letsencrypt heroku

acm
Automatic wildcard certificate management for Cloudflare and Heroku
Stars: ✭ 40 (-31.03%)
Mutual labels:  heroku, letsencrypt, ssl
Ssl Proxy
🔒 Simple zero-config SSL reverse proxy with real autogenerated certificates (LetsEncrypt, self-signed, provided)
Stars: ✭ 427 (+636.21%)
Mutual labels:  ssl, letsencrypt
Dnsrobocert
Orchestrate Certbot and Lexicon together to provide Let's Encrypt TLS certificates validated by DNS challenges
Stars: ✭ 420 (+624.14%)
Mutual labels:  ssl, letsencrypt
Agoo
A High Performance HTTP Server for Ruby
Stars: ✭ 679 (+1070.69%)
Mutual labels:  rails, rack
Echo
High performance, minimalist Go web framework
Stars: ✭ 21,297 (+36618.97%)
Mutual labels:  ssl, letsencrypt
Property web builder
The ultimate Ruby on Rails engine for creating real estate websites ⛺
Stars: ✭ 414 (+613.79%)
Mutual labels:  heroku, rails
Ssl Certificate
A class to validate SSL certificates
Stars: ✭ 522 (+800%)
Mutual labels:  ssl, letsencrypt
Acme Client
Let's Encrypt / ACME client written in PHP for the CLI.
Stars: ✭ 337 (+481.03%)
Mutual labels:  ssl, letsencrypt
Docker Letsencrypt Nginx Proxy Companion
Automated ACME SSL certificate generation for nginx-proxy
Stars: ✭ 6,350 (+10848.28%)
Mutual labels:  letsencrypt, ssl
Rails Template
Application template for Rails 6 projects; preloaded with best practices for TDD, security, deployment, and developer productivity.
Stars: ✭ 763 (+1215.52%)
Mutual labels:  heroku, rails
Docker Mailserver
Production-ready fullstack but simple mail server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.) running inside a container.
Stars: ✭ 8,115 (+13891.38%)
Mutual labels:  ssl, letsencrypt
Socify
🚀 Socify is an open source social networking platform written in Ruby on Rails
Stars: ✭ 363 (+525.86%)
Mutual labels:  heroku, rails
Certes
A client implementation for the Automated Certificate Management Environment (ACME) protocol
Stars: ✭ 357 (+515.52%)
Mutual labels:  ssl, letsencrypt
Certify
SSL Certificate Manager UI for Windows, powered by Let's Encrypt. Download from certifytheweb.com
Stars: ✭ 1,075 (+1753.45%)
Mutual labels:  ssl, letsencrypt
Rack Dev Mark
Show dev mark on development env
Stars: ✭ 350 (+503.45%)
Mutual labels:  rails, rack
Ansible Role Certbot
Ansible Role - Certbot (for Let's Encrypt)
Stars: ✭ 477 (+722.41%)
Mutual labels:  ssl, letsencrypt
Chatwoot
Open-source customer engagement suite, an alternative to Intercom, Zendesk, Salesforce Service Cloud etc. 🔥💬
Stars: ✭ 11,554 (+19820.69%)
Mutual labels:  heroku, rails
Envied
Ensures presence and type of your app's ENV-variables (mirror)
Stars: ✭ 327 (+463.79%)
Mutual labels:  heroku, rails
Lamby
Simple Rails & AWS Lambda Integration 🐑🛤
Stars: ✭ 336 (+479.31%)
Mutual labels:  rails, rack
Ceryx
Dynamic reverse proxy based on NGINX OpenResty with an API
Stars: ✭ 688 (+1086.21%)
Mutual labels:  ssl, letsencrypt

letsencrypt_heroku

CLI tool to automate SSL certificate setup and renewal for letsencrypt and rails (or any other rack based application).

Procedure

To grant a SSL certificate for a given domain, letsencrypt requires a challenge request to be correctly answered on this domain. To automate this process this gem will perform the following steps for you:

  1. Register the domain and a contact email with letsencrypt
  2. Letsencrypt provides the expected challenge request answer
  3. Make your application answer correctly
  4. Trigger letsencrypt challenge process
  5. Download issued certificates from letsencrypt
  6. Setup certificates for your heroku application

Installation

Precondition: make sure the heroku cli is installed on your development machine.

In a nutshell

  1. Install the gems
  2. Deploy your application
  3. Write configuration file
  4. Run letsencrypt_heroku on your local machine
  5. Verify SSL is working correctly

The gems

gem 'letsencrypt_rack'
gem 'letsencrypt_heroku', require: false

Wait, why do I need two gems?

To perform SSL certificate setup and renewal a command line tool is used: letsencrypt_heroku. This tool will only be needed on your development machine and does not need to be loaded into your production environment.

letsencrypt_rack contains a tiny rack middleware, that answers challenge request at the following path: /.well-known/acme-challenge. It serves the contents of the LETSENCRYPT_RESPONSE environment variable.

For non rails apps

You need to add LetsencryptRack::Middleware to your rack stack:

# in config.ru
use LetsencryptRack::Middleware

Configuration

Put a configuration file under config/letsencrypt_heroku.yml that looks like this:

- contact:    [email protected]
  domains:    example.dev www.example.dev
  heroku_app: example-dev-application

Each block in this configuration will issue a new certificate, so if you need to retrieve more than one (e.g. for another environment) you can configure more:

- contact:    [email protected]
  domains:    example.dev www.example.dev
  heroku_app: example-dev-application

- contact:    [email protected]
  domains:    stg.example.dev
  heroku_app: stg-example-dev-application

You can add keep_certs: true to a block if you need to keep the generated certificate.

Please note that your application will be restarted for every single domain in your config. The restart happens automatically when the heroku challenge response gets set as environment variable.

Verify SSL is working correctly

Run curl -vI https://www.example.dev and check that it has a section that looks like this:

* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate: blindlunch.team
* Server certificate: Let's Encrypt Authority X3
* Server certificate: DST Root CA X3

You may also check the results of qualys ssltest.

Renewal

Once the process ran through the renewal is as simple as: run letsencrypt_heroku - again.

You'll receive emails from letsencrypt from time to time to remind you to renew your certificates.

CLI options

# Use a custom config file location
$ letsencrypt_heroku --config=another.yml

# Restrict for which domains the process should be run
$ letsencrypt_heroku --limit=foobar

Useful links and information

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/xijo/letsencrypt_heroku.

TODO

  • document extraordinary configuration options (multiple domain SSL on single application)
  • configurable config file location
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].