Summary
Step 4 of dynamic-config.sh writes dynamic/coolify-tweaks.yml with an unconditional heredoc:
cat >"$DYNAMIC_FILE" <<EOF
Any router the user added to that file is destroyed. Unlike .env and the proxy docker-compose.yml, this file is never backed up — the SKIP_BACKUP logic covers only those two, so there is nothing to restore from.
This is not a hypothetical edge case: the docs tell users to put custom routers in exactly this file.
Why this bites the documented path
dynamic-config.mdx → "Option B: Custom Domain" says to add, in addition to the port router:
http:
routers:
coolify-https-inject:
entryPoints: [https]
rule: "Host(`coolify.yourdomain.com`) && !PathPrefix(`/app`) && !PathPrefix(`/terminal/ws`)"
service: coolify
middlewares: [coolify-tweaks]
tls:
certResolver: letsencrypt
priority: 2000
Step 4's heredoc emits only the coolify-dashboard router on the coolify_dashboard entrypoint. So a user who followed Option B and later re-runs the installer — to pick up a fix, or change the CSS URL — silently loses their HTTPS injector. On a custom-domain-only setup that router is the only thing injecting the stylesheet, so tweaks stop working entirely with no error and no backup.
Repro
- Install, then add the Option B
coolify-https-inject router to dynamic/coolify-tweaks.yml as documented.
- Re-run
dynamic-config.sh.
coolify-https-inject is gone. No .bak for the file exists anywhere.
Confirmed on a live host (2026-08-01). My setup is custom-domain-only, so injection on the domain was the only working path; step 4 removed it. I had taken my own backup, so recovery was clean — a user following the docs would not have.
Suggested fix
Either would resolve it:
- Back the file up alongside the other two, honouring
SKIP_BACKUP:
cp "$DYNAMIC_FILE" "$DYNAMIC_FILE.bak-$DATE"
- Preserve unknown routers — merge with
yq instead of a heredoc, rewriting only the keys the installer owns (middlewares.rb-*, middlewares.coolify-tweaks, services.coolify, routers.coolify-dashboard) and leaving everything else untouched. This is the better fix, since it makes re-running idempotent for customized hosts.
At minimum, the installer should warn before clobbering a file containing routers it does not recognise.
Related: #62, #63. Companion issues: #67 (pre-flight port check), #68 (additive Traefik merge).
Summary
Step 4 of
dynamic-config.shwritesdynamic/coolify-tweaks.ymlwith an unconditional heredoc:Any router the user added to that file is destroyed. Unlike
.envand the proxydocker-compose.yml, this file is never backed up — theSKIP_BACKUPlogic covers only those two, so there is nothing to restore from.This is not a hypothetical edge case: the docs tell users to put custom routers in exactly this file.
Why this bites the documented path
dynamic-config.mdx→ "Option B: Custom Domain" says to add, in addition to the port router:Step 4's heredoc emits only the
coolify-dashboardrouter on thecoolify_dashboardentrypoint. So a user who followed Option B and later re-runs the installer — to pick up a fix, or change the CSS URL — silently loses their HTTPS injector. On a custom-domain-only setup that router is the only thing injecting the stylesheet, so tweaks stop working entirely with no error and no backup.Repro
coolify-https-injectrouter todynamic/coolify-tweaks.ymlas documented.dynamic-config.sh.coolify-https-injectis gone. No.bakfor the file exists anywhere.Confirmed on a live host (2026-08-01). My setup is custom-domain-only, so injection on the domain was the only working path; step 4 removed it. I had taken my own backup, so recovery was clean — a user following the docs would not have.
Suggested fix
Either would resolve it:
SKIP_BACKUP:yqinstead of a heredoc, rewriting only the keys the installer owns (middlewares.rb-*,middlewares.coolify-tweaks,services.coolify,routers.coolify-dashboard) and leaving everything else untouched. This is the better fix, since it makes re-running idempotent for customized hosts.At minimum, the installer should warn before clobbering a file containing routers it does not recognise.
Related: #62, #63. Companion issues: #67 (pre-flight port check), #68 (additive Traefik merge).