Skip to content

Instantly share code, notes, and snippets.

@wangjiezhe
Last active April 6, 2024 04:40
Show Gist options
  • Save wangjiezhe/42cdb4a72890301a118d27052d022970 to your computer and use it in GitHub Desktop.
Save wangjiezhe/42cdb4a72890301a118d27052d022970 to your computer and use it in GitHub Desktop.
install acme.sh and issue a certificate on archlinux
#!/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 test@a.com --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/nginx/ssl/key.pem --fullchain-file /etc/nginx/ssl/cert.pem --reloadcmd "systemctl reload nginx" --home /etc/acme.sh
systemctl enable acme.sh.timer
systemctl start acme.sh.timer
[Service]
ReadWritePaths=/etc/acme.sh/
ReadWritePaths=/var/log/acme.sh/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment