Jump to content

Help with LetsEncrypt/SWAG docker not renewing certs...


Recommended Posts

Hi all,

 

Basic setup is Unraid 6.9.2 with the Swag docker installed and running away perfectly (I use it for a reverse proxy for my family to use Unraid, having followed SpaceInvaderOne's guide to set up.) The docker itself works perfectly, My family and I can access my Emby library from on and off the lan (duckdns used also.) However, I received an email recently from [email protected], stating my Swag certificates were expiring soon. 

 

My server turns off every evening at midnight, and starts back up every day at 16:00, so having googled this problem, most advice was that simply restarting the Swag docker would renew the certs (obviously this isn't happening for me, as my whole server restarts daily.) 

 

I found some info which allowed me to renew my certificates manually, by using the following instructions:

Open console for the specific docker (Swag) by clicking the docker name, and then choosing the console.
Type: certbot renew

 

^^ This seems to have resolved the issue of the cert not renewing automatically. However I'm concerned that I'll have to do this every few months & maybe forget altogether. So my question is this, how on earth can I automate the renewal myself? I can access the terminal through the Unraid GUI, but after that I'm lost. I'm comfortable typing in commands, but automating this process is a step beyond my knowledge. 

 

I have the User Scripts plugin installed, and I use this to shutdown my system every night. As for how I'd use this plugin though to automate cert renewal, I'm not sure. I think I'd have to write a script, and then point to that script in the plugin & then set the schedule? Can anyone help?

 

EDIT:

 

This is from my Swag docker log

 

[cont-init.d] 60-renew: executing...
The cert does not expire within the next day. Letting the cron script handle the renewal attempts overnight (2:08am).
[cont-init.d] 60-renew: exited 0.

 

So perhaps the docker is set to renew automatically at 02:08 - and therein lies the problem because my Server is offline at that time?

Edited by Unrayed
Link to comment
  • JorgeB locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...