Jump to content

Programmatically provision SSL certificate


Go to solution Solved by ljm42,

Recommended Posts

You don't need to, there's already an autoupdate function built-in.

 

Quote

After an Unraid.net SSL Certificate has been installed, two background services are activated while the server is signed in to unraid.net:

updatedns - This starts 30 seconds after server reboot has completed and contacts the Lime Technology DNS service to register the servers local IP address. Thereafter it wakes up every 10 minutes in case the local IP address has changed.

renewcert - This starts 60 seconds after server reboot has completed and contacts the Lime Technology certificate renewal service to determine if your Unraid.net SSL certificate needs to be renewed. Thereafter it wakes up every 24 hours. If within 30 days of expiration, a new certificate is automatically provisioned and downloaded to your server.

 

Link to comment

image.thumb.png.52e808aecf110b1651854fa7f8540b21.png

 

This is the path it shows in the settings UI. I just replace that file with my custom certificate (it has nothing todo with Unraid.net or whatever server they offer), but nothing happens.

Unraid only picks it up when I press "Provision".

 

So I assume that I need to press that button. If there's a better way, please tell me :)

Link to comment

Anything Unraid stores in /boot/config is only loaded at boot time, then resides in RAM so it's normal that it doesn't get picked up.

 

It's not clear what the purpose is but it seems you should probably be using a reverse proxy container rather than hijacking this feature.

Edited by Kilrah
Link to comment
  • Solution

The "Provision" button will provision a myunraid.net certificate. There is no need to press it if you are providing your own custom certificate.

 

You can provide your own certificate if you want, but the filename is different. See https://wiki.unraid.net/Manual/Security#Custom_Certificates 

 

So have your shell script put the certificate here:

/boot/config/ssl/certs/[servername]_unraid_bundle.pem

And then run:

/etc/rc.d/rc.nginx reload

 

  • Thanks 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...