Hey all,
A while ago, I was informed of this guide on settings up Let's Encrypt SSL certs for KeystoneJS:
I read through the guide and try to implement it, but I'm stuck and catch get KeystoneJS to launch. I think I'm close. If I can get a little help to get this working, I plan to write up a guide for the Keystone documentation on how to install NGINX to run multiple instances of Keystone AND how to set them up to serve pages over HTTPS.
Here are the steps I took:
- Register the domain name and set up the site as usual. (Domain name required)
- Setup nginx to serve static content. (optional)
- Install Certbot on the server: https://certbot.eff.org/#ubuntuxenial-nginx
- Install a certificate using Certbot. Example:
sudo certbot certonly --webroot -w /home/safeuser/weekendfood/myCMS/public -d weekendfood.org
And that's about where I got stuck. I edited my keystone.js file to include these lines:
'port': 3005,
'ssl-port': 3006,
'ssl': 'true',
'letsencrypt': {
register: true,
tos: true,
},
That should enable KeystoneJS to use the Let's Encrypt cert. I upgrade node to v4.8.2, because it was complaining about an older version of v4.x that I had. Here is the error that I'm getting:
le.challenges[http-01].loopback should be defined as function (opts, domain, token, keyAuthorization, cb) { ... } and should prove (by external means) that the ACME server challenge 'http-01' will succeed
le.challenges[tls-sni-01].loopback should be defined as function (opts, domain, token, keyAuthorization, cb) { ... } and should prove (by external means) that the ACME server challenge 'tls-sni-01' will succeed
------------------------------------------------
weekendfood failed to start: address already in use
Please check you are not already running a server on the specified port.
I've done some googling, but I can't find any solution to the loopback error or why I'm getting the 'address already in use' error. If I comment out the SSL stuff, I can run KeystoneJS like normal on port 3005 or 3006, so I know there is no other applications actually blocking those ports. The misleading error is definitely due to the SSL stuff.
Any idea what the actual issue is, where it exists, and how to fix it?
Thanks in advance for any help you can provide!
-Chris Troutner