How to replace the SSL certificates via the API or SSH

Status
Not open for further replies.

Cosmo_Kramer

Contributor
Joined
Jan 9, 2013
Messages
103
Hello,
I'm working on some automation with Ansible to replace my FreeNAS web GUI certificate with certificates from Let's Encrypt.

Looking at the API documentation (http://api.freenas.org/resources/system.html#ssl), I see that you can get a new certificate generated from the API, but I don't see a way to supply your own certificate and private key.

Is there perhaps a way to do this over SSH instead?

Thank you for your help.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
You might want to file a feature request, if what you're looking for isn't listed in the documentation.
 
Joined
Jan 5, 2017
Messages
2
This is semi-possible. Load the certificate once via the GUI and it goes in /etc/certificates as <name>.crt and <name>.key. You can automate replacing these files and restarting nginx easily. However, I have not yet figured out how to make the new certificate survive a reboot.
 
Status
Not open for further replies.
Top