Dehydrated client with Cloudflare hook, run inside a Docker container.
-
Create the following files:
docker-compose.ymlversion: '3' services: certs: image: carlgo11/dehydrated-docker env_file: - .env volumes: - ./domains.txt:/tmp/domains.txt:ro - ./certs/:/persistent/certs - persistent:/persistent tmpfs: - /tmp read_only: true restart: unless-stopped volumes: persistent:
.env
CF_EMAIL="" CF_KEY="" CF_SETTLE_TIME="" CONTACT_EMAIL="" CA="letsencrypt"
-
Create the directory
certs
mkdir certs chown 1000:1000 certs
-
Create
domains.txt
and fill it the desired domains to create certificates for:example.com sub.example.com
- Manually run the script
docker-compose up
- Run the script via a cron job
# Run at start of each month 0 0 1 * * cd ${SCRIPT PATH}; docker-compose up
Name | Example | Description |
---|---|---|
CA | Letsencrypt | Certificate Authority name |
CF_EMAIL | [email protected] | Cloudflare account email |
CF_KEY | xxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxx | Cloudflare API Key with DNS edit access |
CF_SETTLE_TIME | 15 | Waiting delay |
CONTACT_EMAIL | [email protected] | CA registration email |