Is there an existing issue for this?
Current Behavior
When using the SWAG container, after fetching the certificates a hook at /config/etc/letsencrypt/renewal-hooks/deploy/10-default is run. However, this hook crashes because the symlink at /config/keys/letsencrypt is owned by root:root, and thus the certificates fail to be generated in the format that nginx requires properly. incorrect and points to the wrong folder name, see comment below!
Expected Behavior
I'm not sure whether this symlink is supposed to be created as root:root instead of the PUID:PGID supplied to the container as environment variables. However, the container runs as root, so there must be some step missing where it sets the correct permissions.
Use the proper location for the symlink
Steps To Reproduce
- Deploy container
- Observe error in container logs
Environment
- OS: TrueNAS SCALE
- How docker service was installed: built-in
CPU architecture
x86-64
Docker creation
URL=example.com
VALIDATION=dns
CERTPROVIDER=zerossl
DNSPLUGIN=cloudflare
PROPAGATION=60
EMAIL=example@example.com
ONLY_SUBDOMAINS=true
SUBDOMAINS=
EXTRA_DOMAINS=*.host.example.com
STAGING=false
DOCKER_MODS=linuxserver/mods:swag-dashboard|linuxserver/mods:swag-dbip
MAXMINDDB_LICENSE_KEY=<redacted>
MAXMINDDB_USER_ID=<redacted>
PUID=568 (apps user for Docker containers in TrueNAS)
PGID=568
Container logs
2026-05-30 19:34:10.979319+00:00Renewing an existing certificate for example.com and *.example.com
2026-05-30 19:34:14.949933+00:00Waiting 60 seconds for DNS changes to propagate
2026-05-30 19:35:38.009062+00:00Hook 'deploy-hook' reported error code 1
2026-05-30 19:35:38.009149+00:00Hook 'deploy-hook' ran with error output:
2026-05-30 19:35:38.009162+00:00/config/etc/letsencrypt/renewal-hooks/deploy/10-default: line 4: cd: /config/keys/letsencrypt: No such file or directory
2026-05-30 19:35:38.022117+00:002026-05-30T19:35:38.022117295Z
2026-05-30 19:35:38.022178+00:00Successfully received certificate.
2026-05-30 19:35:38.022215+00:00Certificate is saved at: /config/etc/letsencrypt/live/example.com/fullchain.pem
2026-05-30 19:35:38.022231+00:00Key is saved at: /config/etc/letsencrypt/live/example.com/privkey.pem
2026-05-30 19:35:38.022245+00:00This certificate expires on 2026-08-28.
2026-05-30 19:35:38.022258+00:00These files will be updated when the certificate renews.
2026-05-30 19:35:38.022285+00:00NEXT STEPS:
2026-05-30 19:35:38.022301+00:00- 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 https://certbot.org/renewal-setup for instructions.
2026-05-30 19:35:38.024347+00:002026-05-30T19:35:38.024347437Z
2026-05-30 19:35:38.024419+00:00- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2026-05-30 19:35:38.024438+00:00If you like Certbot, please consider supporting our work by:
2026-05-30 19:35:38.024452+00:00* Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
2026-05-30 19:35:38.024466+00:00* Donating to EFF: https://eff.org/donate-le
2026-05-30 19:35:38.024491+00:00- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2026-05-30 19:35:38.247860+00:00ERROR: Cert does not exist! Please see the validation error above. Make sure you entered correct credentials into the /config/dns-conf/cloudflare.ini file.
Is there an existing issue for this?
Current Behavior
When using the SWAG container, after fetching the certificates a hook at
/config/etc/letsencrypt/renewal-hooks/deploy/10-defaultis run. However, this hook crashes because the symlink at/config/keys/letsencryptisowned byincorrect and points to the wrong folder name, see comment below!root:root, and thus the certificates fail to be generated in the format that nginx requires properly.Expected Behavior
I'm not sure whether this symlink is supposed to be created asroot:rootinstead of thePUID:PGIDsupplied to the container as environment variables. However, the container runs as root, so there must be some step missing where it sets the correct permissions.Use the proper location for the symlink
Steps To Reproduce
Environment
CPU architecture
x86-64
Docker creation
Container logs