Linux command
acme.sh 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Issue
acme.sh --issue -d [example.com] -w [/var/www/html]
Example
acme.sh --issue -d [example.com] -d [*.example.com] --dns [dns_cf]
Install
acme.sh --install-cert -d [example.com] --key-file [/path/to/key.pem] --fullchain-file [/path/to/cert.pem] --reloadcmd "[systemctl reload nginx]"
Renew
acme.sh --renew-all
List
acme.sh --list
说明
acme.sh is a pure Unix shell ACME client for obtaining free SSL/TLS certificates from Let's Encrypt and other ACME-compliant certificate authorities. It supports multiple validation methods including webroot, standalone, DNS, and Apache/Nginx plugins. The tool automatically handles certificate renewal through cron jobs and supports wildcard certificates via DNS validation. It requires no dependencies beyond a POSIX-compliant shell and common utilities like curl or wget.
参数
- --issue
- Issue a new certificate
- --install-cert
- Install issued certificate to specified locations
- --renew
- Renew a specific certificate
- --renew-all
- Renew all issued certificates
- --list
- List all issued certificates
- -d _domain_
- Domain name (can be repeated for multiple domains/SANs)
- -w _path_
- Webroot path for HTTP validation
- --dns _provider_
- Use DNS validation with specified provider (dns_cf, dns_aws, etc.)
- --standalone
- Use standalone mode (starts temporary web server)
- --nginx
- Use Nginx mode for validation
- --apache
- Use Apache mode for validation
- --key-file _path_
- Path to install private key
- --fullchain-file _path_
- Path to install full certificate chain
- --reloadcmd _cmd_
- Command to reload service after installation
- --force
- Force renewal regardless of expiry
- --revoke -d _domain_
- Revoke a certificate
- --remove -d _domain_
- Remove a certificate from the renewal list
- --server _url_
- Specify ACME server (default: Let's Encrypt). Use letsencrypt, zerossl, buypass, or a custom URL.
- --upgrade
- Upgrade acme.sh to the latest version
FAQ
What is the acme.sh command used for?
acme.sh is a pure Unix shell ACME client for obtaining free SSL/TLS certificates from Let's Encrypt and other ACME-compliant certificate authorities. It supports multiple validation methods including webroot, standalone, DNS, and Apache/Nginx plugins. The tool automatically handles certificate renewal through cron jobs and supports wildcard certificates via DNS validation. It requires no dependencies beyond a POSIX-compliant shell and common utilities like curl or wget.
How do I run a basic acme.sh example?
Run `acme.sh --issue -d [example.com] -w [/var/www/html]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --issue do in acme.sh?
Issue a new certificate