-
Details
-
mkdir -p /usr/local/etc
cd /usr/local/etc
curl -LO https://github.com/dehydrated-io/dehydrated/archive/master.zip
unzip master.zip
mv dehydrated-master dehydrated
cp /usr/local/etc/dehydrated/docs/examples/config /usr/local/etc/dehydrated
mkdir -p /usr/local/etc/dehydrated/accounts
cd dehydrated
./dehydrated --config /usr/local/etc/dehydrated/config --register --accept-terms
nano /usr/local/etc/dehydrated/domains.txt
example.org sub1.example.org sub2.example.org
example.com sub1.example.com
nano /usr/local/etc/dehydrated/config
WELLKNOWN="/tmp"
#WELLKNOWN="/var/www/dehydrated"
nano /etc/systemd/system/letsencrypt.service
[Unit]
Description=Renews letsencrypt certificates
After=network.target
[Service]
Type=oneshot
WorkingDirectory=/usr/local/etc/dehydrated/
ExecStart=/bin/bash /usr/local/etc/dehydrated/dehydrated --cron --config /usr/local/etc/dehydrated/config
[Install]
WantedBy=multi-user.target
systemctl enable letsencrypt.service
systemctl start letsencrypt.service
nano /etc/systemd/system/letsencrypt.timer
[Unit]
Description=letsencrypt timer
[Timer]
OnCalendar=daily
Persistent=true
Unit=letsencrypt.service
[Install]
WantedBy=basic.target