Skip to content

brahma-dev/acme-lego-cron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

acme-lego-cron

github-actions

Dockerized Lego with cron. Caters to DNS ACME challenge; other challenges can be worked out using LEGO_ARGS.

Environment variables

Environment variables are used to control various steps of the automation process.

Lego

Name Default value Description Corresponds to lego argument
STAGING 0 Whether to use production or staging LetsEncrypt endpoint. 0 for production, 1 for staging
KEY_TYPE ec384 Type of key. --key-type
DOMAINS "" Domains (delimited by ';' ) --domains, -d
EMAIL_ADDRESS "" Email used for registration and recovery contact. --email, -m
PROVIDER "" DNS Provider. Valid values are: edgedns,alidns,allinkl,lightsail,route53,
arvancloud,auroradns,autodns,azure,azuredns,
bindman,bluecat,brandit,bunny,checkdomain,
civo,cloudru,clouddns,cloudflare,cloudns,
cloudxns,conoha,constellix,cpanel,derak,
desec,designate,digitalocean,dnsmadeeasy,dnshomede,
dnsimple,dnspod,dode,domeneshop,dreamhost,
duckdns,dyn,dynu,easydns,efficientip,
epik,exoscale,exec,freemyip,gcore,
gandi,gandiv5,glesys,godaddy,gcloud,
googledomains,hetzner,hostingde,hosttech,
httpreq,httpnet,hurricane,hyperone,ibmcloud,
iijdpf,infoblox,infomaniak,iij,internetbs,
inwx,ionos,ipv64,iwantmyname,joker,
acme-dns,liara,linode,liquidweb,loopia,
luadns,mailinabox,manual,metaname,mydnsjp,
mythicbeasts,namedotcom,namecheap,namesilo,nearlyfreespeech,
netcup,netlify,nicmanager,nifcloud,njalla,
nodion,ns1,otc,oraclecloud,ovh,
plesk,porkbun,pdns,rackspace,rcodezero,
regru,rfc2136,rimuhosting,sakuracloud,scaleway,
selectel,servercow,shellrent,simply,sonic,
stackpath,tencentcloud,transip,safedns,ultradns,
variomedia,vegadns,vercel,versio,vinyldns,
vkcloud,vscale,vultr,webnames,websupport,
wedos,yandex360,yandexcloud,yandex,zoneee,
zonomi
--dns
DNS_TIMEOUT 10 Set the DNS timeout value to a specific value in seconds. --dns-timeout.
LEGO_ARGS "" Send arguments directly to lego, e.g. "--dns.disable-cp" or "--dns.resolvers 1.1.1.1"

Examples

This example get one certificate for *.example.com and example.com using cloudflare dns :

  • Use staging endpoint during development.
  • You can share the same volume letsencrypt with other machines.
version: "3"
services:
  lego:
    image: brahmadev/acme-lego-cron:latest
    environment:
      STAGING: 1
      DOMAINS: "example.com;*.example.com"
      EMAIL_ADDRESS: [email protected]
      CLOUDFLARE_DNS_API_TOKEN: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
      PROVIDER: cloudflare
      LEGO_ARGS: "--dns.disable-cp --dns.resolvers 1.1.1.1"
    volumes:
      - "letsencrypt:/letsencrypt"