Editing
Automated Certificate Renewal
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=Automated Certificate Renewal= ===Script Location=== <code>/usr/local/bin/renew-and-update-certs.sh</code> ===Script Contents=== <syntaxhighlight lang="bash"> #!/bin/bash # Renew certificates /usr/syno/sbin/syno-letsencrypt renew-all -v # Check if renewal was successful (exit code 0) if [ $? -eq 0 ]; then # Update Navidrome certificates cp /usr/syno/etc/certificate/system/default/RSA-cert.pem /volume2/docker/navidrome/ssl/certificate.crt cp /usr/syno/etc/certificate/system/default/RSA-privkey.pem /volume2/docker/navidrome/ssl/private.key chmod 644 /volume2/docker/navidrome/ssl/certificate.crt chmod 600 /volume2/docker/navidrome/ssl/private.key docker restart navidrome echo "Certificates renewed and Navidrome updated" else echo "Certificate renewal failed, skipping Navidrome update" fi </syntaxhighlight> ===Task Scheduler Configuration=== '''Control Panel > Task Scheduler''' {| class="wikitable" |- ! Setting !! Value |- | Task name || Auto-renew SSL and Update Navidrome |- | User || root |- | Schedule || Weekly (Sunday, 3:00 AM) |- | Script || <code>/usr/local/bin/renew-and-update-certs.sh</code> |} ===How It Works=== # Script runs weekly # Checks all certificates for renewal (30 days before expiry) # Renews any expiring certificates via Let's Encrypt # If successful, copies new certs to Navidrome # Restarts Navidrome container with fresh certificates
Summary:
Please note that all contributions to Wreckroom may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Wreckroom:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information