$ docker compose -f acmesh.yaml up -d
ACME_HOME_DIR=./acme.sh
# CloudFlare
#CF_API_EMAIL
#CF_API_KEY
# DNSPod
#DP_ID
#DP_KEY
# CloudFlare
#CX_KEY
#CX_SECRET
#!/bin/sh | |
# https://hub.docker.com/r/neilpang/acme.sh/dockerfile | |
if [ ! -f /acme.sh/account.conf ]; then | |
echo 'First startup' | |
acme.sh --update-account --accountemail ${ACME_SH_EMAIL} | |
echo 'Asking for certificates' | |
acme.sh --issue \ | |
-d "${DOMAIN_NAME}" -d "*.${DOMAIN_NAME}" \ | |
--dns "${DNS_API}" | |
fi | |
echo 'Listing certs' | |
acme.sh --list | |
# Keep the container running | |
# /entry.sh daemon | |
# New method | |
crond -n -s -m off |
version: '2' | |
services: | |
acme: | |
image: neilpang/acme.sh:latest | |
volumes: | |
- ./acme.sh-docker.sh:/acme.sh-docker.sh:ro | |
- ${ACME_HOME_DIR:-./acme.sh}:/acme.sh | |
environment: | |
# CloudFlare | |
CF_Key: ${CF_API_KEY} | |
CF_Email: ${CF_API_EMAIL} | |
# From: https://github.com/acmesh-official/acme.sh/wiki/dnsapi | |
DNS_API: "dns_cf" | |
DOMAIN_NAME: "example.com" | |
ACME_SH_EMAIL: "[email protected]" | |
command: sh ./acme.sh-docker.sh | |
container_name: acme |
wouldn't the correct export variable be CF_Token instead of CF_Key ? At least that did it for me after changing to Let's Encrypt.
wouldn't the correct export variable be CF_Token instead of CF_Key ? At least that did it for me after changing to Let's Encrypt.
I am using zerossl but do not have this issue, how did you configure CloudFlare ?
A scoped token ?
I pushed some updates to the gist today.
See my working source: https://github.com/wdes/mails.wdes.eu/tree/fc4c71397977cf1958a3eef1783828363732c4a7/scripts
And the docker compose part: https://github.com/wdes/mails.wdes.eu/blob/fc4c71397977cf1958a3eef1783828363732c4a7/docker-compose.yml#L283-L321
heya thanks for the gist!
When I try and deploy the cert with
acme.sh --deploy -d example.com --deploy-hook docker
I get this error:Solved, I was missing the additional values, as per instructions. Many thanks again!
So this is what I'm using now: