[Solved] How to extract private and public key from let'sencrypt cache for using in ipv4 revese proxy

Hi,

I have been using mattermost in ssl behind an ipv4 apache reverse proxy. certificates were managed in apache, and a cron would copy them to mattermost so that certificate updates are automatically forwarded.

We are now migrating to ipv6 in dual stack. the side effect is that let’s encrypt will prefer ipv6 for checking, and thus fail when connecting directly to mattermost.

I have configured mattermost to get certificates from let’s encrypt, and this works fine. Now I need to figure how to recover the certificate file from let’sencrypt cache. The cache file looks like 1 private key, and 2 public certs. Is there a white paper describing this or a tool to export this as 2 separate .pem files, so that I can use the proper certs for my mattermost when accessed using our public ipv4.

Regards,

Hi,

Answer to self:

This seems to work for what I needed.

How to extract public & private key from let’s encrypt cache

1 Like

Thanks so much for following up with the solution, Sbsrouteur! Good find.