- Create all attached files below as-is. Directory structure:
etc
├── nginx
│ ├── sites-enabled
│ │ └── domain.tld.port.conf (several)
│ └── ssl
│ ├── .conf # file attached as ssl.conf
│ ├── well-known.conf # file attached
│ ├── dhparam.pem # generated
│ ├── fullchain.crt # generated
│ └── crt.key # generated- Run
acme.sh --register-account
[Thu 20 Feb 2020 03:50:02 PM CET] Registering account
[Thu 20 Feb 2020 03:50:04 PM CET] ACCOUNT_THUMBPRINT='yE8E0qQPemsGL'You'll get an ACCOUNT_THUMBPRINT, which you should add to the return value of well-known as <ACCOUNT_THUMBPRINT> in /etc/nginx/ssl/well-known.conf
-
Run:
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 -
Edit
$/sites-enabled/<domain.tld.port.conf>and add your<DOMAIN.TLD>and internal<PORT>for nginx listen on -
sudo systemctl restart nginx -
Get certs:
acme.sh --issue -d <DOMAIN.TLD> --stateless
You can repeat -d <DOMAIN.TLD> for as many domains as you want.
- Install certs:
sudo acme.sh --install-cert -d <DOMAIN.TLD> --key-file /etc/nginx/ssl/cert.key --fullchain-file /etc/nginx/ssl/fullchain.crt-
Uncomment last line in
/etc/nginx/sites-enabled/domain.tld.port.conf -
sudo systemctl restart nginx