feat: add Caddy web server provider#4534
Open
masonjames wants to merge 9 commits into
Open
Conversation
|
Related Knowledge 1 document with suggested updates is ready for review. Dokploy's Space README
|
46a438e to
7baf056
Compare
Open
Author
|
Architecture RFC for this PR (comparison with the label-driven approach, production evidence, and a proposed stacked split so nobody has to review 27.8k lines at once): #4615 — a commit regroup and a review-map description update for this PR are coming shortly to make it tractable. |
…o behavior change)
8a4292f to
0dcc5f9
Compare
…validate Caddy's Server.trusted_proxies_strict JSON field is an int; the compiler emitted a JSON boolean, so `caddy validate` rejected any config with strict trusted proxies enabled. Found in production on 2026-06-10. Emit 1 when strict; keep omitting the field otherwise.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Caddy as an opt-in web-server provider alongside Traefik. Traefik remains the default and is untouched unless a user explicitly runs the guarded migration.
Related: #1246 (feature request). RFC with architecture comparison: #4615.
Review map — where the +27.8k actually is
web-server-settings.ts)Real-source hotspots, largest first:
packages/server/src/utils/caddy/config.ts(+1,107) — Caddy JSON compilationpackages/server/src/utils/caddy/migration/(~4,300 across prepare/apply/rollback/translators/preflight/files/types)apps/dokploy/server/api/routers/settings.ts(+881/−23) — provider + migration endpoints (candidate forwebServerRouterextraction)packages/server/src/utils/caddy/{domain,compose,web-server,types}.ts(~580) — route generationpackages/server/src/setup/caddy-setup.ts(+332)services/settings.ts,services/web-server-settings.ts,services/domain.ts,utils/docker/domain.ts, db schema/validationscomponents/dashboard/settings/web-server/*(migration panel, provider selector, trusted proxies, env editor),domains/handle-domain.tsx,show-traefik-*made provider-awareutils/access-log/{utils,handler}.tsSafety model
Validation
Fresh run on the regrouped branch (2026-06-10):
pnpm --filter=@dokploy/server typecheck— clean (tsc --noEmit)pnpm --filter=dokploy typecheck— clean (tsc --noEmit)pnpm --filter dokploy run test— 80/81 test files pass: 710 passed, 1 skipped, 4 failed. All 4 failures are in__test__/deploy/application.real.test.ts("REAL Execution" tests that require the local Docker daemon to be a swarm manager) — environment-dependent and unrelated to this PR; every caddy/db/traefik suite passes