Hello, please help with getting started.
Cant figure out how to work with greenlock
I have Node v 4.4.5 (can’t upgrade)
NGINX separated config for my.domain.com:
server {
listen 80;
server_name “my.domain.com”;
root /server/my-domain;
index index.html;
What steps have you tried already, perhaps link to whatever “greenlock” actually is (you can’t expect everybody to know every software in existance), what exact problems you’re running into et cetera.
To get the right answers, you’ll need to ask the right questions
I guess that “greenlock” stuff is quite a specific library. It would take one a lot of time to dig in the whole library to figure out how to use it. I myself currently don’t have the time, sorry.
Important: Use node v4.5+ or v6.x, node <= v4.4 has a known bug in the Buffer implementation.
It also says:
This is a low-level library for implementing ACME / LetsEncrypt Clients, CLIs, system tools, and abstracting storage backends (file vs db, etc).
Doesn't sound like you're using the best tool for the job. This is a tool for writing a client for Let's Encrypt. If you need to ask how to use it to write a client, you probably shouldn't be using that tool. Or, failing that, you should probably ask the developers of that tool.
I have several servers (machines). Each has several subdomains. I need to build system that will be automaticaly update certificates (it will be NodeJS process). First it will periodicaly check existing certificates, when their endDate is close, process wil automaticaly rerequest new. Certificates and keys from each subdomain are in separated folder
(…/server/my1.domain.com/cert , …/server/my2.domain.com/cert etc).
So there will be config where
domains:[
{
name:‘my1.domain.com’,
email: ‘my@email.com’,
some_needed_info: ‘xz’,
some_needed_path:’/for/example/to/certificate/file
},
{…}
…,
{…}
]
I found, that Greenlock the only library that works on NodeJS (THE ONLY NODEJS ACME Client Implementations );
And i spent whole day to understand how it works, but couldn’t…
I think people are puzzled by your approach in this case, because almost everyone using Node chooses to use some existing external client application (which may or may not itself be written in Node) to get their certificates. It seems like you’ve decided to write your own, which will be an elaborate, complicated programming project to replicate functionality that might already exist. Could you explain why using an existing client application isn’t appropriate for your situation and why the certificate request needs to happen natively from inside of your Node application?
Thank for answer .The boss want it to be nodejs process (daemon), that will be started in PM2 and periodicaly check and update certificates, if new subdomain or domain appears, the only thing we must do - write information to config and restart daemon.
I dont need to replicate existing functionality. Do you know any (npm??) client module, that has API i can use for requesting?