Paozhu logo Paozhu Docs
Documentation
OPS

ACME & HTTPS

Built-in ZeroSSL ACME client, HTTP-01 issuance, automatic renewal and OCSP stapling.

Two config files

ACME needs conf/acme.conf for the email and ZeroSSL parameters, and acme_auto = 1 on the target site in conf/server.conf. Both are required.

conf/acme.confini
[info]
acme_path   = ./acme
cert_path   = ./conf
email       = admin@example.com
days_remain = 10

[zerossl]
server_url  = https://acme.zerossl.com/v2/DV90
eab_api     = https://api.zerossl.com/acme/eab-credentials-email
eab_kid     =
eab_hmac_key =
conf/server.confini
[default]
acme_auto      = 0
acme_every_day = 7
acme_every_num = 5

[www.example.com]
acme_auto = 1

Issuance flow

  1. Scheduled trigger

    httpwatch ticks every 5 seconds; at the hour set by acme_every_day (valid 2–23) it starts a detached task thread.

  2. Collect domains

    It walks sites with acme_auto = 1. www.x.com expands to x.com plus www.x.com; single-label domains get a www. prefix.

  3. Check expiry

    It reads notAfter from acme_path/domain/cert.pem and skips when more than days_remain days remain.

  4. HTTP-01 challenge

    The webroot is the site wwwpath, so port 80 must be publicly reachable for that site.

  5. Download artifacts

    It writes privkey.pem, cert.pem, chain.pem, fullchain.pem; the account key is acme_path/account_key.pem.

  6. Install and reload

    fullchain.pem becomes <domain>.pem, privkey.pem becomes .key and cert.pem becomes .crt next to server.conf. Then log/restart_ssl_config triggers an SSL_CTX rebuild and OCSP cache clear.

Renewal settings

KeyFileConstraint / effect
days_remainacme.confDefault 10, clamped to 2–89
acme_every_dayserver.confHour of day, valid 2–23
acme_every_numserver.confDomains per run, clamped to 1–30
cert_pathacme.confRead by the config parser but does not decide the output path; certificates land next to server.conf

OCSP stapling

ocsp_intv_time defaults to 14400. Parsing clamps it to 500–86400 and runtime applies a 3600 floor; the real wall-clock interval is “ticks × 5 seconds”. Refresh reads the site certificate, obtains the OCSP URL from AIA and caches DER at temp/ocsp_domain.der. The handshake attaches the cached response via SNI.

Verify

terminalbash
curl -I https://www.example.com/
openssl s_client -connect www.example.com:443 -servername www.example.com </dev/null \
  | openssl x509 -noout -dates
h2load -n 1000 -c 20 -m 10 --npn-list h2 https://www.example.com/

Troubleshooting

SymptomCheck
No issuance at allWhether email is empty and site acme_auto is 1
Challenge failsPort 80 reachability; wwwpath correctness and write access
Certificate not updatedWhether log/restart_ssl_config was consumed and file names match the domain
h2 unavailableSite http2_enable = 1 or global global_http2_enable = 1