SWAG Unraid Docker failing on startup: CERT Does not exist

Running into an issue with swag on startup. seeing this error (redacted my domains and other private info) :

[docker run]
-d
–name=‘SWAG’
–net=‘br2.80’
–ip=‘10.168.80.50’
–pids-limit 2048
–privileged=true
-e TZ=“America/New_York”
-e HOST_OS=“Unraid”
-e HOST_HOSTNAME=“XXXXXX”
-e HOST_CONTAINERNAME=“SWAG”
-e ‘TCP_PORT_80’=‘80’
-e ‘TCP_PORT_443’=‘443’
-e ‘[EMAIL’=‘XXXXXXXX]’
-e ‘URL’=‘XXXX.XXX’
-e ‘SUBDOMAINS’=‘XXXXXX,XXXXXX,XXXXXX’
-e ‘ONLY_SUBDOMAINS’=‘true’
-e ‘VALIDATION’=‘dns’
-e ‘DNSPLUGIN’=‘cloudflare’
-e ‘EXTRA_DOMAINS’=‘’
-e ‘STAGING’=‘false’
-e ‘DUCKDNSTOKEN’=‘’
-e ‘PROPAGATION’=‘30’
-e ‘MAXMINDDB_LICENSE_KEY’=‘XXXXXXXXXXXX’
-e ‘DOCKER_MODS’=‘linuxserver/mods:swag-maxmind’
-e ‘MAXMINDDB_USER_ID’=‘XXXXXXX’
-e ‘PUID’=‘99’
-e ‘PGID’=‘100’
-l net.unraid.docker.managed=dockerman
-l net.unraid.docker.webui=‘[IP]:[PORT:443]’
-l net.unraid.docker.icon=‘linuxserver-ls-logo.png’
-v ‘/mnt/user/appdata/joeproxy_2’:‘/config’:‘rw’
-v ‘/mnt/user/remotelogs/XXXXXX/’:‘/var/log/’:‘rw’
–cap-add=NET_ADMIN ‘lscr.io/linuxserver/swag

Log output:

Using Let’s Encrypt as the cert provider
SUBDOMAINS entered, processing
Sub-domains processed are: XXXXXXXX
E-mail address entered: [XXXXXXXX]
dns validation via cloudflare plugin is selected

Generating new certificate
certbot: error: unrecognized arguments: --dns–propagation-seconds=30
ERROR: Cert does not exist! Please see the validation error above. Make sure you entered correct credentials into the /config/dns-conf/cloudflare.ini file.

Running CERTBOT by itself works:

root:/mnt/cache/appdata/cloudflare-ddns-config# docker exec -it XXXXXXX certbot certonly
–dns-cloudflare
–dns-cloudflare-credentials /config/dns-conf/cloudflare.ini
–dns-cloudflare-propagation-seconds 30
-d XXXXXXXX
–email [XXXXXXXX]
–agree-tos
–non-interactive

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Account registered.
Requesting a certificate for XXXXXXXX
Waiting 30 seconds for DNS changes to propagate

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/XXXXXXXX/fullchain.pem
Key is saved at: /etc/letsencrypt/live/XXXXXXXXX/privkey.pem
This certificate expires on 2025-10-19.
These files will be updated when the certificate renews.

NEXT STEPS:

  • The certificate will need to be renewed before it expires. Certbot can automatically renew the certificate in the background, but you may need to take steps to enable that functionality. See User Guide — Certbot 5.0.0.dev0 documentation for instructions.

Comments:
This tells me that my cloudflare.ini keys are correct and the file permissions are working. I’m at a loss on what could be happening. It has been working fine for a few years. I can confirm the same error occurs when using ZeroSSL.

It looks like the issue in in teh way CERTBOT is being called and it’s not passing parameters correctly at minimum

certbot: error: unrecognized arguments: --dns–propagation-seconds=30
ERROR: Cert does not exist! Please see the validation error above. Make sure you entered correct credentials into the /config/dns-conf/cloudflare.ini file.

Nothing in any other logs tells me what might be happening… it seems like something in the container is the issue.