AutoSSL.sh Automated Certificate Tutorial
AutoSSL.sh is a command-line client for automating the SSL certificate lifecycle. Its parameter style is similar to acme.sh, but it talks to the platform REST API instead of the standard ACME protocol. It is well suited for issuing, validating, downloading, deploying, renewing, reissuing, and revoking certificates on servers, in CI/CD, or in operations scripts.
A typical workflow looks like this:
- Install
autossl.shand its dependencies. - Bind your platform API Key to the current server.
- Issue certificates using DNS or HTTP validation.
- Save deployment parameters so subsequent renewals and redeliveries reuse them automatically.
- Install a Cron job to periodically check certificates that are about to expire or need redelivery.
Prerequisites
- A Linux or macOS server.
bash,curl,jq, andopensslinstalled.- Sufficient balance in your console account.
- An API Key created, with the current server's public IP added to the allowlist.
- DNS validation requires API credentials from your DNS provider; HTTP/IP certificate validation requires a Webroot directory reachable from the public Internet.
Install the Client
We recommend installing to /usr/local/bin/autossl.sh; all subsequent commands assume this path.
# Debian / Ubuntu
sudo apt-get update
sudo apt-get install -y curl jq openssl unzip
# CentOS / RHEL / AlmaLinux / Rocky
sudo yum install -y curl jq openssl unzip
# macOS
brew install curl jq openssl
Download and grant execute permission:
sudo curl -L \
-H "Referer: https://www.anquanssl.com" \
-o /usr/local/bin/autossl.sh.zip \
"https://static.trustserver.cn/assets/autossl.sh.zip"
sudo unzip -o /usr/local/bin/autossl.sh.zip -d /usr/local/bin/
sudo rm -f /usr/local/bin/autossl.sh.zip
sudo chmod +x /usr/local/bin/autossl.sh
Verify the installation:
autossl.sh --version
autossl.sh --help
The default data directory is ~/.autossl/, which can be customized via AUTOSSL_HOME:
~/.autossl/
├── account.conf
├── certs/
│ └── example.com-CERT_ID/
│ ├── order.conf
│ ├── example.com.key
│ ├── example.com.csr
│ ├── example.com.cer
│ ├── ca.cer
│ └── fullchain.cer
├── certs-backup/
├── cron.log
├── cron-last-run.json
└── logs/
Recommended permissions:
~/.autossl/:700account.conf:600- Private key files:
600
If invoked through a symlink, the script automatically locates the real directory and loads dnsapi/, deploy/, and email/ from that same directory.
Bind Your API Account
On first use, you need to save your platform API Key on the current server. The command writes to ~/.autossl/account.conf, which is read automatically for subsequent issuance, renewal, reissue, and revocation.
autossl.sh --register-account \
-m your-email@example.com \
--eab-kid YOUR_ACCESS_KEY_ID \
--eab-hmac-key YOUR_ACCESS_KEY_SECRET
For normal use, you do not need to pass --server. You only need to explicitly specify the API address when connecting to a private deployment, a special reseller platform API, or a local test environment:
autossl.sh --register-account \
-m your-email@example.com \
--eab-kid YOUR_ACCESS_KEY_ID \
--eab-hmac-key YOUR_ACCESS_KEY_SECRET \
--server https://api.example.com
You can also run the interactive wizard directly:
autossl.sh
The wizard prompts you to choose "Enter accessKey" or "Browser login". Browser login starts a temporary callback service on the local machine, listening on 127.0.0.1:35887 by default, and automatically writes the local account file once authorization completes.
Related variables:
| Variable | Description |
|---|---|
AUTOSSL_BROWSER_BIND_DISABLE=1 | Disable browser login |
AUTOSSL_BROWSER_BIND_HOST | Callback listen address |
AUTOSSL_BROWSER_BIND_PORT | Callback listen port |
AUTOSSL_BROWSER_AUTH_ORIGIN | Authorization page address |
View Products
Before issuing, you can view the available product IDs and purchase periods:
autossl.sh --list-products
In subsequent commands, --product takes a product ID and --period takes a purchase period. If not specified, the client enters interactive selection.
Issue a Domain Certificate
DNS validation is well suited for automated issuance, especially for multi-domain and wildcard certificates.
autossl.sh --issue \
-d example.com \
-d www.example.com \
--dns dns_ali \
--product PRODUCT_CODE \
--period annually
Common parameters:
| Parameter | Description |
|---|---|
-d, --domain | Certificate domain; can be passed repeatedly |
--dns | DNS plugin name, e.g. dns_ali, dns_cf, dns_tencent |
--product | Product ID; interactive selection if omitted |
--period | Purchase period; interactive selection if omitted |
-k, --keylength | Private key spec: 2048, 4096, ec-256, ec-384 |
--notify-url | Business callback URL invoked after issuance completes |
--dnssleep | Seconds to wait for DNS propagation after adding records; default 20 |
The first time you use a DNS plugin, the script prompts you to enter that DNS provider's API Key / Secret, and saves them to ~/.autossl/account.conf after validation succeeds, so you do not need to enter them again next time.
Issuance workflow:
- Generate the private key and CSR.
- Call the platform API to create the order.
- Retrieve Domain Control Validation (DCV) information.
- Call the DNS plugin to add TXT records.
- Wait for DNS propagation.
- Trigger DCV validation.
- Poll the issuance status.
- Download the certificate.
- Clean up TXT records.
- Perform output, deployment, and reload.
Issue an IP Certificate or an HTTP-Validated Certificate
IP certificates must use HTTP file validation, with -w or --webroot specified. The validation file is written to .well-known/pki-validation/ under the site root directory.
autossl.sh --issue \
-d 203.0.113.5 \
-w /var/www/html \
--product PRODUCT_CODE \
--period annually
Domain certificates can also use HTTP validation:
autossl.sh --issue \
-d www.example.com \
-w /var/www/html \
--product PRODUCT_CODE \
--period annually
If a certificate contains multiple domains with different site directories, you can specify Webroot repeatedly:
autossl.sh --issue \
-d example.com \
-d www.example.com \
-w example.com:/var/www/example \
-w www.example.com:/var/www/www-example \
--product PRODUCT_CODE \
--period annually
Automatically scan for Webroot:
autossl.sh --issue -d example.com -w auto
Separate directory for HTTPS DCV:
autossl.sh --issue \
-d example.com \
-w /var/www/http \
--webroot-https /var/www/https \
--product PRODUCT_CODE \
--period annually
HTTP validation workflow:
- Set
httpDCV when creating the order. - Retrieve the validation file path and content.
- Write it to the Webroot.
- Use
curlto check public accessibility. - Trigger DCV validation.
- Delete the validation file after issuance.
Automatic Email DCV Validation
Email DCV is enabled by default and is mainly used for wildcard domains.
Logic:
- For
*.example.com, use the base domainexample.com. - Check whether MX/A records point to this machine's public IPv4.
- Use
admin@example.com. - Prefer configuring Postfix to receive mail.
- If that fails, start a Python SMTP listener.
- Extract the link or verification code from the CA email.
- Submit the validation automatically.
Supported CAs:
- Sectigo / Comodo
- GlobalSign / AlphaSSL
- SSL.com
Disable email DCV:
autossl.sh --issue -d '*.example.com' --dns dns_ali --no-email-dcv
Or:
export AUTOSSL_EMAIL_DCV_AUTO=0
Notes:
- The CA always delivers to port 25.
--email-dcv-portis deprecated.- If port 25 is unreachable, it falls back to other validation methods.
Output Certificate Files
By default, files are output to the local order directory:
~/.autossl/certs/PRIMARY_DOMAIN-CERT_ID/
Copy to a directory:
autossl.sh --issue \
-d example.com \
--dns dns_cf \
--output /etc/ssl/example.com
Copy to specific files:
autossl.sh --issue \
-d example.com \
--dns dns_cf \
--cert-file /etc/ssl/example.com/cert.pem \
--key-file /etc/ssl/example.com/key.pem \
--ca-file /etc/ssl/example.com/ca.pem \
--fullchain-file /etc/ssl/example.com/fullchain.pem
Run a command after issuance:
autossl.sh --issue \
-d example.com \
--dns dns_cf \
--reloadcmd "systemctl reload nginx"
Print PEM:
autossl.sh --issue -d example.com --dns dns_cf --print-cert
autossl.sh --issue -d example.com --dns dns_cf --print-key
Deploy After Issuance
During issuance, you can deploy the certificate directly to Nginx, Apache, Tomcat, or custom paths. Deployment parameters are saved to the local order directory, and subsequent --renew, --reissue, and automatic Cron redelivery reuse the same deployment plan.
Common parameters:
| Parameter | Description |
|---|---|
--deploy TYPE | nginx, apache, tomcat, other, skip, or a module name |
--deploy-cert PATH | Target certificate path |
--deploy-key PATH | Target private key path |
--deploy-chain PATH | Target CA chain path |
--deploy-reloadcmd CMD | Reload command after deployment |
--deploy-reload | Reload immediately |
--no-deploy-reload | Write files only, no reload |
--deploy-plan | Show the plan only |
--deploy-dry-run | Simulate the workflow only |
Nginx example:
autossl.sh --issue \
-d www.example.com \
--dns dns_ali \
--product PRODUCT_CODE \
--period annually \
--deploy nginx \
--deploy-cert /etc/nginx/ssl/www.example.com.cer \
--deploy-key /etc/nginx/ssl/www.example.com.key \
--deploy-reloadcmd "nginx -s reload" \
--deploy-reload
Nginx deployment copies fullchain.cer and the private key, runs nginx -t, and rolls back the configuration backup on failure.
Apache example:
autossl.sh --issue \
-d www.example.com \
--dns dns_ali \
--deploy apache \
--deploy-cert /etc/httpd/ssl/www.example.com.cer \
--deploy-key /etc/httpd/ssl/www.example.com.key \
--deploy-chain /etc/httpd/ssl/ca.cer \
--deploy-reloadcmd "systemctl reload httpd" \
--deploy-reload
If --deploy-chain is not specified, Apache's --deploy-cert writes fullchain.cer by default.
Tomcat example:
autossl.sh --deploy tomcat \
--cert-id CERT_ID \
--deploy-jks /opt/tomcat/conf/autossl.jks \
--deploy-jks-pass changeit \
--deploy-key-alias autossl \
--deploy-reloadcmd "systemctl restart tomcat" \
--deploy-reload
Tomcat relies on keytool; it generates PKCS12 and then converts it to JKS. The default password is changeit and the default alias is autossl.
Custom paths:
autossl.sh --deploy other \
--cert-id CERT_ID \
--deploy-cert /opt/app/cert.pem \
--deploy-key /opt/app/key.pem \
--deploy-chain /opt/app/fullchain.pem \
--deploy-reloadcmd "systemctl reload app" \
--deploy-reload
View the deployment plan only, without writing files or reloading services:
autossl.sh --deploy nginx --cert-id CERT_ID --deploy-plan
Deploy an already-issued certificate separately:
autossl.sh --deploy nginx \
--cert-id CERT_ID \
--deploy-cert /etc/nginx/ssl/www.example.com.cer \
--deploy-key /etc/nginx/ssl/www.example.com.key \
--deploy-reloadcmd "nginx -s reload" \
--deploy-reload
Custom Deployment Modules
Deployment module file:
deploy/MODULE.sh
Invocation:
autossl.sh --deploy ssh --cert-id CERT_ID
The script passes in:
DEPLOY_CERT_PATH
DEPLOY_KEY_PATH
DEPLOY_CHAIN_PATH
DEPLOY_DOMAIN
DEPLOY_TARGET_CERT_PATH
DEPLOY_TARGET_KEY_PATH
DEPLOY_TARGET_CHAIN_PATH
DEPLOY_RELOADCMD
DEPLOY_DO_RELOAD
Built-in modules:
| Module | Purpose | Required Configuration |
|---|---|---|
aliyun_cdn | Alibaba Cloud CDN | DEPLOY_ALIYUN_CDN_AK, DEPLOY_ALIYUN_CDN_SK |
aliyun_esa | Alibaba Cloud ESA | DEPLOY_ALIYUN_ESA_AK, DEPLOY_ALIYUN_ESA_SK, DEPLOY_ALIYUN_ESA_SITE_ID |
aliyun_waf | Alibaba Cloud WAF | DEPLOY_ALIYUN_WAF_AK, DEPLOY_ALIYUN_WAF_SK, DEPLOY_ALIYUN_WAF_INSTANCE |
qiniu_cdn | Qiniu Cloud CDN | DEPLOY_QINIU_AK, DEPLOY_QINIU_SK |
ssh | Remote host over SSH | DEPLOY_SSH_HOST, DEPLOY_SSH_CERT_PATH, DEPLOY_SSH_KEY_PATH |
synology | Synology NAS | DEPLOY_SYNO_HOST, DEPLOY_SYNO_USERNAME, DEPLOY_SYNO_PASSWORD |
tencent_cdn | Tencent Cloud CDN | DEPLOY_TENCENT_CDN_ID, DEPLOY_TENCENT_CDN_KEY |
tencent_edgeone | Tencent Cloud EdgeOne | DEPLOY_TENCENT_TEO_ID, DEPLOY_TENCENT_TEO_KEY, DEPLOY_TENCENT_TEO_ZONE |
Configuration can be written to ~/.autossl/account.conf:
DEPLOY_SSH_HOST='1.2.3.4'
DEPLOY_SSH_USER='root'
DEPLOY_SSH_KEY='/root/.ssh/id_rsa'
DEPLOY_SSH_CERT_PATH='/etc/nginx/ssl/cert.pem'
DEPLOY_SSH_KEY_PATH='/etc/nginx/ssl/key.pem'
DEPLOY_SSH_CHAIN_PATH='/etc/nginx/ssl/fullchain.pem'
DEPLOY_SSH_RELOADCMD='systemctl reload nginx'
DNS Plugins
Plugin directory:
dnsapi/
File name:
dns_xxx.sh
Use the file base name in commands:
autossl.sh --issue -d example.com --dns dns_ali
autossl.sh --issue -d example.com --dns dns_cf
autossl.sh --issue -d example.com --dns dns_tencent
Common credentials:
| Plugin | Credentials |
|---|---|
dns_ali | Ali_Key, Ali_Secret |
dns_cf | CF_Token or CF_Key + CF_Email |
dns_tencent | Tencent_SecretId, Tencent_SecretKey |
dns_dp | DP_Id, DP_Key |
dns_aws | AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY |
dns_gd | GD_Key, GD_Secret |
dns_namesilo | Namesilo_Key |
dns_vultr | VULTR_API_KEY |
dns_gcloud | CLOUDSDK_ACTIVE_CONFIG_NAME |
Credential lookup order:
- Environment variables.
~/.autossl/account.conf.- Interactive input.
Interactively entered credentials are saved only after the DNS record is added successfully.
A custom plugin must implement:
dns_xxx_add() {
local fullname="$1"
local type="$2"
local value="$3"
}
dns_xxx_rm() {
local fullname="$1"
local type="$2"
local value="$3"
}
Convention: return 0 on success.
Query, Download, and Validate
Query certificate status:
autossl.sh --status --cert-id CERT_ID
Trigger DCV validation:
autossl.sh --verify-dcv --cert-id CERT_ID
Download an issued certificate:
autossl.sh --download --cert-id CERT_ID --output /etc/ssl/www.example.com
You can also specify output files individually:
autossl.sh --download \
--cert-id CERT_ID \
--cert-file /etc/nginx/ssl/www.example.com.cer \
--key-file /etc/nginx/ssl/www.example.com.key \
--ca-file /etc/nginx/ssl/ca.cer \
--fullchain-file /etc/nginx/ssl/fullchain.cer
The download API returns only the certificate and CA. The private key comes from the local order directory.
List local orders:
autossl.sh --list
Change the DCV Method
If the order has already been created but you need to switch a domain from DNS validation to HTTP, HTTPS, or email validation, use --update-dcv.
Single domain:
autossl.sh --update-dcv \
--cert-id CERT_ID \
--dcv-domain www.example.com \
--dcv-type http
For email validation, you can specify the mailbox:
autossl.sh --update-dcv \
--cert-id CERT_ID \
--dcv-domain '*.example.com' \
--dcv-type email \
--dcv-value admin@example.com
Batch specification:
autossl.sh --update-dcv \
--cert-id CERT_ID \
--domain-dcv "example.com=dns,www.example.com=http"
After the change, you can trigger validation again:
autossl.sh --verify-dcv --cert-id CERT_ID
Supported types: dns, http, https, email.
Resume from Interruption
If issuance fails due to network issues, insufficient balance, DNS propagation, or a terminal interruption, fix the problem and then continue with --resume. Resume mode skips the completed order-creation steps and continues with validation, polling, and download.
autossl.sh --issue --resume \
--cert-id CERT_ID \
--dns dns_ali
Reissue and renewal also support resuming:
autossl.sh --reissue --resume --cert-id CERT_ID --dns dns_ali
autossl.sh --renew --resume --cert-id CERT_ID --dns dns_ali
Reissue a Certificate
Reissue is used to replace the CSR, regenerate the private key, correct order information, or redeliver the certificate as required by the CA.
autossl.sh --reissue \
--cert-id CERT_ID \
--dns dns_ali
To change the key spec or domains, you can explicitly override them:
autossl.sh --reissue \
--cert-id CERT_ID \
-d example.com \
-d www.example.com \
--dns dns_ali \
-k ec-256
Reissue reuses the locally saved validation method, output paths, and deployment configuration.
Renew a Certificate
For renewal, you can specify an order, or omit --cert-id to enter interactive selection.
autossl.sh --renew --cert-id CERT_ID --dns dns_ali
autossl.sh --renew
After a successful renewal, the client backs up the old order directory and creates a symlink with the original directory name pointing to the new order directory. This way, external services such as Nginx and Apache that reference the original certificate paths usually need no configuration changes.
The server may return:
reissue: reissue within the original order.new_order: create a new order and migrate the local directory.
Automatic Renewal and Redelivery
Once the Cron job is installed, AutoSSL.sh checks local orders daily. When the renewal threshold is reached or the server marks an order as needing redelivery, it automatically renews/reissues, downloads the certificate, and runs the deployment and reload commands saved during the initial issuance.
Install the daily job:
autossl.sh --install-cronjob
Run a check manually once:
autossl.sh --cron --renew-days 14
Verbose mode:
autossl.sh --cron --verbose
View the log:
tail -f ~/.autossl/cron.log
Uninstall the job:
autossl.sh --uninstall-cronjob
We recommend specifying complete deployment parameters during the initial issuance; otherwise, Cron can only redeliver and download the certificate, and cannot automatically overwrite the certificate used by live services or reload them.
Check logic:
- Acquire
~/.autossl/.cron.lock. - Iterate over
~/.autossl/certs/*/order.conf. - Process when the local certificate's days to expiry
<= --renew-days. - Process when the server returns
replace_required=true. - Re-exec itself per order.
- Reuse the saved validation and deployment configuration.
State file:
~/.autossl/cron-last-run.json
Per-order timeout:
export AUTOSSL_CRON_ORDER_TIMEOUT=900
Revoke a Certificate
You can revoke an old certificate once it is no longer in use. Revocation takes effect immediately, so make sure your services have already switched to the new certificate first.
autossl.sh --revoke --cert-id CERT_ID
You can specify a revocation reason:
autossl.sh --revoke --cert-id CERT_ID --revoke-reason 4
--revoke-reason supports:
| Value | Reason |
|---|---|
0 | unspecified |
1 | keyCompromise |
3 | affiliationChanged |
4 | superseded |
5 | cessationOfOperation |
If not specified, interactive selection is used. Orders that meet the refund rules are refunded according to platform rules; otherwise, the certificate is only revoked.
Delete a local order only:
autossl.sh
Enter "Local Order Management" and choose delete. This operation does not call the server-side revocation API.
Interactive Wizard
Entry point:
autossl.sh
Features:
- Account pre-check.
- Issue a new certificate.
- Reissue an existing certificate.
- Renew a certificate.
- Local order management.
The issuance wizard can read sites, domains, Webroot, and deployment paths from Nginx, Apache, and Tomcat.
Log:
~/.autossl/logs/ui-YYYYMMDD-HHMMSS.log
Common End-to-End Workflows
DNS issuance with Nginx deployment:
autossl.sh --issue \
-d example.com \
-d www.example.com \
--dns dns_cf \
--product PRODUCT_CODE \
--period annually \
--deploy nginx \
--deploy-cert /etc/nginx/ssl/example.com/fullchain.pem \
--deploy-key /etc/nginx/ssl/example.com/key.pem \
--deploy-reloadcmd "nginx -s reload" \
--deploy-reload
HTTP issuance of an IP certificate:
autossl.sh --issue \
-d 203.0.113.10 \
-w /var/www/html \
--product PRODUCT_CODE \
--period annually
Remote SSH deployment:
autossl.sh --issue \
-d example.com \
--dns dns_cf \
--deploy ssh \
--deploy-reload
Common Options Quick Reference
| Option | Description |
|---|---|
--server URL | API base URL; default https://api.trustserver.cn |
--eab-kid KID | AccessKeyId |
--eab-hmac-key SECRET | AccessKeySecret |
-m, --accountemail EMAIL | Contact email |
-d, --domain DOMAIN | Add a domain; repeatable |
--dns DNS_PLUGIN | DNS plugin name |
-w, --webroot DIR | HTTP DCV validation directory |
--webroot-https DIR | HTTPS DCV validation directory |
--email-dcv | Enable email DCV |
--no-email-dcv | Disable email DCV |
--dnssleep SECONDS | Seconds to wait for DNS propagation |
--product PRODUCT_ID | Product ID |
--period PERIOD | Purchase period |
--cert-id ID | Certificate order ID |
--resume | Resume an unfinished workflow |
--notify-url URL | Callback after issuance completes |
-k, --keylength BITS | 2048, 4096, ec-256, ec-384 |
--output DIR | Certificate output directory |
--cert-file PATH | Certificate file output path |
--key-file PATH | Private key file output path |
--ca-file PATH | CA chain output path |
--fullchain-file PATH | Full chain output path |
--reloadcmd CMD | Command to run after issuance |
--print-cert | Print the certificate |
--print-key | Print the private key |
--deploy TYPE | nginx, apache, tomcat, other, skip, or a deployment module name |
--deploy-cert PATH | Deployment certificate path |
--deploy-key PATH | Deployment private key path |
--deploy-chain PATH | Deployment certificate chain path |
--deploy-jks PATH | Tomcat JKS path |
--deploy-jks-pass PASS | Tomcat JKS password |
--deploy-key-alias ALIAS | Tomcat alias |
--deploy-reloadcmd CMD | Reload command after deployment |
--deploy-reload | Reload the service immediately after deployment |
--no-deploy-reload | Do not reload after deployment |
--deploy-plan | Show the deployment plan only |
--deploy-dry-run | Simulate deployment only |
--status | Query certificate status |
--verify-dcv | Trigger DCV manually |
--update-dcv | Change the DCV method |
--dcv-domain DOMAIN | Target domain for a single-domain DCV change |
--dcv-type TYPE | DCV type |
--dcv-value VALUE | DCV value |
--domain-dcv MAPPING | Batch DCV mapping |
--download | Download the certificate |
--list | List local orders |
--list-products | List products |
--revoke | Revoke/refund |
--revoke-reason REASON | Revocation reason |
--cron | Run the automatic check |
--install-cronjob | Install the Cron job |
--uninstall-cronjob | Uninstall the Cron job |
--renew-days DAYS | Days before expiry to auto-renew; default 14 |
--force | Force execution |
--debug | Output debug information |
--verbose | Output verbose logs |
Environment Variables
| Variable | Description |
|---|---|
AUTOSSL_HOME | Configuration root directory |
AUTOSSL_API_RETRIES | API retry count; default 3 |
AUTOSSL_CONFIG_LOCK_WAIT | Config lock wait in seconds; default 30 |
AUTOSSL_CRON_ORDER_TIMEOUT | Cron per-order timeout; default 900 |
AUTOSSL_EMAIL_DCV_AUTO | Default switch for email DCV |
AUTOSSL_SERVER_IPV4 | Specify this machine's public IPv4 |
AUTOSSL_EMAIL_DCV_WAIT_SECONDS | Email DCV wait time; default 420 |
AUTOSSL_EMAIL_DCV_POLL_INTERVAL | Email polling interval; default 5 |
AUTOSSL_EMAIL_DCV_SKIP_PORT_CHECK | Skip the port 25 check |
AUTOSSL_EMAIL_DCV_LISTENER_TIMEOUT | Built-in SMTP listener lifetime; default 900 |
AUTOSSL_BROWSER_BIND_DISABLE | Disable browser binding |
AUTOSSL_BROWSER_BIND_HOST | Browser binding listen address |
AUTOSSL_BROWSER_BIND_PORT | Browser binding listen port |
AUTOSSL_BROWSER_AUTH_ORIGIN | Browser authorization page address |
AUTOSSL_DNS_PLUGIN_ASYNC | Async loading switch for the DNS plugin menu |
AUTOSSL_DNS_PLUGIN_BATCH_SIZE | Batch size for loading the DNS plugin menu |
AUTOSSL_LIB_MODE | Skip main when sourced as a library |
Exit Codes
| Exit Code | Meaning |
|---|---|
0 | Success |
1 | User exited voluntarily |
2 | Invalid arguments |
3 | Business failure |
Troubleshooting Tips
| Problem | Root Cause | Resolution |
|---|---|---|
| Account not configured | account.conf missing EMAIL, EAB_KID, EAB_HMAC_KEY | Run --register-account again |
| API authentication failure | API Key not enabled, IP allowlist mismatch, wrong --server | Check the console configuration and API address |
| Insufficient balance | Account balance too low | Top up, then run --resume |
| DNS plugin not found | --dns name does not match dnsapi/dns_xxx.sh | Check the plugin file name |
| DNS validation failure | TXT not propagated, wrong DNS credentials, domain not under the account | dig TXT _acme-challenge.example.com @8.8.8.8 |
| HTTP validation failure | Wrong Webroot, ports 80/443 unreachable, proxy rewriting the validation file | Check the public validation URL |
| Email DCV failure | MX/A not pointing to this machine, port 25 unreachable | Fix DNS or switch to DNS/HTTP |
| Nginx deployment failure | nginx -t fails, no permission on target paths, server block not matched | Run --deploy-plan first |
| Cron did not renew | No order.conf, missing validation configuration, threshold not reached, lock not released | Run autossl.sh --cron --verbose |