mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2026-07-27 06:14:13 +00:00
Page:
Packager guide
Pages
ARI
Account management
Actalis.com CA
Blacklist
Blogs and tutorials
BuyPass.com CA
CA
Change default CA to ZeroSSL
Code of conduct
DNS API Dev Guide
DNS API Structural Info description
DNS API Test
DNS alias mode
DNS manual mode
DNS persist mode
Deploy ssl certs to apache server
Deploy ssl certs to nginx
Deploy ssl to SolusVM
Donate list
Enable acme.sh log
Exit Codes
Explicitly use DOH
Google Public CA
Google Trust Services CA
Home
How to debug acme.sh
How to install
How to issue a cert
How to run on DD WRT with lighttpd
How to run on OpenWrt
How to use Amazon Route53 API
How to use Azure DNS
How to use OVH domain api
How to use Oracle Cloud Infrastructure DNS
How to use lexicon DNS API
How to use on Solaris based operating sytsems
How to use on embedded FreeBSD
Install in China
Install on Windows
Install preparations
Issue a cert from existing CSR
OVH Success
Options and Params
Packager guide
Preferred Chain
Profile selection
Run acme.sh in docker
SSL.com CA
Server
Shell completion
Simple guide to add TLS cert to cpanel
Stateless Mode
Synology NAS Guide
Synology RT1900ac and RT2600ac install guide
TLS ALPN without downtime
Usage on Tomato routers
Use DNS Exit DNS API
Using pre hook post hook renew hook reloadcmd
Using systemd units instead of cron
Utilize multiple DNS API keys
Validity
ZeroSSL.com CA
_Footer_
debug in VM
deploy to docker containers
deployhooks
dnsapi
dnsapi2
dnscheck
dnssleep
how about the private key access modes, chmod, or chown or umask
ipcert
notify
openvpn2.4.7服务端和客户端使用注意
revokecert
sudo
tlsa next key
如何安装
说明
No results
1
Packager guide
neil edited this page 2026-07-17 22:01:45 +08:00
Table of Contents
Packager guide
This page is for distro / package maintainers who ship acme.sh as a system
package (deb, rpm, port, etc.), typically with the files under a
package-managed directory like /usr/share/acme.sh.
The problem
By default acme.sh manages itself:
acme.sh --installcopies the script and the hook folders (dnsapi,deploy,notify) into$LE_WORKING_DIR(default~/.acme.sh), so users end up running a frozen copy that your package upgrades can never update.acme.sh --upgrade,acme.sh --install-onlineand the cronAUTO_UPGRADE=1path download the latest master from GitHub and install it over$LE_WORKING_DIR. If your package pointsLE_WORKING_DIRat the packaged files, this overwrites package-managed files.acme.sh --uninstallremoves$LE_WORKING_DIR/acme.sh, which again may be a package-managed file.
ACME_PACKAGED
Since v3.1.5, set the ACME_PACKAGED environment variable to any non-empty
value to tell acme.sh that it is managed by a system package manager:
--installdoes not copy the script, the completion file or the hook folders into$LE_WORKING_DIR. It still creates the working/config dirs, writesaccount.conf, installs the cron job and the shell alias -- both pointing to the packaged script itself.--upgrade,--install-onlineand the cronAUTO_UPGRADEpath refuse with an error telling the user to upgrade via the package manager.--uninstallremoves the cron job and the alias, but does not delete the script files.
The easiest way to set it is a wrapper installed as /usr/bin/acme.sh:
#!/bin/sh
export ACME_PACKAGED=1
exec /usr/share/acme.sh/acme.sh "$@"
Notes
- Do not point
LE_WORKING_DIRat the packaged directory. Leave it at the default (~/.acme.shper user, or let users pick--home): it holds the per-user state (account.conf, account keys, certs). The hooks are looked up next to the running script automatically, no copy in$LE_WORKING_DIRis needed. - Users can still use
--config-hometo separate config/certs from$LE_WORKING_DIRas usual. - There is intentionally no path auto-detection ("am I under /usr?"): a git
clone under
/usr/localor a custom--homeunder/usrare legitimate self-managed installs.ACME_PACKAGEDis an explicit opt-in by the packager.
See https://github.com/acmesh-official/acme.sh/issues/7135 for background.