rpi_nimbus

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
rpi_nimbus [2019/08/01 09:56] – [Let's Encrypt] Júne Parkrpi_nimbus [2019/11/19 18:15] – [Specification] Júne Park
Line 39: Line 39:
 <code ini> <code ini>
 Mounted on          Type  Size  Used Avail Use% Mounted on          Type  Size  Used Avail Use%
-/home/meson/storage ext4  458G   44G  391G  11%+/home/meson/storage ext4  458G  130G  305G  30%
 /var/www            ext4  220G   18G  191G   9% /var/www            ext4  220G   18G  191G   9%
 </code> </code>
Line 184: Line 184:
 </code>  </code> 
  
----- +  
 +=== Renew certificate(s) using systemd ===  
 + 
 +Check renewal executes without error,  
 + 
 +<code bash>  
 + sudo certbot renew --dry-run  
 +</code>  
 + 
 +== Service unit file ==  
 + 
 +If no error, edit **service unit file** typically stored in ''/etc/systemd/system/''. Edit ''/etc/systemd/system/certbot-renewal.service''  
 + 
 +<code ini>  
 +[Unit] 
 +Description=Certbot Renewal 
 + 
 +[Service] 
 +ExecStart=/usr/bin/certbot renew --post-hook "systemctl restart nginx.service" 
 +</code>  
 + 
 +Which restarts web service after renewing certificate(s).   
 + 
 +== Timer unit file ==  
 + 
 +Modify ''/etc/systemd/system/certbot-renewal.timer'' to adjust timer for certbot renewal.  
 + 
 +<code ini>  
 +[Unit] 
 +Description=Timer for Certbot Renewal 
 + 
 +[Timer] 
 +OnBootSec=300 
 +OnUnitActiveSec=2w 
 + 
 +[Install] 
 +WantedBy=multi-user.target 
 +</code>  
 + 
 +The configuration below will activate the service biweekly, and 300 seconds after boot-up. 
 + 
 +== Using systemctl and journalctl ==  
 + 
 +To start the timer 
 +<code bash>  
 +  sudo systemctl start certbot-renewal.timer 
 +</code>  
 + 
 +To enable the timer to be started on boot-up 
 +<code bash>  
 +  sudo systemctl enable certbot-renewal.timer 
 +</code>  
 + 
 +To show status information for the timer 
 +<code bash>  
 +  systemctl status certbot-renewal.timer 
 +</code>  
 + 
 +To show journal entries for the timer 
 +<code bash>  
 +  journalctl -u certbot-renewal.service 
 +</code> 
 + 
 +----
 ==== SSL Configuration on Nginx ====  ==== SSL Configuration on Nginx ==== 
  
  • rpi_nimbus
  • Last modified: 2024/05/11 15:37
  • by Júne Park