Caddy Versions Save

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

v2.5.0

2 years ago

Caddy 2.5 introduces new features you'll love as well as a huge number of bug fixes and enhancements. Thank you to everyone who contributed!

Feel free to ask on the forum if you have any questions or feedback.

Highlights

  • Reverse proxy: :sparkles: Dynamic upstreams, which is the ability to get the list of upstreams at every request (more specifically, every iteration in the proxy loop of every request) rather than just once at config-load time. Dynamic upstream modules can be plugged in to provide Caddy with the latest list of backends in real-time. Two standard modules have been implemented which can get upstreams from SRV and A/AAAA record lookups.
    • :warning: This deprecates the lookup_srv JSON field for upstreams (and srv+ scheme prefix in the Caddyfile), which will be removed in the future.
  • Automatic HTTPS: Caddy will automatically try to get relevant certificates from the local Tailscale instance (if running with permission to access the Tailscale socket). This makes services running on a Tailscale network automatically available over trusted HTTPS with Caddy.
  • Tracing: New OpenTelemetry integration with the tracing handler module and associated tracing directive.
  • Reverse proxy: When using the response handlers, a new handler copy_response is available to copy the proxy's response back to the client, and copy_response_headers may be used to selectively copy header values from the proxy's response.
  • API: Added new endpoints /pki/ca/<id> and /pki/ca/<id>/certificates for getting information about Caddy's managed CAs, including the chain of root and intermediate certificates.

Notable

  • Reverse proxy: The X-Forwarded-Host header will now be automatically set, along with X-Forwarded-For and X-Forwarded-Proto.
  • :warning: Reverse proxy: Incoming X-Forwarded-* headers will no longer be automatically trusted, to prevent spoofing. Now, trusted_proxies must be configured to specify a list of downstream proxies which are trusted to have sent good values. You only need to configure trusted proxies if Caddy is not the first server being connected to. For example, if you have Cloudflare in front of Caddy, then you should configure this with Cloudflare's list of IP ranges.
  • Automatic HTTPS: Revoked certificates will be automatically replaced more reliably.
  • Automatic HTTPS: Can now get certificates from Managers. As opposed to Issuers (such as the default ACME issuers) which give Caddy certificates to manage from a CSR, Managers give Caddy certificates to serve (rather than manage) during TLS handshakes.
  • Automatic HTTPS: A DNS challenge domain override can be configured to delegate the solving of the challenge to a different domain.
  • Automatic HTTPS: The DNS challenge propagation checks can now be delayed or disabled by setting propagation_delay or propagation_timeout to -1, respectively.
  • Reverse proxy: The default dial timeout for the HTTP transport has been adjusted down to 3s (was 10s), which should allow for more easily configuring load balancing retries.
  • Logging: HTTP access logs will now render empty values for often-sensitive HTTP headers such as Cookie, Authorization, and Proxy-Authorization. Logging such credentials is now opt-in with the log_credentials global option in the Caddyfile, or the server's logs > should_log_credentials field in JSON.
  • Logging: Logs can now be filtered by query string parameters, cookie values, and regular expressions; and log values can be hashed. These features are useful for redacting sensitive information.
  • Logging: Errors during request handling will now be logged at DEBUG level if the error was handled via errors routes (handle_errors in Caddyfile).
  • :warning: Logging: Removed the deprecated common_log field from HTTP access logs, and the single_field encoder. If you relied on this, you may use the transform encoder plugin to encode logs in Common Log format.
  • :warning: Logging: The remote_addr field has been replaced by remote_ip and remote_port fields in HTTP access logs, which split up the two parts of the remote address. This improves ease of use for some tooling which only expect an IP address, without a port.
  • HTTP server: The vars matcher can now match on multiple possible values.
  • HTTP server: Requests can now be assigned a random and unique UUID from the new {http.request.uuid} placeholder.
  • HTTP server: New http_redirect listener wrapper which can be used to redirect HTTP requests that come in on a server listening for HTTPS requests to be redirected to https://.
  • :warning: Caddyfile: Deprecated paths in site addresses. Prefer using path matchers within your site block instead.
  • Caddyfile: New default_bind global option lets you specify the default interface all sockets should bind to.
  • Caddyfile: New pki global option lets you configure the properties of the internal CAs managed by Caddy.
  • Caddyfile: New method directive allows rewriting the request method via Caddyfile.
  • :warning: Caddyfile: The reverse_proxy directive's handle_response subdirective has had its status replacement functionality moved to a new replace_status subdirective. This makes sure that the functionality of handle_response is not overloaded, and usage is clearer.
  • Caddyfile: The map directive now casts outputs to the appropriate scalar type if possible (int, float, bool). If you need to force a string, you may use double quotes or backticks https://github.com/caddyserver/caddy/pull/4643.
  • Caddyfile: New vars directive allows setting some variables during request handling for later use in another handler or matcher.
  • Caddyfile: The Caddyfile adapter is now stricter about curly braces for block openers to try to prevent parsing ambiguities.
  • Caddyfile: The caddy fmt CLI command now has a --diff option which lets you visually see the formatting differences.
  • :warning: Admin: Renamed experimental property load_interval :arrow_right: load_delay for clarification, and improved dynamic config loading.

:shield: Thanks to David Leadbeater for reporting a security vulnerability related to HTTP methods and metrics cardinality, which was fixed in this release.

New Contributors

Changelog

  • 2e46c2ac admin, reverseproxy: Stop timers if canceled to avoid goroutine leak (#4482)
  • 40b54434 admin: Enforce and refactor origin checking
  • b4bfa29b admin: Require identity for remote (fix #4478)
  • 32aad909 admin: Write proper status on invalid requests (#4569) (fix #4561)
  • ff137d17 caddyconfig: Support placeholders in HTTP loader
  • b47af6ef caddyfile: Copy input before parsing (fix #4422)
  • e90d7517 caddyfile: impove fmt warning message (#4444)
  • 5e5af50e caddyfile: make renew_interval option configurable (#4451)
  • ddbb234d caddyhttp: Always log handled errors at debug level (#4584)
  • 6b385a36 caddyhttp: Don't attempt to manage Tailscale certs
  • ecac03cd caddyhttp: Enhance vars matcher (#4433)
  • 6e6ce2be caddyhttp: Fix HTTP->HTTPS redir not preferring HTTPS port if ambiguous (#4530)
  • 3fe2c73d caddyhttp: Fix MatchPath sanitizing (#4499)
  • 44e5e9e4 caddyhttp: Fix test when /tmp/etc already exists (#4544)
  • 2bb8550a caddyhttp: Honor wildcard hosts in log SkipHosts (#4606)
  • 180ae0cc caddyhttp: Implement http.request.uuid placeholder (#4285)
  • 7d5047c1 caddyhttp: Log empty value for typical password headers
  • eead3373 caddyhttp: Log non-500 handler errors at debug level (#4429)
  • 5bf0adad caddyhttp: Make logging of credential headers opt-in (#4438)
  • 186fdba9 caddyhttp: Move HTTP redirect listener to an optional module (#4585)
  • 80d7a356 caddyhttp: Redirect HTTP requests on the HTTPS port to https:// (#4313)
  • bf380d00 caddyhttp: Reject absurd methods (#4538)
  • 850e1605 caddyhttp: Return HTTP 421 for mismatched Host header (#4023)
  • f55b123d caddyhttp: Split up logged remote address into IP and port (#4403)
  • ac14b64e caddyhttp: Support zone identifiers in remote_ip matcher (#4597)
  • a1c41210 caddypki: Minor tweak, don't use context pointer
  • 78e381b2 caddypki: Refactor /pki/ admin endpoints
  • c634bbe9 caddypki: Return error if no PEM data found
  • 9b7cdfa2 caddypki: Try to fix lint warnings
  • a79b4055 caddytls: Add internal Caddyfile lifetime, sign_with_root opts (#4513)
  • 77a77c02 caddytls: Add propagation_delay, support propagation_timeout -1 (#4723)
  • 66de438a caddytls: Fix MatchRemoteIP provisoning with multiple CIDR ranges (#4522)
  • 57a708d1 caddytls: Support external certificate Managers (like Tailscale) (#4541)
  • d9b1d463 caddytls: dns_challenge_override_domain for challenge delegation (#4596)
  • 1a7a78a1 cmd: Print error if fmt overwrite fails (fix #4524)
  • bc447e30 core: Config LoadInterval -> LoadDelay for clarity
  • 7ea5b2a8 core: Config load interval only reloads if changed (#4603)
  • 7f364c77 core: Load config at interval instead of just once
  • a72acd21 core: Retry dynamic config load if config unchanged
  • ceef70db core: Retry dynamic config load if error or no-op (#4603)
  • acbee947 core: Revert 7f364c7; simplify dynamic config load
  • 64a3218f core: Simplify shared listeners, fix deadline bug
  • 8e5aafa5 fastcgi: Fix a TODO, prevent zap using reflection for logging env (#4437)
  • c8f2834b fastcgi: Protect against requests with null bytes in the path (#4614)
  • de490c7c fastcgi: Set SERVER_PORT to 80 or 443 depending on scheme (#4572)
  • 09ba9e99 fileserver: Add pass_thru Caddyfile option (#4613)
  • 15c95e9d fileserver: Canonical redir when whole path is stripped (#4549)
  • c8b5a816 fileserver: Fix handling of symlink sizes in directory listings (#4415)
  • e81369e2 fileserver: Move default browse template into a separate file (#4417)
  • 1e10f6f7 fileserver: browse: do not encode the paths in breadcrumbs and page title (#4410)
  • 78b5356f fileserver: do not double-escape paths (#4447)
  • 0de51593 go.mod: Revert version bump of CEL (#4587)
  • 6f9b6ad7 go.mod: Update smallstep/certificates, no longer need replace (#4475)
  • 4906b935 go.mod: Update smallstep/truststore, fix build on FreeBSD (#4473)
  • c1331534 go.mod: Update to latest smallstep/truststore, support FreeBSD (#4453)
  • ff74a0aa go.mod: Upgrade dependencies
  • e9dde230 headers: Fix + in Caddyfile to properly append rather than set (#4506)
  • 1b7ff5d7 httpcaddyfile: Add default_bind global option (#4531)
  • a8bb4a66 httpcaddyfile: Add {vars.*} placeholder shortcut, reverse vars sort order (#4726)
  • 5a071568 httpcaddyfile: Add pki app root and intermediate cert/key config (#4514)
  • 3a1e0dbf httpcaddyfile: Deprecate paths in site addresses; use zap logs (#4728)
  • 26d633ba httpcaddyfile: Disabling OCSP stapling for both managed and unmanaged (#4589)
  • 93a7a45e httpcaddyfile: Fix incorrect handling of IPv6 bind addresses (#4532)
  • 81ee34e9 httpcaddyfile: Fix sorting edgecase for nested handle_path (#4477)
  • 4b9849c7 httpcaddyfile: Support configuring pki app names via global options (#4450)
  • 5bd96a6a httpcaddyfile: Support explicitly turning off strict_sni_host (#4592)
  • c921e082 logging: Add roll_local_time Caddyfile option (#4583)
  • 0eb0b60f logging: Remove common_log field and single_field encoder (#4149) (#4282)
  • 249adc1c logging: Support turning off roll compression via Caddyfile (#4505)
  • 8887adb0 logging: add a filter for cookies (#4425)
  • bcac2bee logging: add a filter for query parameters (#4424)
  • 789efa5d logging: add a regexp filter (#4426)
  • a1b417c8 logging: add support for hashing data (#4434)
  • eb891d46 metrics: Enforce smaller set of method labels
  • c04d24ca pki: Avoid provisioning the local CA when not necessary (#4463)
  • bbad6931 pki: Implement API endpoints for certs and caddy trust (#4443)
  • 9ee68c1b reverseproxy: Adjust defaults, document defaults (#4436)
  • 7557d1d9 reverseproxy: Avoid returning a nil error during GetClientCertificate (#4550)
  • ab045592 reverseproxy: Dynamic upstreams (with SRV and A/AAAA support) (#4470)
  • 5333c352 reverseproxy: Fix incorrect health_headers Caddyfile parsing (#4485)
  • c50094fc reverseproxy: Implement trusted proxies for X-Forwarded-* headers (#4507)
  • f5e10494 reverseproxy: Make shallow-ish clone of the request (#4551)
  • 87a1f228 reverseproxy: Move status replacement intercept to replace_status (#4300)
  • d058dee1 reverseproxy: Refactor dial address parsing, augment command parsing (#4616)
  • c7d6c4cb reverseproxy: copy_response and copy_response_headers for handle_response routes (#4391)
  • bcb7a19c rewrite: Add method Caddyfile directive (#4528)
  • 1feb6595 rewrite: Fix a double-encode issue when using the {uri} placeholder (#4516)
  • 6cadb60f templates: Document .OriginalReq
  • 1d0425b2 templates: Elaborate on what's supported by the markdown function (#4564)
  • a6199cf8 templates: Fix docs for .Args
  • ec14ccdd templates: fix inconsistent nested includes (#4452)
  • d0b608af tracing: New OpenTelemetry module (#4361)
  • 134b8056 caddyfile: Prevent bad block opening tokens (#4655)
  • c5fffb4a caddyfile: Support for raw token values; improve map, expression (#4643)
  • b82e22b4 caddyhttp: retain all values of vars matcher when specified multiple times (#4629)
  • bc15b4b0 caddypki: Load intermediate for signing on-the-fly (#4669)
  • 6512832f cmd: Add --diff option for caddy fmt (#4695)
  • 30b6d1f4 cmd: Enhance .env (dotenv) file parsing
  • 22d8edb9 cmd: Fix defaulting admin address if empty in config, fixes reload (#4674)
  • c2327161 cmd: Set Origin header properly on API requests
  • d06d0e79 go.mod: Upgrade CertMagic to v0.16.0
  • bf6a1b75 go.mod: Upgrade some dependencies
  • 79cbe7bf httpcaddyfile: Add 'vars' directive
  • a58f240d httpcaddyfile: Fix #4640 (auto-HTTPS edgecase) (#4661)
  • 7d229665 logging: Caddyfile support for duration_format (#4684)
  • 55b4c12e map: Evaluate placeholders in output vals (#4650)
  • 93c99f67 map: Support numeric and bool types with Caddyfile
  • 3d616e8c requestbody: Return HTTP 413 (fix #4558)
  • 3e3bb002 reverseproxy: Add _ms placeholders for proxy durations (#4666)
  • 2196c92c reverseproxy: Don't clear name in SRV upstreams
  • dc4d1473 reverseproxy: Expand SRV/A addrs for cache key
  • b8dbecb8 reverseproxy: Include port in A upstreams cache
  • e4ce40f8 reverseproxy: Sync up handleUpgradeResponse with stdlib (#4664)
  • afca2421 staticfiles: Expand placeholder for index files (#4679)
  • 00234c8a templates: Switch to BurntSushi/toml (#4700)

Full Changelog: https://github.com/caddyserver/caddy/compare/v2.4.6...v2.5.0

v2.5.0-rc.1

2 years ago

Please see the release notes for v2.5.0. In fact, just use v2.5.0 instead.

Interim Changelog: https://github.com/caddyserver/caddy/compare/v2.5.0-beta.1...v2.5.0-rc.1

v2.5.0-beta.1

2 years ago

Please see the release notes for v2.5.0-rc.1. In fact, just use v2.5.0-rc.1 instead.

Interim Changelog: https://github.com/caddyserver/caddy/compare/v2.4.6...v2.5.0-beta.1

v2.4.6

2 years ago

This release contains bug fixes and minor enhancements, including one patch with potential security implications related to path matching.

Notable patches:

  • Path matchers unescape/clean URI paths to normalize match space
  • Fix regex matching in map handler

Notable enhancements:

  • try_files can now accept =nnn (e.g. =404) to yield a status code instead of a file.
  • Template actions httpError (stop eval and return HTTP error) and import (like include but changes template context) were added
  • New placeholder {http.request.tls.client.certificate_der_base64}

Changelog

749e55c7 caddycmd: Add --keep-backup to upgrade commands (#4387) 062657d0 caddycmd: Add --skip-standard to list-modules command, quieter output (#4386) be5f77e8 caddycmd: fix caddy validate/fmt help message (#4377) 907e2d8d caddyhttp: Add support for triggering errors from try_files (#4346) cbb045a1 caddyhttp: Placeholder for client cert in DER + base64 format (#4241) e7457b43 caddyhttp: Sanitize the path before evaluating path matchers (#4407) 837cdc56 caddyhttp: reverseproxy: clarify warning for -insecure (#4379) 24fda751 caddytls: Mark storage clean timestamp at end of routine (#4401) a779e1b3 fastcgi: Fix Caddyfile parsing when handle_response is used (#4342) 3f2c3ecf fastcgi: Implement try_files override in Caddyfile directive (#4347) 64f8b557 fileserver: Fix compression breaks using httpInclude (#4352) (#4358) d3a02599 fileserver: Fix displayed file size if it is symlink (#4354) 0a5f7a67 fileserver: Make file listing links purple once visited (#4356) a21d5a00 fileserver: Prevent focusing filter from scrolling on page load (#4393) 33c70f41 fileserver: properly handle escaped/non-ascii paths (#4332) c4790d7f go.mod: Carefully upgrade some dependencies (fix #4251) 997e41de go.mod: Replace promptui with Apache-compatible fork (fix #4394) f376a38b go.mod: Update ACMEz and CertMagic a4372066 headers: Canonicalize case in replace (fix #4330) 012d2353 httpcaddyfile: Empty tls policy for internal http localhost (#4398) 0ffb2229 httpcaddyfile: Preserve IPv6 addresses through normalization (fix #4381) a2119c09 map: Fix 95c03506 (avoid repeated expansions) 95c03506 map: Fix regex mappings 3336faf2 reverseproxy: Log error at error level (fix #4360) b0920615 reverseproxy: Prevent copying the response if a response handler ran (#4388) f73f55db reverseproxy: Sanitize scheme and host on incoming requests (#4237) 5fda9610 templates: Add 'import' action (#4321) 16f75212 templates: Add tests for funcInclude and funcImport (#4357) 2392478b templates: Propagate httpError to HTTP response

v2.4.5

2 years ago

A hotfix for a regression introduced in v2.4.4 related to combining the encode and reverse_proxy directives. Please see the v2.4.4 release notes for a more complete changelog.

Changelog

9f6393c6 cmd: export CaddyVersion(), Commands() (#4316) 4ebf100f encode: ignore flushing until after first write (#4318) 46ab93be go.mod: Update CertMagic

v2.4.4

2 years ago

This release contains numerous bug fixes, updated dependencies, and QoL improvements.

Update: This release contains a known regression in the combination of encode and reverse_proxy modules; please use v2.4.5 instead.

Thanks to all contributors, and a special thanks to @francislavoie and @Mohammed90 for their dedication in helping to maintain the project and help others.

Changelog

0bdb8aa8 acmeserver: Don't set host for directory links by default 2de7e14e acmeserver: Trim slashes from path prefix c131339c admin: Implement load_interval to pull config on a timer (#4246) a10910f3 admin: Sync server variables (fix #4260) (#4274) 51f125bd caddyfile: Better error message for missing site block braces (#4301) d74913f8 caddyfile: Error on invalid site addresses containing comma (#4302) b6f51254 caddyfile: keep error chain info in Dispenser.Errf (#4233) 1c6c7714 caddyhttp: Fix edgecase with auto HTTP->HTTPS logic (#4243) 42e140b1 caddyhttp: Fix incorrect determination of gRPC protocol (#4236) c1cd192e caddyhttp: Updated the documentation for MatchQuery (#4295) 81e53180 caddytls: Remove "IssuerRaw" field ce5a45db cmd: Fix paths when using an env file (#4296) 68c5c716 cmd: New add-package and remove-package commands (#4226) 9e333c39 cmd: use net.ErrClosed for matching returned error (#4289) 1b1e625c core: Unix ns and Unix ms time placeholders (#4280) 69c91448 encode: Tweak compression settings (#4215) 4245ceb6 fileserver: Add disable_canonical_uris Caddyfile subdirective (#4222) 191dc86f fileserver: Clarify docs about canonicalization 9e16e80f fileserver: Fix browse name_dir_first sorting (#4218) 885a9aaf go.mod: Update dependencies (close #4216) f43fd6f3 go.mod: Upgrade CertMagic to v0.14.4 84b906a2 go.mod: Upgrade some dependencies ab32440b httpcaddyfile: Add shortcut for proxy hostport placeholder (#4263) b3d35a49 httpcaddyfile: Don't put localhost in public APs (fix #4220) 569ecdbd httpcaddyfile: Ensure hosts to skip for logs can always be collected (#4258) bfbc459c httpcaddyfile: Improve unrecognized directive errors 403732c4 httpcaddyfile: Reorder some directives (#4311) 46d99aba logging: Add missing interface guards for replace filter (#4244) 124ba1ba logging: Prep for common_log removal (#4149) 8a974a4f logging: Warn for deprecated single_field encoder e6c29ce0 reverseproxy: Incorporate latest proxy changes from stdlib (#4266) d8822110 reverseproxy: Keep path to unix socket as dial address (#4232) f70a7578 reverseproxy: Remove redundant flushing (#4299)

v2.4.3

2 years ago

Guess what: this is our 100th release! :tada: :partying_face: :confetti_ball:

A bug fix for the bug fix, and a couple other bug fixes, including one security fix for PHP sites. We think all users should upgrade after giving it a whirl in their test environments. Please note some changes in this patch:

  • :warning: In reverse_proxy, the max_idle_conns_per_host option has been removed (both Caddyfile and JSON). This may be a breaking change for a few of you, but it only breaks configs that relied on a bug. Instead of silently failing, you will get an error if you continue using the property. For Caddyfile, we basically renamed the property to keepalive_idle_conns_per_host. In JSON, we simply removed the property, and you should instead set keep_alive/max_idle_conns_per_host if you weren't already. Previously, the Caddyfile subdirective set both MaxConnsPerHost and MaxIdleConnsPerHost, which was confusing; and the JSON properties overwrote each other, so one was removed. Issue #4201.
  • :shield: Security patch in the FastCGI transport that now sanitizes paths against directory traversal outside the site root. PR #4207.
  • :bug: Fix canonicalization redirects in file_server. v2.4.2 introduced a bugfix (#4179) for these redirects when used inside handle_path (i.e. rewriting the path by stripping a prefix), but caused a regression for many other use cases. This release includes a proper fix for all known, tested cases. Basically: these redirects are not issued if the filename of a path was rewritten internally. Issue #4205.

Changelog

9d4ed3a3 caddyhttp: Refactor and export SanitizedPathJoin for use in fastcgi (#4207) e8ae80ad fileserver: Don't persist parsed template (fix #4202) fbd65609 fileserver: Only redirect if filename not rewritten (fix #4205) 32c284b5 reverseproxy: Adjust test related to #4201 7c68809f reverseproxy: Fix overwriting of max_idle_conns_per_host (closes #4201)

v2.4.2

2 years ago

A few enhancements and bug fixes. Thanks to all who contributed to this release!

Changelog

323ffd20 admin: Replace admin cert cache when reloading (fix #4184) 4c2da188 caddytls: Add Caddyfile support for propagation_timeout (#4178) 76913b19 fileserver: Fix browse not redirecting query parameters (#4196) f9b54454 fileserver: Redirect within the original URL (#4179) ecd5eeab go.mod: Update direct dependencies 89aa3a5e go.mod: Use CertMagic v0.14.0 (fix #4191) 1e92258d httpcaddyfile: Add preferred_chains global option and issuer subdirective (#4192) 658772ff httpcaddyfile: Add skip_install_trust global option (#4153) 05656a60 httpcaddyfile: Don't add HTTP hosts to TLS APs (fix #4176 and fix #4198) 94b71200 logging: Actually use level_key (#4189) 7b500e74 metrics: use buildinfo collector from new collectors pkg (#4187) 2a810946 reverseproxy: Always remove hop-by-hop headers

v2.4.1

2 years ago

A small patch release that contains a few noncritical but pleasant fixes (unless you're using /id/ endpoints in the admin API; then you should definitely get this update).

Changelog

7f26a6b3 admin: Reinstate internal redirect for /id/ requests b82db994 caddyfile: Add parse error on site address with trailing { (#4163) 2aefe156 cmd: upgrade: inherit the permissions of the original executable (#4160) dbe164d9 httpcaddyfile: Fix automation policy consolidation again (fix #4161) e3c369d4 logging: Implement dial timeout for net writer (fix #4083) (#4172) aef8d4de reverseproxy: Set the headers in the replacer before handle_response (#4165)

v2.4.0

3 years ago

Caddy v2.4.0 is our first stable release of 2021, ushering in over 110 patches including new features and bug fixes. Thank you to the many contributors who helped make this possible!

Highlights:

  • Secure remote management. You can now enable secure remote access to Caddy's admin API! It uses TLS mutual authentication, and you can even define permissions for different users. PR #3994
  • Config pull at start. Caddy can be configured to load a different config at startup. This is useful if your config is federated through a separate system that doesn't have the ability to push configs to Caddy. This feature is modular, so configurations can be loaded different ways! PR #3994
  • Server identity management. Caddy can automatically manage its own server identity certificate, which can be used when negotiating TLS connections with peers. This is required when enabling the secure admin API. PR #3994
  • Self-upgrade command. The new caddy upgrade command will replace the current Caddy binary with an upgraded one from our website, with all the same modules installed, including third-party plugins that are registered on our site! (We can use this code to add/remove modules later, too.)
  • Configure other apps from the HTTP Caddyfile. The global options block of the Caddyfile now allows configuration of Caddy apps other than HTTP (for example, dynamic_dns to keep DNS records pointed at your server with a dynamic IP address).
  • Caddyfile fmt lint check. When running with a Caddyfile, Caddy will emit a warning if the Caddyfile is not formatted with caddy fmt.
  • New abort directive. The abort directive is a special case of the static_response HTTP handler that prevents an HTTP response by aborting the handler chain immediately and forcefully closing the connection.
  • New error directive. The error directive returns internal error values in the HTTP handler chain, as if an HTTP error had occurred, causing your error routes to be invoked.
  • Configure response interception from Caddyfile. The reverse_proxy is capable of intercepting responses from the backend, and now this is exposed in the Caddyfile with handle_response.
  • Better caddy list-modules output. Now modules are organized by standard and non-standard modules, so you can easily see if a Caddy build has been customized.
  • Configure logging from Caddyfile. The process logs can now be configured from the global options of the Caddyfile.
  • Better content negotiation. The file server can now be configured to serve precompressed sidecar files, and content encoding preferences are better configured and honored.
  • Dark mode in directory listings. The file server's "browse" file listings now has a dark mode.
  • :warning: Removed the logfmt log encoder. It was broken anyways, and its deprecation has been warned in previous releases.
  • :warning: Deprecated common_log format. It will be removed in a future release. Issue #4148
  • :warning: Deprecated health_path in reverse_proxy directive. It has been replaced with health_uri and will be removed in the future.
  • Numerous bug fixes and improvements. Thanks for the detailed, helpful bug reports! We appreciate your collaboration in making Caddy better.

New content for sponsors

I've started writing high-quality, in-depth chatpers about how to get the most out of Caddy in my new Expert Caddy series, exclusively for sponsors! If you or your company are sponsoring, you can have access to this content, which I'll continue adding to over time.

If you aren't sponsoring yet, please do so! Sponsorships fund my full-time development of Caddy, and that's especially vital if your business relies on Caddy.

Changelog (since RC 1)

For a detailed list of all commits since v2.3.0, please refer to prior pre-release changelogs.

bc221024 caddyfile: Fix caddy fmt nesting not decrementing (#4157) d4b2f1bc caddyhttp: Fix fallback for the error handler chain (#4131) 61642b76 caddytls: Run replacer on ask URL, for env vars (#4154) 77764714 encode: Default to order the formats are enabled for prefer in Caddyfile (#4151) f5db41ce encode: Drop prefer from Caddyfile (#4156) 74f5d66c fileserver: Fix file matcher with empty try_files (#4147) 3cf443f0 httpcaddyfile: Add grace_period global option (#4152) a17c3b56 reverseproxy: Minor logging improvements