Let's Encrypt Certs Fetcher
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
acme
backups
docs
examples
letsencrypt-apache
letsencrypt-auto-source
letsencrypt-compatibility-test
letsencrypt-nginx
letsencrypt
letshelp-letsencrypt
tests
tools
.dockerignore
.gitattributes
.gitignore
.pep8
.pylintrc
.travis.yml
CHANGES.rst
CONTRIBUTING.md
Dockerfile
Dockerfile-dev
LICENSE.txt
MANIFEST.in
README.rst
Vagrantfile
docker-compose.yml
install.sh
linter_plugin.py
pep8.travis.sh
requirements.txt
setup.cfg
setup.py
tox.cover.sh
tox.ini

README.rst

Let's Encrypt Client for Nginx

Disclaimer

This is a Hack Version based on the Let's Encrypt offical Client. It's targeted on Nginx. Only support Python 2.7

Preparation

The Preparation only need to do once. Jump to Usage section if you've already done it.

  1. Pre-requirements
  • setuptools
  • pip
  • virtualenv
$ sudo apt-get install dialog
  1. Checkout the code & build the virtualenv
$ git clone https://github.com/mitnk/letsencrypt
$ cd letsencrypt
$ ./install.sh

This will create an virtualenv at ~/.local/share/letsencrypt.

  1. Setup Nginx Configs

Put the following code into every domain server config in you Nginx.

Note: Please change ``mitnk`` to your username

location /.well-known/acme-challenge/ {
    default_type text/plain;
    alias /home/mitnk/.well-known/acme-challenge/;
}

Create the directories:

$ mkdir -p ~/.well-known/acme-challenge/

Then reload Nginx (e.g. sudo nginx -s reload).

Usage

Enter virtualenv:

$ sudo ~/.local/share/letsencrypt/bin/letsencrypt -d hugo.wang -d www.hugo.wang -a manual certonly

Reload Nginx & That's it.

$ sudo nginx -s reload

See this article for how to config SSL certs in Nginx: https://mitnk.com/2015/11/lets_encrypt/