Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Greenlock-Express doesn't work with le-store-s3 #4

Open
koder217 opened this issue Apr 26, 2018 · 0 comments
Open

Greenlock-Express doesn't work with le-store-s3 #4

koder217 opened this issue Apr 26, 2018 · 0 comments

Comments

@koder217
Copy link

I was able to get greenlock-express working with default filesystem middleware. But i will need S3 in production. I tried using le-challenge-s3 and le-store-s3. But i can't even open the site. ("Site can't be reached" in chrome). I am debugging from VPS exposed to internet and confirming DNS entries work fine. (It worked with "fs" middleware)

I set debug to true and the following is printed and nothing else happens (domain name changed to example.com)

[le/index.js] le.approveDomains called with certs for NONE and options:
[le/index.js] { domain: 'example.com',
 domains: [ 'example.com' ],
 agreeTos: true,
 email: '[email protected]' }
[le/index.js] le getting from disk or registering new
[le/lib/core.js] checkAsync failed to find certificates

Following is my initialization code:

const S3 = {
    bucketName: 'example-letsencrypt',
    region: 'us-west-2'
};
const store = require('le-store-s3').create({S3});
const challenge = require('le-challenge-s3').create({S3});
var lex = require('greenlock-express').create({
                server: 'https://acme-staging-v02.api.letsencrypt.org/directory'
                , version: 'draft-11' // Let's Encrypt v2 (ACME v2)
                , challenges: {'http-01': challenge}
                , challengeType: 'http-01'
                , store: store
                , approveDomains: approveDomains,
                configDir: "acme",
                app: app,
                debug: true
            });
            lex.listen(80, 443);

function approveDomains(opts, certs, cb) {
    if (certs) {

        opts.domains = certs.altnames;
        cb(null, {options: opts, certs: certs});

    } else {
        opts.email = "[email protected]";

        opts.agreeTos = true;

        cb(null, {options: opts, certs: certs});
    }
}

I don't know what I am doing wrong. I don't see anything in example-letsencrypt bucket in S3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant