]>
Commit | Line | Data |
---|---|---|
d9f9477a | 1 | # An ACME Shell script: acme.sh |
e66337a1 | 2 | |
c2214cd4 | 3 | ![LetsEncrypt](https://github.com/acmesh-official/acme.sh/workflows/LetsEncrypt/badge.svg) |
4 | ![Shellcheck](https://github.com/acmesh-official/acme.sh/workflows/Shellcheck/badge.svg) | |
5 | ![PebbleStrict](https://github.com/acmesh-official/acme.sh/workflows/PebbleStrict/badge.svg) | |
6 | ![DockerHub](https://github.com/acmesh-official/acme.sh/workflows/Build%20DockerHub/badge.svg) | |
966c7449 | 7 | |
319d49dd | 8 | |
72235a5f | 9 | <a href="https://opencollective.com/acmesh" alt="Financial Contributors on Open Collective"><img src="https://opencollective.com/acmesh/all/badge.svg?label=financial+contributors" /></a> |
10 | [![Join the chat at https://gitter.im/acme-sh/Lobby](https://badges.gitter.im/acme-sh/Lobby.svg)](https://gitter.im/acme-sh/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | |
1f5cafc2 | 11 | [![Docker stars](https://img.shields.io/docker/stars/neilpang/acme.sh.svg)](https://hub.docker.com/r/neilpang/acme.sh "Click to view the image on Docker Hub") |
12 | [![Docker pulls](https://img.shields.io/docker/pulls/neilpang/acme.sh.svg)](https://hub.docker.com/r/neilpang/acme.sh "Click to view the image on Docker Hub") | |
966c7449 | 13 | |
236e8cc9 | 14 | |
5c295254 | 15 | |
99dc89c0 | 16 | - An ACME protocol client written purely in Shell (Unix shell) language. |
1bb90298 | 17 | - Full ACME protocol implementation. |
79a2bed6 | 18 | - Support ACME v1 and ACME v2 |
19 | - Support ACME v2 wildcard certs | |
1bb90298 AL |
20 | - Simple, powerful and very easy to use. You only need 3 minutes to learn it. |
21 | - Bash, dash and sh compatible. | |
1bb90298 AL |
22 | - Purely written in Shell with no dependencies on python or the official Let's Encrypt client. |
23 | - Just one script to issue, renew and install your certificates automatically. | |
1f60d2bb | 24 | - DOES NOT require `root/sudoer` access. |
f3b43439 | 25 | - Docker friendly |
0f48b156 | 26 | - IPv6 support |
5d468f7c | 27 | - Cron job notifications for renewal or error etc. |
6c0ab5d2 | 28 | |
9cf65e31 | 29 | It's probably the `easiest & smartest` shell script to automatically issue & renew the free certificates from Let's Encrypt. |
6c0ab5d2 | 30 | |
d795fac3 | 31 | Wiki: https://github.com/acmesh-official/acme.sh/wiki |
de9fd54e | 32 | |
d795fac3 | 33 | For Docker Fans: [acme.sh :two_hearts: Docker ](https://github.com/acmesh-official/acme.sh/wiki/Run-acme.sh-in-docker) |
1bb90298 | 34 | |
08998032 | 35 | Twitter: [@neilpangxa](https://twitter.com/neilpangxa) |
36 | ||
37 | ||
d795fac3 | 38 | # [中文说明](https://github.com/acmesh-official/acme.sh/wiki/%E8%AF%B4%E6%98%8E) |
fe04faf6 | 39 | |
bae50da7 | 40 | # Who: |
6f1c72f5 | 41 | - [FreeBSD.org](https://blog.crashed.org/letsencrypt-in-freebsd-org/) |
42 | - [ruby-china.org](https://ruby-china.org/topics/31983) | |
aaca0b6f | 43 | - [Proxmox](https://pve.proxmox.com/wiki/Certificate_Management) |
6f1c72f5 | 44 | - [pfsense](https://github.com/pfsense/FreeBSD-ports/pull/89) |
45 | - [webfaction](https://community.webfaction.com/questions/19988/using-letsencrypt) | |
46 | - [Loadbalancer.org](https://www.loadbalancer.org/blog/loadbalancer-org-with-lets-encrypt-quick-and-dirty) | |
47 | - [discourse.org](https://meta.discourse.org/t/setting-up-lets-encrypt/40709) | |
26c669e4 | 48 | - [Centminmod](https://centminmod.com/letsencrypt-acmetool-https.html) |
6f1c72f5 | 49 | - [splynx](https://forum.splynx.com/t/free-ssl-cert-for-splynx-lets-encrypt/297) |
7ff52546 | 50 | - [archlinux](https://www.archlinux.org/packages/community/any/acme.sh) |
9cf65e31 | 51 | - [opnsense.org](https://github.com/opnsense/plugins/tree/master/security/acme-client/src/opnsense/scripts/OPNsense/AcmeClient) |
a5c1c303 | 52 | - [CentOS Web Panel](http://centos-webpanel.com/) |
53 | - [lnmp.org](https://lnmp.org/) | |
d795fac3 | 54 | - [more...](https://github.com/acmesh-official/acme.sh/wiki/Blogs-and-tutorials) |
1bb90298 AL |
55 | |
56 | # Tested OS | |
57 | ||
daf56504 | 58 | | NO | Status| Platform| |
59 | |----|-------|---------| | |
a017fbad | 60 | |1|[![MacOS](https://github.com/acmesh-official/acme.sh/workflows/LetsEncrypt/badge.svg)](https://github.com/acmesh-official/acme.sh/actions?query=workflow%3ALetsEncrypt)|Mac OSX |
61 | |2|[![Windows](https://github.com/acmesh-official/acme.sh/workflows/LetsEncrypt/badge.svg)](https://github.com/acmesh-official/acme.sh/actions?query=workflow%3ALetsEncrypt)|Windows (cygwin with curl, openssl and crontab included) | |
62 | |3|[![FreeBSD](https://github.com/acmesh-official/acme.sh/workflows/LetsEncrypt/badge.svg)](https://github.com/acmesh-official/acme.sh/actions?query=workflow%3ALetsEncrypt)|FreeBSD | |
349429b7 | 63 | |4|[![Solaris](https://github.com/acmesh-official/acme.sh/workflows/LetsEncrypt/badge.svg)](https://github.com/acmesh-official/acme.sh/actions?query=workflow%3ALetsEncrypt)|Solaris |
64 | |5|[![Ubuntu](https://github.com/acmesh-official/acme.sh/workflows/LetsEncrypt/badge.svg)](https://github.com/acmesh-official/acme.sh/actions?query=workflow%3ALetsEncrypt)| Ubuntu | |
65 | |6|[![](https://acmesh-official.github.io/acmetest/status/pfsense.svg)](https://github.com/acmesh-official/acmetest#here-are-the-latest-status)|pfsense | |
66 | |7|[![](https://acmesh-official.github.io/acmetest/status/openbsd.svg)](https://github.com/acmesh-official/acmetest#here-are-the-latest-status)|OpenBSD | |
a017fbad | 67 | |8|[![](https://acmesh-official.github.io/acmetest/status/debian-latest.svg)](https://github.com/acmesh-official/acmetest#here-are-the-latest-status)| Debian |
68 | |9|[![](https://acmesh-official.github.io/acmetest/status/centos-latest.svg)](https://github.com/acmesh-official/acmetest#here-are-the-latest-status)|CentOS | |
69 | |10|[![](https://acmesh-official.github.io/acmetest/status/opensuse-leap-latest.svg)](https://github.com/acmesh-official/acmetest#here-are-the-latest-status)|openSUSE | |
70 | |11|[![](https://acmesh-official.github.io/acmetest/status/alpine-latest.svg)](https://github.com/acmesh-official/acmetest#here-are-the-latest-status)|Alpine Linux (with curl) | |
71 | |12|[![](https://acmesh-official.github.io/acmetest/status/archlinux-latest.svg)](https://github.com/acmesh-official/acmetest#here-are-the-latest-status)|Archlinux | |
72 | |13|[![](https://acmesh-official.github.io/acmetest/status/fedora-latest.svg)](https://github.com/acmesh-official/acmetest#here-are-the-latest-status)|fedora | |
73 | |14|[![](https://acmesh-official.github.io/acmetest/status/kalilinux-kali.svg)](https://github.com/acmesh-official/acmetest#here-are-the-latest-status)|Kali Linux | |
74 | |15|[![](https://acmesh-official.github.io/acmetest/status/oraclelinux-latest.svg)](https://github.com/acmesh-official/acmetest#here-are-the-latest-status)|Oracle Linux | |
75 | |16|[![](https://acmesh-official.github.io/acmetest/status/proxmox.svg)](https://github.com/acmesh-official/letest#here-are-the-latest-status)| Proxmox: See Proxmox VE Wiki. Version [4.x, 5.0, 5.1](https://pve.proxmox.com/wiki/HTTPS_Certificate_Configuration_(Version_4.x,_5.0_and_5.1)#Let.27s_Encrypt_using_acme.sh), version [5.2 and up](https://pve.proxmox.com/wiki/Certificate_Management) | |
76 | |17|-----| Cloud Linux https://github.com/acmesh-official/acme.sh/issues/111 | |
77 | |18|[![](https://acmesh-official.github.io/acmetest/status/mageia.svg)](https://github.com/acmesh-official/acmetest#here-are-the-latest-status)|Mageia | |
78 | |19|-----| OpenWRT: Tested and working. See [wiki page](https://github.com/acmesh-official/acme.sh/wiki/How-to-run-on-OpenWRT) | |
79 | |20|[![](https://acmesh-official.github.io/acmetest/status/gentoo-stage3-amd64.svg)](https://github.com/acmesh-official/acmetest#here-are-the-latest-status)|Gentoo Linux | |
aaca0b6f | 80 | |21|[![](https://acmesh-official.github.io/acmetest/status/clearlinux-latest.svg)](https://github.com/acmesh-official/acmetest#here-are-the-latest-status)|ClearLinux |
6c0ab5d2 | 81 | |
d795fac3 | 82 | For all build statuses, check our [weekly build project](https://github.com/acmesh-official/acmetest): |
6c0ab5d2 | 83 | |
d795fac3 | 84 | https://github.com/acmesh-official/acmetest |
07f4ec4f | 85 | |
c4094c68 | 86 | # Supported CA |
87 | ||
88 | - Letsencrypt.org CA(default) | |
389518e1 | 89 | - [ZeroSSL.com CA](https://github.com/acmesh-official/acme.sh/wiki/ZeroSSL.com-CA) |
d795fac3 | 90 | - [BuyPass.com CA](https://github.com/acmesh-official/acme.sh/wiki/BuyPass.com-CA) |
693d692a | 91 | - [Pebble strict Mode](https://github.com/letsencrypt/pebble) |
ab6b9006 | 92 | - Any other [RFC8555](https://tools.ietf.org/html/rfc8555)-compliant CA |
2b45dba5 | 93 | |
1bb90298 | 94 | # Supported modes |
2c75b3fd | 95 | |
1bb90298 AL |
96 | - Webroot mode |
97 | - Standalone mode | |
c9baca79 | 98 | - Standalone tls-alpn mode |
1bb90298 | 99 | - Apache mode |
d5865989 | 100 | - Nginx mode |
1bb90298 | 101 | - DNS mode |
d795fac3 | 102 | - [DNS alias mode](https://github.com/acmesh-official/acme.sh/wiki/DNS-alias-mode) |
103 | - [Stateless mode](https://github.com/acmesh-official/acme.sh/wiki/Stateless-Mode) | |
2b45dba5 | 104 | |
e8cce73a | 105 | |
df1c9d88 | 106 | # 1. How to install |
6c0ab5d2 | 107 | |
1bb90298 | 108 | ### 1. Install online |
6c0ab5d2 | 109 | |
d795fac3 | 110 | Check this project: https://github.com/acmesh-official/get.acme.sh |
b0515cf8 | 111 | |
2b45dba5 | 112 | ```bash |
565ca81b | 113 | curl https://get.acme.sh | sh -s email=my@example.com |
90dda23f | 114 | ``` |
115 | ||
116 | Or: | |
2b45dba5 SF |
117 | |
118 | ```bash | |
565ca81b | 119 | wget -O - https://get.acme.sh | sh -s email=my@example.com |
90dda23f | 120 | ``` |
121 | ||
122 | ||
1bb90298 | 123 | ### 2. Or, Install from git |
2b45dba5 | 124 | |
1bb90298 | 125 | Clone this project and launch installation: |
2b45dba5 SF |
126 | |
127 | ```bash | |
d795fac3 | 128 | git clone https://github.com/acmesh-official/acme.sh.git |
2b45dba5 | 129 | cd ./acme.sh |
565ca81b | 130 | ./acme.sh --install -m my@example.com |
6c0ab5d2 | 131 | ``` |
90dda23f | 132 | |
2b45dba5 SF |
133 | You `don't have to be root` then, although `it is recommended`. |
134 | ||
d795fac3 | 135 | Advanced Installation: https://github.com/acmesh-official/acme.sh/wiki/How-to-install |
d9ded9f3 | 136 | |
2b45dba5 | 137 | The installer will perform 3 actions: |
7a894c4c | 138 | |
1bb90298 AL |
139 | 1. Create and copy `acme.sh` to your home dir (`$HOME`): `~/.acme.sh/`. |
140 | All certs will be placed in this folder too. | |
141 | 2. Create alias for: `acme.sh=~/.acme.sh/acme.sh`. | |
142 | 3. Create daily cron job to check and renew the certs if needed. | |
2b45dba5 SF |
143 | |
144 | Cron entry example: | |
145 | ||
146 | ```bash | |
147 | 0 0 * * * "/home/user/.acme.sh"/acme.sh --cron --home "/home/user/.acme.sh" > /dev/null | |
148 | ``` | |
acc1e53a | 149 | |
1bb90298 AL |
150 | After the installation, you must close the current terminal and reopen it to make the alias take effect. |
151 | ||
152 | Ok, you are ready to issue certs now. | |
acc1e53a | 153 | |
6c0ab5d2 | 154 | Show help message: |
2b45dba5 | 155 | |
e27dfbb0 | 156 | ```sh |
39c8f79f | 157 | root@v1:~# acme.sh -h |
6c0ab5d2 | 158 | ``` |
1bb90298 AL |
159 | |
160 | # 2. Just issue a cert | |
2400e41f | 161 | |
2b45dba5 | 162 | **Example 1:** Single domain. |
2400e41f | 163 | |
2b45dba5 | 164 | ```bash |
caa2e45a | 165 | acme.sh --issue -d example.com -w /home/wwwroot/example.com |
6c0ab5d2 | 166 | ``` |
2b45dba5 | 167 | |
4c38fec3 | 168 | or: |
169 | ||
170 | ```bash | |
171 | acme.sh --issue -d example.com -w /home/username/public_html | |
172 | ``` | |
173 | ||
174 | or: | |
175 | ||
176 | ```bash | |
177 | acme.sh --issue -d example.com -w /var/www/html | |
178 | ``` | |
179 | ||
2b45dba5 SF |
180 | **Example 2:** Multiple domains in the same cert. |
181 | ||
182 | ```bash | |
1bb90298 | 183 | acme.sh --issue -d example.com -d www.example.com -d cp.example.com -w /home/wwwroot/example.com |
6c0ab5d2 | 184 | ``` |
2400e41f | 185 | |
4c38fec3 | 186 | The parameter `/home/wwwroot/example.com` or `/home/username/public_html` or `/var/www/html` is the web root folder where you host your website files. You **MUST** have `write access` to this folder. |
6c0ab5d2 | 187 | |
1bb90298 AL |
188 | Second argument **"example.com"** is the main domain you want to issue the cert for. |
189 | You must have at least one domain there. | |
6c0ab5d2 | 190 | |
caa2e45a | 191 | You must point and bind all the domains to the same webroot dir: `/home/wwwroot/example.com`. |
6c0ab5d2 | 192 | |
e27dfbb0 | 193 | The certs will be placed in `~/.acme.sh/example.com/` |
6c0ab5d2 | 194 | |
e27dfbb0 | 195 | The certs will be renewed automatically every **60** days. |
6c0ab5d2 | 196 | |
d795fac3 | 197 | More examples: https://github.com/acmesh-official/acme.sh/wiki/How-to-issue-a-cert |
a63b05a9 | 198 | |
199 | ||
e27dfbb0 | 200 | # 3. Install the cert to Apache/Nginx etc. |
a63b05a9 | 201 | |
e27dfbb0 | 202 | After the cert is generated, you probably want to install/copy the cert to your Apache/Nginx or other servers. |
1bb90298 | 203 | You **MUST** use this command to copy the certs to the target files, **DO NOT** use the certs files in **~/.acme.sh/** folder, they are for internal use only, the folder structure may change in the future. |
2b45dba5 | 204 | |
1bb90298 | 205 | **Apache** example: |
2b45dba5 | 206 | ```bash |
cd9c3a79 | 207 | acme.sh --install-cert -d example.com \ |
5c539af7 | 208 | --cert-file /path/to/certfile/in/apache/cert.pem \ |
209 | --key-file /path/to/keyfile/in/apache/key.pem \ | |
210 | --fullchain-file /path/to/fullchain/certfile/apache/fullchain.pem \ | |
4743171b | 211 | --reloadcmd "service apache2 force-reload" |
3c33cdfa | 212 | ``` |
213 | ||
1bb90298 | 214 | **Nginx** example: |
3c33cdfa | 215 | ```bash |
cd9c3a79 | 216 | acme.sh --install-cert -d example.com \ |
5c539af7 | 217 | --key-file /path/to/keyfile/in/nginx/key.pem \ |
218 | --fullchain-file /path/to/fullchain/nginx/cert.pem \ | |
4743171b | 219 | --reloadcmd "service nginx force-reload" |
6c0ab5d2 | 220 | ``` |
7a894c4c | 221 | |
a63b05a9 | 222 | Only the domain is required, all the other parameters are optional. |
223 | ||
e27dfbb0 | 224 | The ownership and permission info of existing files are preserved. You can pre-create the files to define the ownership and permission. |
fe600441 | 225 | |
e27dfbb0 | 226 | Install/copy the cert/key to the production Apache or Nginx path. |
1bb90298 | 227 | |
61852447 | 228 | The cert will be renewed every **60** days by default (which is configurable). Once the cert is renewed, the Apache/Nginx service will be reloaded automatically by the command: `service apache2 force-reload` or `service nginx force-reload`. |
7a894c4c | 229 | |
6c0ab5d2 | 230 | |
58f75313 | 231 | **Please take care: The reloadcmd is very important. The cert can be automatically renewed, but, without a correct 'reloadcmd' the cert may not be flushed to your server(like nginx or apache), then your website will not be able to show renewed cert in 60 days.** |
bae50da7 | 232 | |
df1c9d88 | 233 | # 4. Use Standalone server to issue cert |
6c0ab5d2 | 234 | |
1bb90298 | 235 | **(requires you to be root/sudoer or have permission to listen on port 80 (TCP))** |
072290f2 | 236 | |
1bb90298 | 237 | Port `80` (TCP) **MUST** be free to listen on, otherwise you will be prompted to free it and try again. |
2b45dba5 SF |
238 | |
239 | ```bash | |
caa2e45a | 240 | acme.sh --issue --standalone -d example.com -d www.example.com -d cp.example.com |
072290f2 N |
241 | ``` |
242 | ||
d795fac3 | 243 | More examples: https://github.com/acmesh-official/acme.sh/wiki/How-to-issue-a-cert |
a63b05a9 | 244 | |
c9baca79 | 245 | # 5. Use Standalone ssl server to issue cert |
e22bcf7c | 246 | |
c9baca79 | 247 | **(requires you to be root/sudoer or have permission to listen on port 443 (TCP))** |
248 | ||
249 | Port `443` (TCP) **MUST** be free to listen on, otherwise you will be prompted to free it and try again. | |
250 | ||
251 | ```bash | |
252 | acme.sh --issue --alpn -d example.com -d www.example.com -d cp.example.com | |
253 | ``` | |
254 | ||
d795fac3 | 255 | More examples: https://github.com/acmesh-official/acme.sh/wiki/How-to-issue-a-cert |
c9baca79 | 256 | |
257 | ||
258 | # 6. Use Apache mode | |
2b45dba5 | 259 | |
1bb90298 | 260 | **(requires you to be root/sudoer, since it is required to interact with Apache server)** |
2b45dba5 | 261 | |
e8defd82 | 262 | If you are running a web server, it is recommended to use the `Webroot mode`. |
a63b05a9 | 263 | |
d5865989 | 264 | Particularly, if you are running an Apache server, you can use Apache mode instead. This mode doesn't write any files to your web root folder. |
2c75b3fd | 265 | |
1bb90298 | 266 | Just set string "apache" as the second argument and it will force use of apache plugin automatically. |
2c75b3fd | 267 | |
e27dfbb0 | 268 | ```sh |
1bb90298 | 269 | acme.sh --issue --apache -d example.com -d www.example.com -d cp.example.com |
2c75b3fd | 270 | ``` |
a63b05a9 | 271 | |
84d80e93 | 272 | **This apache mode is only to issue the cert, it will not change your apache config files. |
d5865989 | 273 | You will need to configure your website config files to use the cert by yourself. |
f8662c9b | 274 | We don't want to mess with your apache server, don't worry.** |
d5865989 | 275 | |
d795fac3 | 276 | More examples: https://github.com/acmesh-official/acme.sh/wiki/How-to-issue-a-cert |
2c75b3fd | 277 | |
c9baca79 | 278 | # 7. Use Nginx mode |
1bb90298 | 279 | |
9d725af6 | 280 | **(requires you to be root/sudoer, since it is required to interact with Nginx server)** |
281 | ||
e8defd82 | 282 | If you are running a web server, it is recommended to use the `Webroot mode`. |
9d725af6 | 283 | |
284 | Particularly, if you are running an nginx server, you can use nginx mode instead. This mode doesn't write any files to your web root folder. | |
285 | ||
286 | Just set string "nginx" as the second argument. | |
287 | ||
288 | It will configure nginx server automatically to verify the domain and then restore the nginx config to the original version. | |
289 | ||
290 | So, the config is not changed. | |
291 | ||
e27dfbb0 | 292 | ```sh |
9d725af6 | 293 | acme.sh --issue --nginx -d example.com -d www.example.com -d cp.example.com |
294 | ``` | |
295 | ||
84d80e93 | 296 | **This nginx mode is only to issue the cert, it will not change your nginx config files. |
d5865989 | 297 | You will need to configure your website config files to use the cert by yourself. |
f8662c9b | 298 | We don't want to mess with your nginx server, don't worry.** |
d5865989 | 299 | |
d795fac3 | 300 | More examples: https://github.com/acmesh-official/acme.sh/wiki/How-to-issue-a-cert |
9d725af6 | 301 | |
c9baca79 | 302 | # 8. Automatic DNS API integration |
a947dbc6 | 303 | |
1bb90298 | 304 | If your DNS provider supports API access, we can use that API to automatically issue the certs. |
6c0ab5d2 | 305 | |
1bb90298 | 306 | You don't have to do anything manually! |
ab497961 | 307 | |
236acbd6 | 308 | ### Currently acme.sh supports most of the dns providers: |
309 | ||
d795fac3 | 310 | https://github.com/acmesh-official/acme.sh/wiki/dnsapi |
ab497961 | 311 | |
c9baca79 | 312 | # 9. Use DNS manual mode: |
e27dfbb0 | 313 | |
d795fac3 | 314 | See: https://github.com/acmesh-official/acme.sh/wiki/dns-manual-mode first. |
46ac97a3 | 315 | |
f190de39 | 316 | If your dns provider doesn't support any api access, you can add the txt record by hand. |
e27dfbb0 | 317 | |
318 | ```bash | |
319 | acme.sh --issue --dns -d example.com -d www.example.com -d cp.example.com | |
320 | ``` | |
321 | ||
322 | You should get an output like below: | |
323 | ||
324 | ```sh | |
325 | Add the following txt record: | |
326 | Domain:_acme-challenge.example.com | |
327 | Txt value:9ihDbjYfTExAYeDs4DBUeuTo18KBzwvTEjUnSwd32-c | |
328 | ||
329 | Add the following txt record: | |
330 | Domain:_acme-challenge.www.example.com | |
331 | Txt value:9ihDbjxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
332 | ||
333 | Please add those txt records to the domains. Waiting for the dns to take effect. | |
334 | ``` | |
335 | ||
336 | Then just rerun with `renew` argument: | |
337 | ||
338 | ```bash | |
339 | acme.sh --renew -d example.com | |
340 | ``` | |
341 | ||
342 | Ok, it's done. | |
343 | ||
344 | **Take care, this is dns manual mode, it can not be renewed automatically. you will have to add a new txt record to your domain by your hand when you renew your cert.** | |
345 | ||
346 | **Please use dns api mode instead.** | |
ab497961 | 347 | |
c9baca79 | 348 | # 10. Issue ECC certificates |
2b45dba5 | 349 | |
1bb90298 | 350 | `Let's Encrypt` can now issue **ECDSA** certificates. |
2b45dba5 | 351 | |
1bb90298 | 352 | And we support them too! |
1add47a6 | 353 | |
d5865989 | 354 | Just set the `keylength` parameter with a prefix `ec-`. |
2b45dba5 | 355 | |
1add47a6 | 356 | For example: |
9e6c4208 | 357 | |
bcbecff6 | 358 | ### Single domain ECC certificate |
9e6c4208 | 359 | |
2b45dba5 | 360 | ```bash |
1bb90298 | 361 | acme.sh --issue -w /home/wwwroot/example.com -d example.com --keylength ec-256 |
1add47a6 | 362 | ``` |
2b45dba5 | 363 | |
1bb90298 | 364 | ### SAN multi domain ECC certificate |
2b45dba5 SF |
365 | |
366 | ```bash | |
1bb90298 | 367 | acme.sh --issue -w /home/wwwroot/example.com -d example.com -d www.example.com --keylength ec-256 |
9e6c4208 N |
368 | ``` |
369 | ||
d5865989 | 370 | Please look at the `keylength` parameter above. |
1add47a6 | 371 | |
372 | Valid values are: | |
373 | ||
2b45dba5 SF |
374 | 1. **ec-256 (prime256v1, "ECDSA P-256")** |
375 | 2. **ec-384 (secp384r1, "ECDSA P-384")** | |
376 | 3. **ec-521 (secp521r1, "ECDSA P-521", which is not supported by Let's Encrypt yet.)** | |
1add47a6 | 377 | |
df1c9d88 | 378 | |
df1c9d88 | 379 | |
c9baca79 | 380 | # 11. Issue Wildcard certificates |
df1c9d88 | 381 | |
e27dfbb0 | 382 | It's simple, just give a wildcard domain as the `-d` parameter. |
df1c9d88 | 383 | |
e27dfbb0 | 384 | ```sh |
f2aa5c02 | 385 | acme.sh --issue -d example.com -d '*.example.com' --dns dns_cf |
df1c9d88 | 386 | ``` |
e27dfbb0 | 387 | |
388 | ||
389 | ||
c9baca79 | 390 | # 12. How to renew the certs |
e27dfbb0 | 391 | |
392 | No, you don't need to renew the certs manually. All the certs will be renewed automatically every **60** days. | |
393 | ||
394 | However, you can also force to renew a cert: | |
395 | ||
396 | ```sh | |
1bb90298 | 397 | acme.sh --renew -d example.com --force |
df1c9d88 | 398 | ``` |
399 | ||
400 | or, for ECC cert: | |
1bb90298 | 401 | |
e27dfbb0 | 402 | ```sh |
1bb90298 | 403 | acme.sh --renew -d example.com --force --ecc |
df1c9d88 | 404 | ``` |
405 | ||
1bb90298 | 406 | |
c9baca79 | 407 | # 13. How to stop cert renewal |
a4964b90 | 408 | |
e27dfbb0 | 409 | To stop renewal of a cert, you can execute the following to remove the cert from the renewal list: |
a4964b90 | 410 | |
e27dfbb0 | 411 | ```sh |
a4964b90 FW |
412 | acme.sh --remove -d example.com [--ecc] |
413 | ``` | |
414 | ||
e27dfbb0 | 415 | The cert/key file is not removed from the disk. |
a4964b90 | 416 | |
e27dfbb0 | 417 | You can remove the respective directory (e.g. `~/.acme.sh/example.com`) by yourself. |
a4964b90 | 418 | |
e27dfbb0 | 419 | |
c9baca79 | 420 | # 14. How to upgrade `acme.sh` |
1bb90298 | 421 | |
329174b6 | 422 | acme.sh is in constant development, so it's strongly recommended to use the latest code. |
df1c9d88 | 423 | |
424 | You can update acme.sh to the latest code: | |
1bb90298 | 425 | |
e27dfbb0 | 426 | ```sh |
df1c9d88 | 427 | acme.sh --upgrade |
428 | ``` | |
429 | ||
1bb90298 AL |
430 | You can also enable auto upgrade: |
431 | ||
e27dfbb0 | 432 | ```sh |
1bb90298 | 433 | acme.sh --upgrade --auto-upgrade |
59649e9b | 434 | ``` |
1bb90298 AL |
435 | |
436 | Then **acme.sh** will be kept up to date automatically. | |
59649e9b | 437 | |
438 | Disable auto upgrade: | |
1bb90298 | 439 | |
e27dfbb0 | 440 | ```sh |
1bb90298 | 441 | acme.sh --upgrade --auto-upgrade 0 |
59649e9b | 442 | ``` |
443 | ||
1bb90298 | 444 | |
c9baca79 | 445 | # 15. Issue a cert from an existing CSR |
8371b030 | 446 | |
d795fac3 | 447 | https://github.com/acmesh-official/acme.sh/wiki/Issue-a-cert-from-existing-CSR |
8371b030 | 448 | |
449 | ||
5d468f7c | 450 | # 16. Send notifications in cronjob |
451 | ||
d795fac3 | 452 | https://github.com/acmesh-official/acme.sh/wiki/notify |
5d468f7c | 453 | |
454 | ||
455 | # 17. Under the Hood | |
6c0ab5d2 | 456 | |
99dc89c0 | 457 | Speak ACME language using shell, directly to "Let's Encrypt". |
6c0ab5d2 N |
458 | |
459 | TODO: | |
460 | ||
1bb90298 | 461 | |
5d468f7c | 462 | # 18. Acknowledgments |
1bb90298 | 463 | |
63f04675 N |
464 | 1. Acme-tiny: https://github.com/diafygi/acme-tiny |
465 | 2. ACME protocol: https://github.com/ietf-wg-acme/acme | |
63f04675 | 466 | |
1bb90298 | 467 | |
683592fa | 468 | ## Contributors |
469 | ||
470 | ### Code Contributors | |
471 | ||
472 | This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. | |
d795fac3 | 473 | <a href="https://github.com/acmesh-official/acme.sh/graphs/contributors"><img src="https://opencollective.com/acmesh/contributors.svg?width=890&button=false" /></a> |
683592fa | 474 | |
475 | ### Financial Contributors | |
476 | ||
477 | Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/acmesh/contribute)] | |
478 | ||
479 | #### Individuals | |
480 | ||
481 | <a href="https://opencollective.com/acmesh"><img src="https://opencollective.com/acmesh/individuals.svg?width=890"></a> | |
482 | ||
483 | #### Organizations | |
484 | ||
485 | Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/acmesh/contribute)] | |
486 | ||
487 | <a href="https://opencollective.com/acmesh/organization/0/website"><img src="https://opencollective.com/acmesh/organization/0/avatar.svg"></a> | |
488 | <a href="https://opencollective.com/acmesh/organization/1/website"><img src="https://opencollective.com/acmesh/organization/1/avatar.svg"></a> | |
489 | <a href="https://opencollective.com/acmesh/organization/2/website"><img src="https://opencollective.com/acmesh/organization/2/avatar.svg"></a> | |
490 | <a href="https://opencollective.com/acmesh/organization/3/website"><img src="https://opencollective.com/acmesh/organization/3/avatar.svg"></a> | |
491 | <a href="https://opencollective.com/acmesh/organization/4/website"><img src="https://opencollective.com/acmesh/organization/4/avatar.svg"></a> | |
492 | <a href="https://opencollective.com/acmesh/organization/5/website"><img src="https://opencollective.com/acmesh/organization/5/avatar.svg"></a> | |
493 | <a href="https://opencollective.com/acmesh/organization/6/website"><img src="https://opencollective.com/acmesh/organization/6/avatar.svg"></a> | |
494 | <a href="https://opencollective.com/acmesh/organization/7/website"><img src="https://opencollective.com/acmesh/organization/7/avatar.svg"></a> | |
495 | <a href="https://opencollective.com/acmesh/organization/8/website"><img src="https://opencollective.com/acmesh/organization/8/avatar.svg"></a> | |
496 | <a href="https://opencollective.com/acmesh/organization/9/website"><img src="https://opencollective.com/acmesh/organization/9/avatar.svg"></a> | |
497 | ||
5d468f7c | 498 | # 19. License & Others |
6c0ab5d2 N |
499 | |
500 | License is GPLv3 | |
501 | ||
1d06c947 | 502 | Please Star and Fork me. |
6c0ab5d2 | 503 | |
d795fac3 | 504 | [Issues](https://github.com/acmesh-official/acme.sh/issues) and [pull requests](https://github.com/acmesh-official/acme.sh/pulls) are welcome. |
6c0ab5d2 N |
505 | |
506 | ||
5d468f7c | 507 | # 20. Donate |
cb6f6229 | 508 | Your donation makes **acme.sh** better: |
6c0ab5d2 | 509 | |
43d3b51b | 510 | 1. PayPal/Alipay(支付宝)/Wechat(微信): [https://donate.acme.sh/](https://donate.acme.sh/) |
84d80e93 | 511 | |
d795fac3 | 512 | [Donate List](https://github.com/acmesh-official/acme.sh/wiki/Donate-list) |