This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Renewing SSL certificate
#3
(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
Reply


Messages In This Thread
Renewing SSL certificate - by buuuudzik - 09.12.2020, 23:02
RE: Renewing SSL certificate - by admin - 11.12.2020, 07:39
RE: Renewing SSL certificate - by batistacaceres - 06.05.2022, 11:10
RE: Renewing SSL certificate - by admin - 06.05.2022, 11:12
RE: Renewing SSL certificate - by admin - 06.05.2022, 11:33
RE: Renewing SSL certificate - by Leo681 - 06.06.2023, 15:23

Forum Jump: