OPNsense Forum

Archive => 23.7 Legacy Series => Topic started by: tverweij on October 12, 2023, 05:12:09 PM

Title: Acme client - export certificates
Post by: tverweij on October 12, 2023, 05:12:09 PM
Is there a way to export the certificates from the Acme client?
And if so, can this be done by an API call?
Title: Re: Acme client - export certificates
Post by: Maurice on October 12, 2023, 05:52:08 PM
System: Trust: Certificates in the GUI, or just copy them from /var/etc/acme-client/home/. No API call that I'm aware of though.

Cheers
Maurice
Title: Re: Acme client - export certificates
Post by: tverweij on October 12, 2023, 05:56:23 PM
That was really stupid of me - did not think of that as the certs were generated by an add on.


Title: Re: Acme client - export certificates
Post by: Maurice on October 12, 2023, 06:11:22 PM
Well, there is an ACME client API, but I don't think there is a call to export certificates:
https://docs.opnsense.org/development/api/plugins/acmeclient.html

Did you consider an ACME automation to automatically upload the certificate after creation / renewal?
Title: Re: Acme client - export certificates
Post by: julsssark on October 12, 2023, 06:28:02 PM
Where do you want the certificate to go? There are automations (Services->ACME client->Automations) that upload to Synology, SFTP to a server, etc.
Title: Re: Acme client - export certificates
Post by: tverweij on October 12, 2023, 09:40:19 PM
Thanks, that is something I have to look at.
I need the same certificates for mail and FTP servers.
Title: Re: Acme client - export certificates
Post by: CJ on October 13, 2023, 04:27:07 PM
If you're using separate subdomains such as mail.example.com, ftp.example.com and www.example.com you can just run an ACME client on each of those servers for that subdomain specifically.
Title: Re: Acme client - export certificates
Post by: tverweij on October 13, 2023, 04:52:46 PM
Quote from: CJ on October 13, 2023, 04:27:07 PM
If you're using separate subdomains such as mail.example.com, ftp.example.com and www.example.com you can just run an ACME client on each of those servers for that subdomain specifically.

That is what is failing with NGINX in between ...
Title: Re: Acme client - export certificates
Post by: julsssark on October 13, 2023, 05:21:51 PM
I use the OPNsense Acme client to get all of the certs for my servers (nas.domain.com, unifi.domain.com, etc.) and then an automation to move the cert to the server that uses it.