Enable SSL via LetsEncrypt
-
Hello,
I am trying to get my central Mango to run HTTPS...
I have used LetsEncrypt for some websites, but I got lost regarding Mango....
I think I need to make some ".jks" configs or something?
Also, how do I redirect port 80 requests to port 443?
Any pointers?
Thanks,
Alex -
The reason why I commented this post here a couple of weeks ago :)
https://forum.infiniteautomation.com/topic/3230/ssl-settings-on-mangoes
Use @Jared-Wiltshire post on how to configure Mango settings and create your jks and my post to modify this jks so that you would add LetsEncrypt or other certs to the jks.
-
We've talked about and looked into having an easy to use integration with Let's Encrypt, but we haven't done so quite yet. If you do use it though, and you are restarting Mango every time you get a new certificate loaded into a JKS (which is what, every three months?) so that it presents the correct certificate, know that you can tell Mango to reload it's SSL settings, but you have to be using a JKS file in the same file location with the same credentials (but I don't think it matters if you replace the file or update the existing certificates in the existing JKS). After that's in place, you can run this in a script (and just validating the script is sufficient to make it happen)
com.serotonin.provider.Providers.get(com.serotonin.m2m2.IMangoLifecycle.class).reloadSslContext();
You may need to close and open the browser to see the new certificate loaded, or clear your cached site data.