Last active
April 1, 2025 16:19
-
-
Save wangjiezhe/42cdb4a72890301a118d27052d022970 to your computer and use it in GitHub Desktop.
install acme.sh and issue a certificate on archlinux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pacman -S --noconfirm acme.sh | |
yay -S --noconfirm acme.sh-systemd | |
# https://ram.console.aliyun.com/users | |
# require `AliyunDNSFullAccess` | |
export Ali_Key="***" | |
export Ali_Secret="***" | |
acme.sh --register-account -m [email protected] --home /etc/acme.sh | |
acme.sh --issue --dns dns_ali -d a.com -d *.a.com --home /etc/acme.sh | |
acme.sh --install-cert -d a.com -d *.a.com --key-file /etc/caddy/ssl/key.pem --fullchain-file /etc/caddy/ssl/cert.pem --reloadcmd "chown -R caddy:caddy /etc/caddy/ssl && systemctl try-reload-or-restart caddy" --home /etc/acme.sh | |
systemctl enable acme.sh.timer | |
systemctl start acme.sh.timer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Service] | |
ReadWritePaths=/etc/acme.sh/ | |
ReadWritePaths=/var/log/acme.sh/ | |
ReadWritePaths=/etc/nginx/ssl/ | |
ReadWritePaths=/etc/caddy/ssl/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment