I have CA certificates files in "greenlock.d/live/URL_PATH/". It's expiration date is Aug 2022.
But I want to renew them right now to check whether they are renewing or not. Please suggest me how can I renew them at any time?
I have tried number of solutions like:
app.js
'use strict';
var app = function(req, res) {
res.end('Hello, Encrypted World!');
};
module.exports = app;
server.js
'use strict';
var beapp = require('./app.js');
require('greenlock-express')
.init({
packageRoot: __dirname,
maintainerEmail: "EMAIL_ID",
configDir: './greenlock.d',
cluster: true
})
// .serve(beapp);
.ready(httpsWorker);
function httpsWorker(glx) {
var httpsServer = glx.httpsServer(null, beapp);
httpsServer.listen(443, "0.0.0.0", function () {
console.info("Listening on ", httpsServer.address());
});
}
greenlock.d/config.json
{
"defaults": {
"store": {
"basePath": "./greenlock.d",
"module": "greenlock-store-fs"
},
"challenges": {
"http-01": {
"module": "acme-http-01-standalone"
}
},
"renewOffset": "-45d",
"renewStagger": "3d",
"accountKeyType": "EC-P256",
"serverKeyType": "RSA-2048",
"subscriberEmail": "EMAIL_ID"
},
"sites": [
{
"subject": "URL_PATH",
"altnames": [
"URL_PATH"
],
"renewAt": 1
}
]
}
- npm init
- npm install --save greenlock-express@v4
- npx greenlock init --config-dir ./greenlock.d --maintainer-email 'jon@example.com'
- npx greenlock add --subject example.com --altnames example.com
- node server.js
Reference : https://www.npmjs.com/package/greenlock-express#1-create-your-project