06.05.2022, 11:10
(11.12.2020, 07:39)admin Wrote: The script that you've provided won't work on LM. At this point it's not possible to fully automate this process without an external server. We have plans to add a service that uses LetsEncrypt for fully automated certificate issue and renewal but I can't tell you when it's going live.
For now you can replace the current key/certificate like this:
Code:require('json') -- data from privkey.pem key = [[ -----BEGIN PRIVATE KEY----- ... -----END PRIVATE KEY----- ]] -- data from fullchain.pem crt = [[ -----BEGIN CERTIFICATE----- ... -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- ... -----END CERTIFICATE----- ]] json.data = function() return { values = { mode = 'set', key = key, crt = crt, } } end stat, res = pcall(dofile, '/lib/flashsys/httpd_crt/save.lua') if stat then res = json.pdecode(res) log(res) os.execute('/etc/init.d/nginx reload') else log('error', res) end
Hello Admin:
Is there anyway to fully automate the LetsEncrypt certificates?
best regards