@@ -16,8 +16,8 @@ Simple way to get SSL certificates for free.
1616
1717## Features
1818
19- * Supports both Python 2 and Python 3
20- * Works with both ACMEv1 and ACMEv2 protocols
19+ * Supports both Python 2 (deprecated) and Python 3
20+ * Works with both ACMEv1 (deprecated) and ACMEv2 protocols
2121* Can issue [ wildcard certificates] ( https://en.wikipedia.org/wiki/Wildcard_certificate ) !
2222* Easy to use and extend
2323
@@ -33,7 +33,7 @@ to send `SIGHUP` to it during challenge completion.
3333As you may not trust this script feel free to check source code,
3434it's under 700 lines of code.
3535
36- Script should be run as root on host with running nginx server.
36+ Script should be run as root on host with running nginx server if you use http verification or if you use DNS verification as a regular user .
3737Domain for which you request certificate should point to that host's IP and port
383880 should be available from outside if you use HTTP challenge.
3939Script can generate all keys for you if you don't set them with command line arguments.
@@ -46,16 +46,20 @@ Should work with Python >= 2.6
4646
4747## ACME v2
4848
49- ACME v2 requires more logic so it's not as small as acme v1 script.
49+ ACME v2 requires more logic so it's not as small as ACME v1 script.
5050
5151ACME v2 is supported partially: only ` http-01 ` and ` dns-01 ` challenges.
5252Check https://tools.ietf.org/html/draft-ietf-acme-acme-07#section-9.7.6
5353
5454New protocol is used by default.
5555
56- ` http-01 ` challenge is passed exactly as in v1 protocol realisation .
56+ ` http-01 ` challenge is passed exactly as in v1 protocol realization .
5757
58- ` dns-01 ` currently supports only DigitalOcean, AWS Route53 DNS providers.
58+ ` dns-01 ` currently supports following providers:
59+
60+ - DigitalOcean
61+ - AWS Route53
62+ - Cloudflare
5963
6064Technically nginx is not needed for this type of challenge but script still calls nginx reload by default
6165because it assumes that you store certificates on the same server where you issue
@@ -65,7 +69,7 @@ AWS Route53 uses `default` profile in session, specifying profile works with env
6569Please check https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html#environment-variable-configuration
6670
6771In case you want to add support of different DNS providers your contribution is
68- highly apprectiated .
72+ highly appreciated .
6973
7074Wildcard certificates can not be issued with non-wildcard for the same domain.
7175I.e. it's not possible to issue certificates for ` *.example.com ` and
@@ -78,21 +82,35 @@ Only HTTP challenge is supported at the moment.
7882
7983## Installation
8084
81- Please be informed that the quickiest and easiest way of installation is to use your OS
82- installation way because Python way includes compilation of dependencies that
85+ Python 2 installation may require compilation of dependencies that
8386may take much time and CPU resources and may require you to install all build
8487dependencies.
8588
86- ### Fastest way
89+ ### Preferred way
8790
88- Just download executable compiled with [ pyinstaller ] ( https://github.com/pyinstaller/pyinstaller ) .
91+ Using [ poetry ] ( https://python-poetry.org/ ) .
8992
90- ```
91- wget https://github.com/kshcherban/acme-nginx/releases/download/v0.1.2/acme-nginx
92- chmod +x acme-nginx
93- ```
93+ 1 . First [ install] ( https://python-poetry.org/docs/ ) poetry:
94+
95+ ``` bash
96+ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 -
97+ source ~ /.poetry/env
98+ ```
99+
100+ 2 . Clone acme-nginx:
94101
95- ### Python way
102+ ``` bash
103+ git clone https://github.com/kshcherban/acme-nginx
104+ ```
105+
106+ 3 . Install it:
107+
108+ ``` bash
109+ cd acme-nginx
110+ poetry install
111+ ```
112+
113+ ### Python pip way
96114
97115Automatically
98116```
@@ -124,8 +142,6 @@ docker cp acme:/usr/bin/acme-runner acme-nginx
124142docker rm acme
125143```
126144
127-
128-
129145### Debian/Ubuntu way
130146
131147```
@@ -173,13 +189,12 @@ Oct 12 23:42:23 Removing /etc/nginx/sites-enabled/letsencrypt and sending HUP to
173189Certificate was generated into ` /etc/ssl/private/letsencrypt-domain.pem `
174190
175191You can now configure nginx to use it:
176- ```
192+ ``` nginx
177193server {
178194 listen 443;
179195 ssl on;
180196 ssl_certificate /etc/ssl/private/letsencrypt-domain.pem;
181197 ssl_certificate_key /etc/ssl/private/letsencrypt-domain.key;
182- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
183198 ...
184199```
185200
@@ -199,7 +214,7 @@ sudo acme-nginx \
199214### Wildcard certificates
200215
201216For wildcard certificate you need to have your domain managed by DNS provider
202- with API. Currently only [ DigitalOcean DNS] ( https://www.digitalocean.com/docs/networking/dns/ ) and
217+ with API. Currently only [ DigitalOcean DNS] ( https://www.digitalocean.com/docs/networking/dns/ ) , [ Cloudflare ] ( https://cloudflare.com ) and
203218[ AWS Route53] ( https://aws.amazon.com/route53/ ) are supported.
204219
205220Example how to get wildcard certificate without nginx
@@ -211,12 +226,25 @@ sudo acme-nginx --no-reload-nginx --dns-provider route53 -d "*.example.com"
211226
212227Please create and export your DO API token as ` API_TOKEN ` env variable.
213228Now you can generate wildcard certificate
214- ```
229+
230+ ``` bash
215231sudo su -
216232export API_TOKEN=yourDigitalOceanApiToken
217233acme-nginx --dns-provider digitalocean -d ' *.example.com'
218234```
219235
236+ ### Cloudflare
237+
238+ [ Create API token] ( https://dash.cloudflare.com/profile/api-tokens ) first. Then export it as ` API_TOKEN ` environment variable and use like this:
239+
240+ ``` bash
241+ sudo su -
242+ export API_TOKEN=yourCloudflareApiToken
243+ acme-nginx --dns-provider cloudflare -d ' *.example.com'
244+ ```
245+
246+
247+
220248### Debug
221249
222250To debug please use ` --debug ` flag. With debug enabled all intermediate files
0 commit comments