WARNING This is deprecated. You should instead use the official LEGO provider https://go-acme.github.io/lego/dns/njalla/
Updated 25/09/2022: njal.la api was updated - and lego lib wasn't working anymore.
A patch was provided but Traefik 2.9 is still not including the patch. (failed to unmarshal response result: json: cannot unmarshal string into Go struct field Record.id of type int when trying to renew certificates)
Solution ? Use this tool as an http provider to correctly renew certificates. So this is temporarily undeprecated to patch this Traefik issue.
API for njal.la automatic wildcard certification with Let's Encrypt (compatible with lego's httpreq strategy).
Disclosure: It relies on my unofficial njal.la library node-njalla-dns to administrate your domains.
Don't forget to change variables.
NJALLA_API_KEY
is your njal.la API key (Go on https://njal.la/settings/api/ to grab one)HTTPREQ_USERNAME
is a username that will be used by lego to access this APIHTTPREQ_PASSWORD
is a password that will be used by lego to access this API
$ npm install && NJALLA_API_KEY=your_njalla_api_key \
HTTPREQ_USERNAME=lego \
HTTPREQ_PASSWORD=password \
npm run start
We advise you to use docker to test your configuration. The next command runs a DNS validation like it will do when deployed on production.
Don't forget to change variables before running.
HTTPREQ_USERNAME
is theHTTPREQ_USERNAME
you set when you started the APIHTTPREQ_PASSWORD
is theHTTPREQ_PASSWORD
you set when you started the APIHTTPREQ_ENDPOINT
is the host and port of this API--domains
is the domain you want LEGO to get certificates for--email
is the email that will be used by Let's Encrypt
$ docker run --rm -ti \
-e "HTTPREQ_USERNAME=lego" \
-e "HTTPREQ_PASSWORD=password" \
-e "HTTPREQ_ENDPOINT=http://<your_local_ip_like_192_168_0_xx>:8080" \
goacme/lego \
--server=https://acme-staging-v02.api.letsencrypt.org/directory \
--dns httpreq \
--domains domain.io \
--email hello@romualdr.io run
Note that this command uses staging LE environment to avoid hitting the request limit
docker build -t njalla-letsencrypt:latest -f ./docker/Dockerfile .
docker-compose -f ./docker/docker-compose.yml up -d lego-njalla-api