# acme.sh 1. 安裝 ``` curl https://get.acme.sh | sh ``` 2. 加 alias under .bash_profile(.bashrc, .profile) ``` alias acme.sh=~/.acme.sh/acme.sh ``` 3. 生成證書 ``` acme.sh --issue -d mydomain.com --nginx ``` 接著為了讓nginx可以讓外面連的到隱藏檔來完成認證 要在設定檔中加上 ``` location /.well-known/acme-challenge { } ``` 4. 移動證書 ``` acme.sh --installcert -d <domain>.com \ --key-file /etc/nginx/ssl/<domain>.key \ --fullchain-file /etc/nginx/ssl/fullchain.cer ``` ###### tags: `note`