Acme.sh: Unterschied zwischen den Versionen

Aus Foxwiki
K Textersetzung - „= Umgebungsvariablen =“ durch „= Umgebung =“
 
(39 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
'''topic''' - Kurzbeschreibung
'''acme.sh''' - [[ACME]]-Shell-Skript
 
== Beschreibung ==
== Beschreibung ==
; Ein ACME-Shell-Skript: acme.sh
Ein ACME-Protokoll-Client, der ausschließlich in Shell-Sprache (Unix-Shell) geschrieben ist
* Ein ACME-Protokoll-Client, der ausschließlich in Shell-Sprache (Unix-Shell) geschrieben ist.
* Vollständige Implementierung des ACME-Protokolls
* Vollständige Implementierung des ACME-Protokolls.
* Unterstützung von ECDSA-Zertifikaten
* Unterstützung von ECDSA-Zertifikaten
* Unterstützung von SAN- und Wildcard-Zertifikaten
* Unterstützung von SAN- und Wildcard-Zertifikaten
* Einfach, leistungsstark und sehr leicht zu bedienen. Sie brauchen nur 3 Minuten, um es zu lernen.
* Einfach, leistungsstark und sehr leicht zu bedienen. Sie brauchen nur 3 Minuten, um es zu lernen
* Kompatibel mit Bash, Dash und Sh.
* Kompatibel mit Bash, Dash und Sh
* Rein in Shell geschrieben, ohne Abhängigkeiten von Python.
* Rein in Shell geschrieben, ohne Abhängigkeiten von Python
* Ein einziges Skript zur automatischen Ausstellung, Erneuerung und Installation Ihrer Zertifikate.
* Ein einziges Skript zur automatischen Ausstellung, Erneuerung und Installation Ihrer Zertifikate
* Erfordert KEINEN <code>root/sudoer-Zugang</code>.
* Erfordert KEINEN <code>root/sudoer-Zugang</code>
* Docker bereit
* Docker bereit
* IPv6 bereit
* IPv6 bereit
* Cron-Job-Benachrichtigungen für Erneuerung oder Fehler usw.
* Cron-Job-Benachrichtigungen für Erneuerung oder Fehler usw
 
Es ist wahrscheinlich das <code>einfachste und intelligenteste</code> Shell-Skript zur automatischen Ausstellung und Erneuerung von kostenlosen Zertifikaten.
 
Wiki: <nowiki>https://github.com/acmesh-official/acme.sh/wiki</nowiki>
 
Für Docker-Fans: acme.sh 💕 Docker


Twitter: @neilpangxa
Es ist wahrscheinlich das <code>einfachste und intelligenteste</code> Shell-Skript zur automatischen Ausstellung und Erneuerung von kostenlosen Zertifikaten


== Wer: ==
; Siehe auch
# https://github.com/acmesh-official/acme.sh/wiki


; Wer setzt ''acme.sh'' ein?
* FreeBSD.org
* FreeBSD.org
* ruby-china.org
* ruby-china.org
Zeile 36: Zeile 32:
* CentOS-Web-Panel
* CentOS-Web-Panel
* lnmp.org
* lnmp.org
* mehr...
*


== Getestetes OS ==
=== Unterstützte [[CA]] ===
{| class="wikitable"
!NO
!Status
!Plattform
|-
|1
|
|Mac OSX
|-
|2
|
|Windows (cygwin mit curl, openssl und crontab enthalten)
|-
|3
|
|FreeBSD
|-
|4
|
|Solaris
|-
|5
|
|Ubuntu
|-
|6
|NA
|pfsense
|-
|7
|
|OpenBSD
|-
|8
|
|NetBSD
|-
|9
|
|DragonFlyBSD
|-
|10
|
|Omnios
|-
|11
|
|Debian
|-
|12
|
|CentOS
|-
|13
|
|openSUSE
|-
|14
|
|Alpine Linux (mit curl)
|-
|15
|
|Archlinux
|-
|16
|
|fedora
|-
|17
|
|Kali Linux
|-
|18
|
|Oracle Linux
|-
|19
|
|Mageia
|-
|10
|
|Gentoo Linux
|-
|11
|
|ClearLinux
|-
|22
| -----
|Wolke Linux #111
|-
|23
| -----
|OpenWRT: Getestet und funktioniert. Siehe Wikiseite
|-
|24
|
|Proxmox: Siehe Proxmox VE Wiki. Version 4.x, 5.0, 5.1, Version 5.2 und höher
|}
Prüfen Sie unser Testprojekt:
 
<nowiki>https://github.com/acmesh-official/acmetest</nowiki>
 
== Unterstützte [[CA]] ==
* ZeroSSL.com CA(Standard)
* ZeroSSL.com CA(Standard)
* Letsencrypt.org CA
* Letsencrypt.org CA
Zeile 153: Zeile 43:
* Jede andere RFC8555-konforme CA
* Jede andere RFC8555-konforme CA


== Unterstützte Modi ==
=== Unterstützte Modi ===
* Webroot-Modus
* Webroot-Modus
* Standalone-Modus
* Standalone-Modus
Zeile 163: Zeile 53:
* Zustandsloser Modus
* Zustandsloser Modus


== 1. Wie wird installiert ==
== Installation ==
=== Online installieren ===
https://github.com/acmesh-official/get.acme.sh


==== 1. Online installieren ====
Prüfen Sie dieses Projekt: <nowiki>https://github.com/acmesh-official/get.acme.sh</nowiki>
  curl <nowiki>https://get.acme.sh</nowiki> | sh -s email=my@example.com
  curl <nowiki>https://get.acme.sh</nowiki> | sh -s email=my@example.com
Oder:
oder
  wget -O -  <nowiki>https://get.acme.sh</nowiki> | sh -s email=my@example.com
  wget -O -  <nowiki>https://get.acme.sh</nowiki> | sh -s email=my@example.com


==== 2. Oder, Installieren von git ====
=== Installieren von git ===
Klonen Sie dieses Projekt und starten Sie die Installation:
Klonen Sie dieses Projekt und starten Sie die Installation:
  git clone <nowiki>https://github.com/acmesh-official/acme.sh.git</nowiki>
  git clone <nowiki>https://github.com/acmesh-official/acme.sh.git</nowiki>
  cd ./acme.sh
  cd ./acme.sh
  ./acme.sh --install -m my@example.com
  ./acme.sh --install -m my@example.com
Sie <code>müssen</code> also <code>nicht unbedingt Root sein</code>, obwohl <code>es empfohlen wird</code>.


Erweiterte Installation: <nowiki>https://github.com/acmesh-official/acme.sh/wiki/How-to-install</nowiki>
Sie <code>müssen</code> also <code>nicht unbedingt Root sein</code>, obwohl <code>es empfohlen wird</code>


Das Installationsprogramm wird 3 Aktionen durchführen:
; Siehe auch
https://github.com/acmesh-official/acme.sh/wiki/How-to-install


# Erstellen und kopieren Sie <code>acme.sh</code> in Ihr Heimatverzeichnis<code>($HOME</code>): <code>~/.acme.sh/</code>. Alle Zertifikate werden ebenfalls in diesem Ordner abgelegt.
=== Installationsprogramm ===
# Alias erstellen für: <code>acme.sh=~/.acme.sh/acme.sh</code>.
Das Installationsprogramm wird 3 Aktionen durchführen
# Erstellen Sie einen täglichen Cron-Job, um die Zertifikate zu überprüfen und bei Bedarf zu erneuern.
# Erstellen und kopieren Sie <code>acme.sh</code> in Ihr Heimatverzeichnis<code>($HOME</code>): <code>~/.acme.sh/</code>. Alle Zertifikate werden ebenfalls in diesem Ordner abgelegt
 
# Alias erstellen für: <code>acme.sh=~/.acme.sh/acme.sh</code>
Beispiel für einen Cron-Eintrag:
# Erstellen Sie einen täglichen Cron-Job, um die Zertifikate zu überprüfen und bei Bedarf zu erneuern
#: Beispiel für einen Cron-Eintrag:
  0 0 * * * "/home/user/.acme.sh"/acme.sh --cron --home "/home/user/.acme.sh" > /dev/null
  0 0 * * * "/home/user/.acme.sh"/acme.sh --cron --home "/home/user/.acme.sh" > /dev/null
Nach der Installation müssen Sie das aktuelle Terminal schließen und es erneut öffnen, damit der Alias wirksam wird.
:Nach der Installation müssen Sie das aktuelle Terminal schließen und es erneut öffnen, damit der Alias wirksam wird


Ok, Sie sind jetzt bereit, Zertifikate auszustellen.
Sie sind jetzt bereit, Zertifikate auszustellen


Hilfemeldung anzeigen:
== Syntax ==
  root@v1:~# acme.sh -h
  acme.sh <command> ... [parameters ...]


== 2. Einfach eine Bescheinigung ausstellen ==
=== Commands ===
'''Beispiel 1:''' Einzelner Bereich.
{| class="wikitable sortable options"
acme.sh --issue -d example.com -w /home/wwwroot/example.com
|-
oder:
! Unix !! GNU !! Beschreibung
acme.sh --issue -d example.com -w /home/username/public_html
|-
oder:
| -h || --help || Show this help message
acme.sh --issue -d example.com -w /var/www/html
|-
'''Beispiel 2:''' Mehrere Domänen in derselben Zertifikation.
| -v || --version || Show version info
acme.sh --issue -d example.com -d www.example.com -d cp.example.com -w /home/wwwroot/example.com
|-
Der Parameter <code>/home/wwwroot/example.com</code> oder <code>/home/username/public_html</code> oder <code>/var/www/html</code> ist der Web-Stammordner, in dem Sie die Dateien Ihrer Website hosten. Sie '''MÜSSEN''' <code>Schreibzugriff</code> auf diesen Ordner haben.
| || --install || Install acme.sh to your system
|-
| || --uninstall || Uninstall acme.sh, and uninstall the cron job
|-
| || --upgrade || Upgrade acme.sh to the latest code from https://github.com/acmesh-official/acme.sh
|-
| || --issue || Issue a cert
|-
| || --deploy || Deploy the cert to your server
|-
| -i || --install-cert || Install the issued cert to apache/nginx or any other server
|-
| -r || --renew || Renew a cert
|-
| || --renew-all || Renew all the certs
|-
| || --revoke || Revoke a cert
|-
| || --remove || Remove the cert from list of certs known to acme.sh
|-
| || --list || List all the certs
|-
| || --info || Show the acme.sh configs, or the configs for a domain with [-d domain] parameter
|-
| || --to-pkcs12 || Export the certificate and key to a pfx file
|-
| || --to-pkcs8 || Convert to pkcs8 format
|-
| || --sign-csr || Issue a cert from an existing csr
|-
| || --show-csr || Show the content of a csr
|-
| -ccr || --create-csr || Create CSR, professional use
|-
| || --create-domain-key || Create an domain private key, professional use
|-
| || --update-account || Update account info
|-
| || --register-account || Register account key
|-
| || --deactivate-account || Deactivate the account
|-
| || --create-account-key || Create an account private key, professional use
|-
| || --install-cronjob || Install the cron job to renew certs, you don't need to call this. The 'install' command can automatically install the cron job
|-
| || --uninstall-cronjob || Uninstall the cron job. The 'uninstall' command can do this automatically
|-
| || --cron || Run cron job to renew all the certs
|-
| || --set-notify || Set the cron notification hook, level or mode
|-
| || --deactivate || Deactivate the domain authz, professional use
|-
| || --set-default-ca || Used with '--server', Set the default CA to use. See: https://github.com/acmesh-official/acme.sh/wiki/Server
|-
| || --set-default-chain || Set the default preferred chain for a CA. See: https://github.com/acmesh-official/acme.sh/wiki/Preferred-Chain
|-
|}


Das zweite Argument '''"example.com"''' ist die Hauptdomain, für die Sie das Zertifikat ausstellen möchten. Sie müssen dort mindestens eine Domain haben.
=== Parameters ===
{| class="wikitable sortable options"
|-
! Option !! Beschreibung
|-
| -d || --domain <domain.tld> || Specifies a domain, used to issue, renew or revoke etc
|-
| || challenge-alias <domain.tld> || The challenge domain alias for DNS alias mode. See: https://github.com/acmesh-official/acme.sh/wiki/DNS-alias-mode
|-
| || domain-alias <domain.tld> || The domain alias for DNS alias mode. See: https://github.com/acmesh-official/acme.sh/wiki/DNS-alias-mode
|-
| || preferred-chain <chain> || If the CA offers multiple certificate chains, prefer the chain with an issuer matching this Subject Common Name. If no match, the default offered chain will be used. (default: empty) See: https://github.com/acmesh-official/acme.sh/wiki/Preferred-Chain
|-
| || valid-to || <date-time> || Request the NotAfter field of the cert. See: https://github.com/acmesh-official/acme.sh/wiki/Validity
|-
| || valid-from || <date-time> || Request the NotBefore field of the cert. See: https://github.com/acmesh-official/acme.sh/wiki/Validity
|-
| -f || --force || Force install, force cert renewal or override sudo restrictions
|-
| || staging || --test || Use staging server, for testing
|-
| || debug [0|1|2|3] || Output debug info. Defaults to 2 if argument is omitted
|-
| || output-insecure || Output all the sensitive messages. By default all the credentials/sensitive messages are hidden from the output/debug/log for security
|-
| -w || --webroot <directory> || Specifies the web root folder for web root mode
|-
| || standalone || Use standalone mode
|-
| || alpn || Use standalone alpn mode
|-
| || stateless || Use stateless mode. See: https://github.com/acmesh-official/acme.sh/wiki/Stateless-Mode
|-
| || apache || Use apache mode
|-
| || dns [dns_hook] || Use dns manual mode or dns api. Defaults to manual mode when argument is omitted. See: https://github.com/acmesh-official/acme.sh/wiki/dnsapi
|-
| || dnssleep <seconds> || The time in seconds to wait for all the txt records to propagate in dns api mode. It's not necessary to use this by default, acme.sh polls dns status by DOH automatically
|-
| -k || --keylength <bits> || Specifies the domain key length: 2048, 3072, 4096, 8192 or ec-256, ec-384, ec-521
|-
| -ak || --accountkeylength <bits> || Specifies the account key length: 2048, 3072, 4096
|-
| || log [file] || Specifies the log file. Defaults to "/root/.acme.sh/acme.sh.log" if argument is omitted
|-
| || log-level <1|2> || Specifies the log level, default is 2
|-
| || syslog <0|3|6|7> || Syslog level, 0: disable syslog, 3: error, 6: info, 7: debug
|-
| || eab-kid <eab_key_id> || Key Identifier for External Account Binding
|-
| || eab-hmac-key <eab_hmac_key> || HMAC key for External Account Binding
|-
|}


Sie müssen alle Domänen auf das gleiche Webroot-Verzeichnis verweisen und binden: <code>/home/wwwroot/example.com</code>.
=== Install the cert ===
These parameters are to install the cert to nginx/apache or any other server after issue/renew a cert:
{| class="wikitable sortable options"
|-
! Option !! Beschreibung
|-
| || --cert-file <file> || Path to copy the cert file to after issue/renew
|-
| || --key-file <file> || Path to copy the key file to after issue/renew
|-
| || --ca-file <file> || Path to copy the intermediate cert file to after issue/renew
|-
| || --fullchain-file <file> || Path to copy the fullchain cert file to after issue/renew
|-
| || --reloadcmd <command> || Command to execute after issue/renew to reload the server
|-
| || --server <server_uri> || ACME Directory Resource URI. (default: https://acme.zerossl.com/v2/DV90). See: https://github.com/acmesh-official/acme.sh/wiki/Server
|-
| || --accountconf <file> || Specifies a customized account config file
|-
| || --home <directory> || Specifies the home dir for acme.sh
|-
| || --cert-home <directory> || Specifies the home dir to save all the certs, only valid for '--install' command
|-
| || --config-home <directory> || Specifies the home dir to save all the configurations
|-
| || --useragent <string> || Specifies the user agent string. it will be saved for future use too
|-
| -m, --email <email> || Specifies the account email, only valid for the '--install' and '--update-account' command
|-
| || --accountkey <file> || Specifies the account key path, only valid for the '--install' command
|-
| || --days <ndays> || Specifies the days to renew the cert when using '--issue' command. The default value is 60 days
|-
| || --httpport <port> || Specifies the standalone listening port. Only valid if the server is behind a reverse proxy or load balancer
|-
| || --tlsport <port> || Specifies the standalone tls listening port. Only valid if the server is behind a reverse proxy or load balancer
|-
| || --local-address <ip> || Specifies the standalone/tls server listening address, in case you have multiple ip addresses
|-
| || --listraw || Only used for '--list' command, list the certs in raw format
|-
| -se, --stop-renew-on-error || Only valid for '--renew-all' command. Stop if one cert has error in renewal
|-
| || --insecure || Do not check the server certificate, in some devices, the api server's certificate may not be trusted
|-
| || --ca-bundle <file> || Specifies the path to the CA certificate bundle to verify api server's certificate
|-
| || --ca-path <directory> || Specifies directory containing CA certificates in PEM format, used by wget or curl
|-
| || --no-cron || Only valid for '--install' command, which means: do not install the default cron job. In this case, the certs will not be renewed automatically
|-
| || --no-profile || Only valid for '--install' command, which means: do not install aliases to user profile
|-
| || --no-color || Do not output color text
|-
| || --force-color || Force output of color text. Useful for non-interactive use with the aha tool for HTML E-Mails
|-
| || --ecc || Specifies use of the ECC cert. Only valid for '--install-cert', '--renew', '--remove ', '--revoke'
'--deploy', '--to-pkcs8', '--to-pkcs12' and '--create-csr'
|-
| || --csr <file> || Specifies the input csr
|-
| || --pre-hook <command> || Command to be run before obtaining any certificates
|-
| || --post-hook <command> || Command to be run after attempting to obtain/renew certificates. Runs regardless of whether obtain/renew succeeded or failed
|-
| || --renew-hook <command> || Command to be run after each successfully renewed certificate
|-
| || --deploy-hook <hookname> || The hook file to deploy cert
|-
| || --ocsp, --ocsp-must-staple || Generate OCSP-Must-Staple extension
|-
| || --always-force-new-domain-key || Generate new domain key on renewal. Otherwise, the domain key is not changed by default
|-
| || --auto-upgrade [0|1] || Valid for '--upgrade' command, indicating whether to upgrade automatically in future. Defaults to 1 if argument is omitted
|-
| || --listen-v4 || Force standalone/tls server to listen at ipv4
|-
| || --listen-v6 || Force standalone/tls server to listen at ipv6
|-
| || --openssl-bin <file> || Specifies a custom openssl bin location
|-
| || --use-wget || Force to use wget, if you have both curl and wget installed
|-
| || --yes-I-know-dns-manual-mode-enough-go-ahead-please Force use of dns manual mode. See: https://github.com/acmesh-official/acme.sh/wiki/dns-manual-mode
|-
| -b, --branch <branch> || Only valid for '--upgrade' command, specifies the branch name to upgrade to
|-
| || --notify-level <0|1|2|3> || Set the notification level: Default value is 2
0: disabled, no notification will be sent
1: send notifications only when there is an error
2: send notifications when a cert is successfully renewed, or there is an error
3: send notifications when a cert is skipped, renewed, or error
|-
| || --notify-mode <0|1> || Set notification mode. Default value is 0
0: Bulk mode. Send all the domain's notifications in one message(mail)
1: Cert mode. Send a message for every single cert
|-
| || --notify-hook <hookname> || Set the notify hook
|-
| || --notify-source <server name> || Set the server name in the notification message.
|-
| || --revoke-reason <0-10> || The reason for revocation, can be used in conjunction with the '--revoke' command. See: https://github.com/acmesh-official/acme.sh/wiki/revokecert
|-
| || --password <password> || Add a password to exported pfx file. Use with --to-pkcs12
|}


Die Zertifikate werden in <code>~/.acme.sh/example.com/</code> abgelegt.
=== Umgebung ===
=== Rückgabewert ===


Die Zertifikate werden automatisch alle '''60''' Tage erneuert.
== Anwendung ==
 
[[Acme.sh/Anwendung]]
Weitere Beispiele: <nowiki>https://github.com/acmesh-official/acme.sh/wiki/How-to-issue-a-cert</nowiki>
 
== 3. Installieren Sie das Zertifikat auf Apache/Nginx usw. ==
Nachdem das Zertifikat generiert wurde, möchten Sie es wahrscheinlich auf Ihren Apache/Nginx- oder anderen Servern installieren/kopieren. Sie '''MÜSSEN''' diesen Befehl verwenden, um die Zertifikate in die Zieldateien zu kopieren, verwenden Sie '''NICHT''' die Zertifikatsdateien im Ordner '''~/.acme.sh/''', sie sind nur für den internen Gebrauch, die Ordnerstruktur kann sich in Zukunft ändern.
 
Beispiel '''Apache''':
acme.sh --install-cert -d example.com \
--cert-file      /path/to/certfile/in/apache/cert.pem  \
--key-file      /path/to/keyfile/in/apache/key.pem  \
--fullchain-file /path/to/fullchain/certfile/apache/fullchain.pem \
--reloadcmd    "service apache2 force-reload"
'''Nginx''' Beispiel:
acme.sh --install-cert -d example.com \
--key-file      /path/to/keyfile/in/nginx/key.pem  \
--fullchain-file /path/to/fullchain/nginx/cert.pem \
--reloadcmd    "service nginx force-reload"
Nur die Domäne ist erforderlich, alle anderen Parameter sind optional.
 
Die Eigentums- und Berechtigungsinformationen vorhandener Dateien werden beibehalten. Sie können die Dateien im Voraus erstellen, um die Eigentümerschaft und die Berechtigung zu definieren.
 
Installieren/kopieren Sie das Zertifikat/den Schlüssel in den Apache- oder Nginx-Produktionspfad.
 
Das Zertifikat wird standardmäßig alle '''60''' Tage erneuert (was konfigurierbar ist). Sobald das Zertifikat erneuert wurde, wird der Apache/Nginx-Dienst automatisch mit dem folgenden Befehl neu geladen: <code>service apache2 force-reload</code> oder <code>service nginx force-reload</code>.
 
'''Seien Sie bitte vorsichtig:  Der "reloadcmd" ist sehr wichtig. Das Zertifikat kann automatisch erneuert werden, aber ohne einen korrekten "reloadcmd" wird das Zertifikat möglicherweise nicht auf Ihren Server (wie Nginx oder Apache) übertragen, und Ihre Website kann dann in 60 Tagen kein erneuertes Zertifikat anzeigen.'''
 
== 4. Standalone-Server zum Ausstellen von Zertifikaten verwenden ==
'''(Sie müssen root/sudoer sein oder die Erlaubnis haben, auf Port 80 (TCP) zu lauschen)'''
 
Port <code>80</code> (TCP) '''MUSS''' zum Abhören frei sein, sonst werden Sie aufgefordert, ihn freizugeben und es erneut zu versuchen.
acme.sh --issue --standalone -d example.com -d www.example.com -d cp.example.com
Weitere Beispiele: <nowiki>https://github.com/acmesh-official/acme.sh/wiki/How-to-issue-a-cert</nowiki>
 
== 5. Eigenständigen SSL-Server zum Ausstellen von Zertifikaten verwenden ==
'''(Sie müssen root/sudoer sein oder die Erlaubnis haben, auf Port 443 (TCP) zu lauschen)'''
 
Port <code>443</code> (TCP) '''MUSS''' zum Abhören frei sein, sonst werden Sie aufgefordert, ihn freizugeben und es erneut zu versuchen.
acme.sh --issue --alpn -d example.com -d www.example.com -d cp.example.com
Weitere Beispiele: <nowiki>https://github.com/acmesh-official/acme.sh/wiki/How-to-issue-a-cert</nowiki>
 
== 6. Apache-Modus verwenden ==
'''(Sie müssen root/sudoer sein, da dies für die Interaktion mit dem Apache-Server erforderlich ist)'''
 
Wenn Sie einen Webserver betreiben, wird empfohlen, den <code>Webroot-Modus</code> zu verwenden.
 
Insbesondere, wenn Sie einen Apache-Server betreiben, können Sie stattdessen den Apache-Modus verwenden. In diesem Modus werden keine Dateien in Ihren Web-Stammordner geschrieben.
 
Setzen Sie einfach die Zeichenkette "apache" als zweites Argument, und es wird automatisch die Verwendung des Apache-Plugins erzwungen.
acme.sh --issue --apache -d example.com -d www.example.com -d cp.example.com
'''Dieser Apache-Modus dient nur dazu, das Zertifikat auszustellen, er wird Ihre Apache-Konfigurationsdateien nicht verändern. Sie müssen Ihre Website-Konfigurationsdateien selbst so konfigurieren, dass das Zertifikat verwendet wird. Wir wollen Ihren Apache-Server nicht durcheinander bringen, keine Sorge.'''
 
Weitere Beispiele: <nowiki>https://github.com/acmesh-official/acme.sh/wiki/How-to-issue-a-cert</nowiki>
 
== 7. Nginx-Modus verwenden ==
'''(Sie müssen root/sudoer sein, da dies für die Interaktion mit dem Nginx-Server erforderlich ist)'''


Wenn Sie einen Webserver betreiben, wird empfohlen, den <code>Webroot-Modus</code> zu verwenden.
Insbesondere, wenn Sie einen nginx-Server betreiben, können Sie stattdessen den nginx-Modus verwenden. In diesem Modus werden keine Dateien in Ihr Web-Root-Verzeichnis geschrieben.
Geben Sie einfach die Zeichenfolge "nginx" als zweites Argument ein.
Der nginx-Server wird automatisch konfiguriert, um die Domäne zu verifizieren und dann die nginx-Konfiguration auf die ursprüngliche Version zurückzusetzen.
Die Konfiguration wird also nicht geändert.
acme.sh --issue --nginx -d example.com -d www.example.com -d cp.example.com
'''Dieser Nginx-Modus dient nur zur Ausstellung des Zertifikats, er ändert nicht Ihre Nginx-Konfigurationsdateien. Sie müssen Ihre Website-Konfigurationsdateien selbst für die Verwendung des Zertifikats konfigurieren. Wir wollen Ihren Nginx-Server nicht durcheinander bringen, keine Sorge.'''
Weitere Beispiele: <nowiki>https://github.com/acmesh-official/acme.sh/wiki/How-to-issue-a-cert</nowiki>
== 8. Automatische DNS-API-Integration ==
Wenn Ihr DNS-Anbieter API-Zugriff unterstützt, können wir diese API verwenden, um die Zertifikate automatisch auszustellen.
Sie müssen nichts manuell tun!
==== Derzeit unterstützt acme.sh die meisten DNS-Anbieter: ====
<nowiki>https://github.com/acmesh-official/acme.sh/wiki/dnsapi</nowiki>
== 9. Verwenden Sie den manuellen DNS-Modus: ==
Siehe: <nowiki>https://github.com/acmesh-official/acme.sh/wiki/dns-manual-mode</nowiki> first.
Wenn Ihr DNS-Anbieter keinen API-Zugang unterstützt, können Sie den txt-Eintrag von Hand hinzufügen.
acme.sh --issue --dns -d example.com -d www.example.com -d cp.example.com
Sie sollten eine Ausgabe wie unten erhalten:
Add the following txt record:
Domain:_acme-challenge.example.com
Txt value:9ihDbjYfTExAYeDs4DBUeuTo18KBzwvTEjUnSwd32-c
Add the following txt record:
Domain:_acme-challenge.www.example.com
Txt value:9ihDbjxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Please add those txt records to the domains. Waiting for the dns to take effect.
Dann wiederholen Sie den Vorgang einfach mit <code>neuen</code> Argumenten:
acme.sh --renew -d example.com
Okay, es ist geschafft.
'''Achten Sie darauf, dass dies ein manueller DNS-Modus ist, der nicht automatisch erneuert werden kann. Sie müssen einen neuen txt-Eintrag zu Ihrer Domain hinzufügen, wenn Sie Ihr Zertifikat erneuern.'''
'''Bitte verwenden Sie stattdessen den dns api-Modus.'''
== 10. ECC-Zertifikate ausstellen ==
Setzen Sie einfach den Parameter <code>keylength</code> mit einem Präfix <code>ec-</code>.
Zum Beispiel:
==== ECC-Zertifikat für eine Domäne ====
acme.sh --issue -w /home/wwwroot/example.com -d example.com --keylength ec-256
==== SAN-Multi-Domain-ECC-Zertifikat ====
acme.sh --issue -w /home/wwwroot/example.com -d example.com -d www.example.com --keylength ec-256
Bitte beachten Sie den obigen Parameter <code>keylength</code>.
Gültige Werte sind:
# '''ec-256 (prime256v1, "ECDSA P-256", dies ist der Standardschlüsseltyp)'''
# '''ec-384 (secp384r1, "ECDSA P-384")'''
# '''ec-521 (secp521r1, "ECDSA P-521", das von Let's Encrypt noch nicht unterstützt wird).'''
# '''2048 (RSA2048)'''
# '''3072 (RSA3072)'''
# '''4096 (RSA4096)'''
== 11. Wildcard-Zertifikate ausstellen ==
Es ist ganz einfach: Geben Sie als Parameter <code>-d</code> einen Platzhalter für eine Domäne an.
acme.sh  --issue -d example.com  -d '*.example.com'  --dns dns_cf
== 12. Wie man die Zertifikate erneuert ==
Nein, Sie brauchen die Zertifikate nicht manuell zu erneuern. Alle Zertifikate werden automatisch alle '''60''' Tage erneuert.
Sie können aber auch die Erneuerung eines Zertifikats erzwingen:
acme.sh --renew -d example.com --force
oder, für ECC cert:
acme.sh --renew -d example.com --force --ecc
== 13. Wie man die Zertifikatserneuerung stoppt ==
Um die Erneuerung eines Zertifikats zu stoppen, können Sie folgendes ausführen, um das Zertifikat aus der Erneuerungsliste zu entfernen:
acme.sh --remove -d example.com [--ecc]
Die Zertifikats-/Schlüsseldatei wird nicht von der Festplatte entfernt.
Sie können das entsprechende Verzeichnis (z.B. <code>~/.acme.sh/example.com</code>) selbst entfernen.
== 14. Wie man <code>acme.sh</code> aktualisiert ==
acme.sh wird ständig weiterentwickelt, es wird daher dringend empfohlen, den neuesten Code zu verwenden.
Sie können acme.sh mit dem neuesten Code aktualisieren:
acme.sh --upgrade
Sie können auch die automatische Aktualisierung aktivieren:
acme.sh --upgrade --auto-upgrade
Dann wird '''acme.sh''' automatisch auf dem neuesten Stand gehalten.
Deaktivieren Sie die automatische Aktualisierung:
acme.sh --upgrade --auto-upgrade 0
== 15. Ausstellen eines Zertifikats aus einer vorhandenen CSR ==
<nowiki>https://github.com/acmesh-official/acme.sh/wiki/Issue-a-cert-from-existing-CSR</nowiki>
== 16. Benachrichtigungen in Cronjob senden ==
<nowiki>https://github.com/acmesh-official/acme.sh/wiki/notify</nowiki>
== 17. Unter der Haube ==
Sprechen Sie die ACME-Sprache über die Shell, direkt zu "Let's Encrypt".
TODO:
== 18. Danksagungen ==
# Acme-tiny: <nowiki>https://github.com/diafygi/acme-tiny</nowiki>
# ACME-Protokoll: <nowiki>https://github.com/ietf-wg-acme/acme</nowiki>
== Installation ==
== Syntax ==
=== Optionen ===
=== Parameter ===
=== Umgebungsvariablen ===
=== Exit-Status ===
== Anwendung ==
=== Fehlerbehebung ===
== Konfiguration ==
== Konfiguration ==
=== Dateien ===
=== Dateien ===
Zeile 398: Zeile 331:
{{Special:PrefixIndex/{{BASEPAGENAME}}}}
{{Special:PrefixIndex/{{BASEPAGENAME}}}}
==== Dokumentation ====
==== Dokumentation ====
===== RFC =====
{| class="wikitable sortable options"
|-
! RFC !! Titel
|-
| [https://www.rfc-editor.org/rfc/0000 0000] ||
|}
===== Man-Pages =====
===== Man-Pages =====
===== Info-Pages =====
===== Info-Pages =====
Zeile 412: Zeile 337:
===== Weblinks =====
===== Weblinks =====


= TMP =
[[Kategorie:Apache/HTTP/Sicherheit]]
https://github.com/acmesh-official/acme.sh
 
Usage
acme.sh <command> ... [parameters ...]
 
Commands:
  -h, --help              Show this help message.
  -v, --version            Show version info.
  --install                Install acme.sh to your system.
  --uninstall              Uninstall acme.sh, and uninstall the cron job.
  --upgrade                Upgrade acme.sh to the latest code from https://github.com/acmesh-official/acme.sh.
  --issue                  Issue a cert.
  --deploy                Deploy the cert to your server.
  -i, --install-cert      Install the issued cert to apache/nginx or any other server.
  -r, --renew              Renew a cert.
  --renew-all              Renew all the certs.
  --revoke                Revoke a cert.
  --remove                Remove the cert from list of certs known to acme.sh.
  --list                  List all the certs.
  --info                  Show the acme.sh configs, or the configs for a domain with [-d domain] parameter.
  --to-pkcs12              Export the certificate and key to a pfx file.
  --to-pkcs8              Convert to pkcs8 format.
  --sign-csr              Issue a cert from an existing csr.
  --show-csr              Show the content of a csr.
  -ccr, --create-csr      Create CSR, professional use.
  --create-domain-key      Create an domain private key, professional use.
  --update-account        Update account info.
  --register-account      Register account key.
  --deactivate-account    Deactivate the account.
  --create-account-key    Create an account private key, professional use.
  --install-cronjob        Install the cron job to renew certs, you don't need to call this. The 'install' command can automatically install the cron job.
  --uninstall-cronjob      Uninstall the cron job. The 'uninstall' command can do this automatically.
  --cron                  Run cron job to renew all the certs.
  --set-notify            Set the cron notification hook, level or mode.
  --deactivate            Deactivate the domain authz, professional use.
  --set-default-ca        Used with '--server', Set the default CA to use.
                          See: https://github.com/acmesh-official/acme.sh/wiki/Server
  --set-default-chain      Set the default preferred chain for a CA.
                          See: https://github.com/acmesh-official/acme.sh/wiki/Preferred-Chain
 
 
Parameters:
  -d, --domain <domain.tld>        Specifies a domain, used to issue, renew or revoke etc.
  --challenge-alias <domain.tld>    The challenge domain alias for DNS alias mode.
                                      See: https://github.com/acmesh-official/acme.sh/wiki/DNS-alias-mode
 
  --domain-alias <domain.tld>      The domain alias for DNS alias mode.
                                      See: https://github.com/acmesh-official/acme.sh/wiki/DNS-alias-mode
 
  --preferred-chain <chain>        If the CA offers multiple certificate chains, prefer the chain with an issuer matching this Subject Common Name.
                                      If no match, the default offered chain will be used. (default: empty)
                                      See: https://github.com/acmesh-official/acme.sh/wiki/Preferred-Chain
 
  --valid-to    <date-time>        Request the NotAfter field of the cert.
                                      See: https://github.com/acmesh-official/acme.sh/wiki/Validity
  --valid-from  <date-time>        Request the NotBefore field of the cert.
                                      See: https://github.com/acmesh-official/acme.sh/wiki/Validity
 
  -f, --force                      Force install, force cert renewal or override sudo restrictions.
  --staging, --test                Use staging server, for testing.
  --debug [0|1|2|3]                 Output debug info. Defaults to 2 if argument is omitted.
  --output-insecure                Output all the sensitive messages.
                                      By default all the credentials/sensitive messages are hidden from the output/debug/log for security.
  -w, --webroot <directory>        Specifies the web root folder for web root mode.
  --standalone                      Use standalone mode.
  --alpn                            Use standalone alpn mode.
  --stateless                      Use stateless mode.
                                      See: https://github.com/acmesh-official/acme.sh/wiki/Stateless-Mode
 
  --apache                          Use apache mode.
  --dns [dns_hook]                  Use dns manual mode or dns api. Defaults to manual mode when argument is omitted.
                                      See: https://github.com/acmesh-official/acme.sh/wiki/dnsapi
 
  --dnssleep <seconds>              The time in seconds to wait for all the txt records to propagate in dns api mode.
                                      It's not necessary to use this by default, acme.sh polls dns status by DOH automatically.
  -k, --keylength <bits>            Specifies the domain key length: 2048, 3072, 4096, 8192 or ec-256, ec-384, ec-521.
  -ak, --accountkeylength <bits>    Specifies the account key length: 2048, 3072, 4096
  --log [file]                     Specifies the log file. Defaults to "/root/.acme.sh/acme.sh.log" if argument is omitted.
  --log-level <1|2>                Specifies the log level, default is 2.
  --syslog <0|3|6|7>                Syslog level, 0: disable syslog, 3: error, 6: info, 7: debug.
  --eab-kid <eab_key_id>            Key Identifier for External Account Binding.
  --eab-hmac-key <eab_hmac_key>    HMAC key for External Account Binding.
 
 
These parameters are to install the cert to nginx/apache or any other server after issue/renew a cert:
  --cert-file <file>                Path to copy the cert file to after issue/renew.
  --key-file <file>                Path to copy the key file to after issue/renew.
  --ca-file <file>                  Path to copy the intermediate cert file to after issue/renew.
  --fullchain-file <file>          Path to copy the fullchain cert file to after issue/renew.
  --reloadcmd <command>            Command to execute after issue/renew to reload the server.
 
  --server <server_uri>            ACME Directory Resource URI. (default: https://acme.zerossl.com/v2/DV90)
                                      See: https://github.com/acmesh-official/acme.sh/wiki/Server
 
  --accountconf <file>              Specifies a customized account config file.
  --home <directory>                Specifies the home dir for acme.sh.
  --cert-home <directory>          Specifies the home dir to save all the certs, only valid for '--install' command.
  --config-home <directory>        Specifies the home dir to save all the configurations.
  --useragent <string>              Specifies the user agent string. it will be saved for future use too.
  -m, --email <email>              Specifies the account email, only valid for the '--install' and '--update-account' command.
  --accountkey <file>              Specifies the account key path, only valid for the '--install' command.
  --days <ndays>                    Specifies the days to renew the cert when using '--issue' command. The default value is 60 days.
  --httpport <port>                Specifies the standalone listening port. Only valid if the server is behind a reverse proxy or load balancer.
  --tlsport <port>                  Specifies the standalone tls listening port. Only valid if the server is behind a reverse proxy or load balancer.
  --local-address <ip>              Specifies the standalone/tls server listening address, in case you have multiple ip addresses.
  --listraw                        Only used for '--list' command, list the certs in raw format.
  -se, --stop-renew-on-error        Only valid for '--renew-all' command. Stop if one cert has error in renewal.
  --insecure                        Do not check the server certificate, in some devices, the api server's certificate may not be trusted.
  --ca-bundle <file>                Specifies the path to the CA certificate bundle to verify api server's certificate.
  --ca-path <directory>            Specifies directory containing CA certificates in PEM format, used by wget or curl.
  --no-cron                        Only valid for '--install' command, which means: do not install the default cron job.
                                      In this case, the certs will not be renewed automatically.
  --no-profile                      Only valid for '--install' command, which means: do not install aliases to user profile.
  --no-color                        Do not output color text.
  --force-color                    Force output of color text. Useful for non-interactive use with the aha tool for HTML E-Mails.
  --ecc                            Specifies use of the ECC cert. Only valid for '--install-cert', '--renew', '--remove ', '--revoke',
                                      '--deploy', '--to-pkcs8', '--to-pkcs12' and '--create-csr'.
  --csr <file>                      Specifies the input csr.
  --pre-hook <command>              Command to be run before obtaining any certificates.
  --post-hook <command>            Command to be run after attempting to obtain/renew certificates. Runs regardless of whether obtain/renew succeeded or failed.
  --renew-hook <command>            Command to be run after each successfully renewed certificate.
  --deploy-hook <hookname>          The hook file to deploy cert
  --ocsp, --ocsp-must-staple        Generate OCSP-Must-Staple extension.
  --always-force-new-domain-key    Generate new domain key on renewal. Otherwise, the domain key is not changed by default.
  --auto-upgrade [0|1]              Valid for '--upgrade' command, indicating whether to upgrade automatically in future. Defaults to 1 if argument is omitted.
  --listen-v4                      Force standalone/tls server to listen at ipv4.
  --listen-v6                      Force standalone/tls server to listen at ipv6.
  --openssl-bin <file>              Specifies a custom openssl bin location.
  --use-wget                        Force to use wget, if you have both curl and wget installed.
  --yes-I-know-dns-manual-mode-enough-go-ahead-please  Force use of dns manual mode.
                                      See:  https://github.com/acmesh-official/acme.sh/wiki/dns-manual-mode
 
  -b, --branch <branch>            Only valid for '--upgrade' command, specifies the branch name to upgrade to.
  --notify-level <0|1|2|3>          Set the notification level:  Default value is 2.
                                      0: disabled, no notification will be sent.
                                      1: send notifications only when there is an error.
                                      2: send notifications when a cert is successfully renewed, or there is an error.
                                      3: send notifications when a cert is skipped, renewed, or error.
  --notify-mode <0|1>              Set notification mode. Default value is 0.
                                      0: Bulk mode. Send all the domain's notifications in one message(mail).
                                      1: Cert mode. Send a message for every single cert.
  --notify-hook <hookname>          Set the notify hook
  --notify-source <server name>    Set the server name in the notification message
  --revoke-reason <0-10>            The reason for revocation, can be used in conjunction with the '--revoke' command.
                                      See: https://github.com/acmesh-official/acme.sh/wiki/revokecert


  --password <password>            Add a password to exported pfx file. Use with --to-pkcs12.
</noinclude>
</noinclude>

Aktuelle Version vom 8. September 2024, 11:30 Uhr

acme.sh - ACME-Shell-Skript

Beschreibung

Ein ACME-Protokoll-Client, der ausschließlich in Shell-Sprache (Unix-Shell) geschrieben ist

  • Vollständige Implementierung des ACME-Protokolls
  • Unterstützung von ECDSA-Zertifikaten
  • Unterstützung von SAN- und Wildcard-Zertifikaten
  • Einfach, leistungsstark und sehr leicht zu bedienen. Sie brauchen nur 3 Minuten, um es zu lernen
  • Kompatibel mit Bash, Dash und Sh
  • Rein in Shell geschrieben, ohne Abhängigkeiten von Python
  • Ein einziges Skript zur automatischen Ausstellung, Erneuerung und Installation Ihrer Zertifikate
  • Erfordert KEINEN root/sudoer-Zugang
  • Docker bereit
  • IPv6 bereit
  • Cron-Job-Benachrichtigungen für Erneuerung oder Fehler usw

Es ist wahrscheinlich das einfachste und intelligenteste Shell-Skript zur automatischen Ausstellung und Erneuerung von kostenlosen Zertifikaten

Siehe auch
  1. https://github.com/acmesh-official/acme.sh/wiki
Wer setzt acme.sh ein?
  • FreeBSD.org
  • ruby-china.org
  • Proxmox
  • pfsense
  • Loadbalancer.org
  • diskurs.org
  • Centminmod
  • splynx
  • opnsense.org
  • CentOS-Web-Panel
  • lnmp.org

Unterstützte CA

  • ZeroSSL.com CA(Standard)
  • Letsencrypt.org CA
  • BuyPass.com CA
  • SSL.com CA
  • Google.com Öffentliches CA
  • Pebble Strenger Modus
  • Jede andere RFC8555-konforme CA

Unterstützte Modi

  • Webroot-Modus
  • Standalone-Modus
  • Eigenständiger tls-alpn-Modus
  • Apache-Modus
  • Nginx-Modus
  • DNS-Modus
  • DNS-Alias-Modus
  • Zustandsloser Modus

Installation

Online installieren

https://github.com/acmesh-official/get.acme.sh

curl https://get.acme.sh | sh -s email=my@example.com

oder

wget -O -  https://get.acme.sh | sh -s email=my@example.com

Installieren von git

Klonen Sie dieses Projekt und starten Sie die Installation:

git clone https://github.com/acmesh-official/acme.sh.git
cd ./acme.sh
./acme.sh --install -m my@example.com

Sie müssen also nicht unbedingt Root sein, obwohl es empfohlen wird

Siehe auch

https://github.com/acmesh-official/acme.sh/wiki/How-to-install

Installationsprogramm

Das Installationsprogramm wird 3 Aktionen durchführen

  1. Erstellen und kopieren Sie acme.sh in Ihr Heimatverzeichnis($HOME): ~/.acme.sh/. Alle Zertifikate werden ebenfalls in diesem Ordner abgelegt
  2. Alias erstellen für: acme.sh=~/.acme.sh/acme.sh
  3. Erstellen Sie einen täglichen Cron-Job, um die Zertifikate zu überprüfen und bei Bedarf zu erneuern
    Beispiel für einen Cron-Eintrag:
0 0 * * * "/home/user/.acme.sh"/acme.sh --cron --home "/home/user/.acme.sh" > /dev/null
Nach der Installation müssen Sie das aktuelle Terminal schließen und es erneut öffnen, damit der Alias wirksam wird

Sie sind jetzt bereit, Zertifikate auszustellen

Syntax

acme.sh <command> ... [parameters ...]

Commands

Unix GNU Beschreibung
-h --help Show this help message
-v --version Show version info
--install Install acme.sh to your system
--uninstall Uninstall acme.sh, and uninstall the cron job
--upgrade Upgrade acme.sh to the latest code from https://github.com/acmesh-official/acme.sh
--issue Issue a cert
--deploy Deploy the cert to your server
-i --install-cert Install the issued cert to apache/nginx or any other server
-r --renew Renew a cert
--renew-all Renew all the certs
--revoke Revoke a cert
--remove Remove the cert from list of certs known to acme.sh
--list List all the certs
--info Show the acme.sh configs, or the configs for a domain with [-d domain] parameter
--to-pkcs12 Export the certificate and key to a pfx file
--to-pkcs8 Convert to pkcs8 format
--sign-csr Issue a cert from an existing csr
--show-csr Show the content of a csr
-ccr --create-csr Create CSR, professional use
--create-domain-key Create an domain private key, professional use
--update-account Update account info
--register-account Register account key
--deactivate-account Deactivate the account
--create-account-key Create an account private key, professional use
--install-cronjob Install the cron job to renew certs, you don't need to call this. The 'install' command can automatically install the cron job
--uninstall-cronjob Uninstall the cron job. The 'uninstall' command can do this automatically
--cron Run cron job to renew all the certs
--set-notify Set the cron notification hook, level or mode
--deactivate Deactivate the domain authz, professional use
--set-default-ca Used with '--server', Set the default CA to use. See: https://github.com/acmesh-official/acme.sh/wiki/Server
--set-default-chain Set the default preferred chain for a CA. See: https://github.com/acmesh-official/acme.sh/wiki/Preferred-Chain

Parameters

Option Beschreibung
-d --domain <domain.tld> Specifies a domain, used to issue, renew or revoke etc
challenge-alias <domain.tld> The challenge domain alias for DNS alias mode. See: https://github.com/acmesh-official/acme.sh/wiki/DNS-alias-mode
domain-alias <domain.tld> The domain alias for DNS alias mode. See: https://github.com/acmesh-official/acme.sh/wiki/DNS-alias-mode
preferred-chain <chain> If the CA offers multiple certificate chains, prefer the chain with an issuer matching this Subject Common Name. If no match, the default offered chain will be used. (default: empty) See: https://github.com/acmesh-official/acme.sh/wiki/Preferred-Chain
valid-to <date-time> Request the NotAfter field of the cert. See: https://github.com/acmesh-official/acme.sh/wiki/Validity
valid-from <date-time> Request the NotBefore field of the cert. See: https://github.com/acmesh-official/acme.sh/wiki/Validity
-f --force Force install, force cert renewal or override sudo restrictions
staging --test Use staging server, for testing
1|2|3] Output debug info. Defaults to 2 if argument is omitted
output-insecure Output all the sensitive messages. By default all the credentials/sensitive messages are hidden from the output/debug/log for security
-w --webroot <directory> Specifies the web root folder for web root mode
standalone Use standalone mode
alpn Use standalone alpn mode
stateless Use stateless mode. See: https://github.com/acmesh-official/acme.sh/wiki/Stateless-Mode
apache Use apache mode
dns [dns_hook] Use dns manual mode or dns api. Defaults to manual mode when argument is omitted. See: https://github.com/acmesh-official/acme.sh/wiki/dnsapi
dnssleep <seconds> The time in seconds to wait for all the txt records to propagate in dns api mode. It's not necessary to use this by default, acme.sh polls dns status by DOH automatically
-k --keylength <bits> Specifies the domain key length: 2048, 3072, 4096, 8192 or ec-256, ec-384, ec-521
-ak --accountkeylength <bits> Specifies the account key length: 2048, 3072, 4096
log [file] Specifies the log file. Defaults to "/root/.acme.sh/acme.sh.log" if argument is omitted
2> Specifies the log level, default is 2
3|6|7> Syslog level, 0: disable syslog, 3: error, 6: info, 7: debug
eab-kid <eab_key_id> Key Identifier for External Account Binding
eab-hmac-key <eab_hmac_key> HMAC key for External Account Binding

Install the cert

These parameters are to install the cert to nginx/apache or any other server after issue/renew a cert:

Option Beschreibung
--cert-file <file> Path to copy the cert file to after issue/renew
--key-file <file> Path to copy the key file to after issue/renew
--ca-file <file> Path to copy the intermediate cert file to after issue/renew
--fullchain-file <file> Path to copy the fullchain cert file to after issue/renew
--reloadcmd <command> Command to execute after issue/renew to reload the server
--server <server_uri> ACME Directory Resource URI. (default: https://acme.zerossl.com/v2/DV90). See: https://github.com/acmesh-official/acme.sh/wiki/Server
--accountconf <file> Specifies a customized account config file
--home <directory> Specifies the home dir for acme.sh
--cert-home <directory> Specifies the home dir to save all the certs, only valid for '--install' command
--config-home <directory> Specifies the home dir to save all the configurations
--useragent <string> Specifies the user agent string. it will be saved for future use too
-m, --email <email> Specifies the account email, only valid for the '--install' and '--update-account' command
--accountkey <file> Specifies the account key path, only valid for the '--install' command
--days <ndays> Specifies the days to renew the cert when using '--issue' command. The default value is 60 days
--httpport <port> Specifies the standalone listening port. Only valid if the server is behind a reverse proxy or load balancer
--tlsport <port> Specifies the standalone tls listening port. Only valid if the server is behind a reverse proxy or load balancer
--local-address <ip> Specifies the standalone/tls server listening address, in case you have multiple ip addresses
--listraw Only used for '--list' command, list the certs in raw format
-se, --stop-renew-on-error Only valid for '--renew-all' command. Stop if one cert has error in renewal
--insecure Do not check the server certificate, in some devices, the api server's certificate may not be trusted
--ca-bundle <file> Specifies the path to the CA certificate bundle to verify api server's certificate
--ca-path <directory> Specifies directory containing CA certificates in PEM format, used by wget or curl
--no-cron Only valid for '--install' command, which means: do not install the default cron job. In this case, the certs will not be renewed automatically
--no-profile Only valid for '--install' command, which means: do not install aliases to user profile
--no-color Do not output color text
--force-color Force output of color text. Useful for non-interactive use with the aha tool for HTML E-Mails
--ecc Specifies use of the ECC cert. Only valid for '--install-cert', '--renew', '--remove ', '--revoke'

'--deploy', '--to-pkcs8', '--to-pkcs12' and '--create-csr'

--csr <file> Specifies the input csr
--pre-hook <command> Command to be run before obtaining any certificates
--post-hook <command> Command to be run after attempting to obtain/renew certificates. Runs regardless of whether obtain/renew succeeded or failed
--renew-hook <command> Command to be run after each successfully renewed certificate
--deploy-hook <hookname> The hook file to deploy cert
--ocsp, --ocsp-must-staple Generate OCSP-Must-Staple extension
--always-force-new-domain-key Generate new domain key on renewal. Otherwise, the domain key is not changed by default
1] Valid for '--upgrade' command, indicating whether to upgrade automatically in future. Defaults to 1 if argument is omitted
--listen-v4 Force standalone/tls server to listen at ipv4
--listen-v6 Force standalone/tls server to listen at ipv6
--openssl-bin <file> Specifies a custom openssl bin location
--use-wget Force to use wget, if you have both curl and wget installed
--yes-I-know-dns-manual-mode-enough-go-ahead-please Force use of dns manual mode. See: https://github.com/acmesh-official/acme.sh/wiki/dns-manual-mode
-b, --branch <branch> Only valid for '--upgrade' command, specifies the branch name to upgrade to
1|2|3> Set the notification level: Default value is 2

0: disabled, no notification will be sent 1: send notifications only when there is an error 2: send notifications when a cert is successfully renewed, or there is an error 3: send notifications when a cert is skipped, renewed, or error

1> Set notification mode. Default value is 0

0: Bulk mode. Send all the domain's notifications in one message(mail) 1: Cert mode. Send a message for every single cert

--notify-hook <hookname> Set the notify hook
--notify-source <server name> Set the server name in the notification message.
--revoke-reason <0-10> The reason for revocation, can be used in conjunction with the '--revoke' command. See: https://github.com/acmesh-official/acme.sh/wiki/revokecert
--password <password> Add a password to exported pfx file. Use with --to-pkcs12

Umgebung

Rückgabewert

Anwendung

Acme.sh/Anwendung

Konfiguration

Dateien

Anhang

Siehe auch

Dokumentation

Man-Pages
Info-Pages

Links

Projekt
Weblinks