Caddy v2.6.3 released

I’m pleased to announce that Caddy v2.6.3 is now available! It contains a number of bug fixes, minor features, and other enhancements.

We recommend that everyone read the release notes and upgrade. :slight_smile: There are a great deal of bug fixes and enhancements.

Thank you to all who contributed to this release!

8 Likes

Ayyy, global trusted_proxies!

2 Likes

And, global trusted_proxies is pluggable!

I’m hoping someone will write a plugin to load and periodically refresh Cloudflare’s list of IPs.

See caddyhttp package - github.com/caddyserver/caddy/v2/modules/caddyhttp - Go Packages for implementation recommendations.

4 Likes

Update: already done, caddy-cloudflare-ip. Available in official plugin list.

Seems easy enough, cloudflare actually provides url to retrieve latest

3 Likes

My automated build process update from renovate failed with the following error:

#6 39.74 panic: internal error: can't find reason for requirement on github.com/google/pprof@v0.0.0-20210601050228-01bbb1931b22
#6 39.74 
#6 39.74 goroutine 1 [running]:
#6 39.74 cmd/go/internal/modget.(*resolver).updateBuildList.func1({{0xc000d632a8?, 0xc0005fd3b0?}, {0xc00002a7e0?, 0xc000539190?}})
#6 39.74 	/usr/local/go/src/cmd/go/internal/modget/get.go:1760 +0x114
#6 39.74 cmd/go/internal/modget.(*resolver).updateBuildList(0xc000693600, {0xb2e7b0, 0xc00002c058}, {0xc00036a3c0, 0x1, 0x1})
#6 39.74 	/usr/local/go/src/cmd/go/internal/modget/get.go:1765 +0x597
#6 39.74 cmd/go/internal/modget.(*resolver).applyUpgrades(0xc000693600, {0xb2e7b0, 0xc00002c058}, {0xc001d120c0?, 0x1?, 0x472485?})
#6 39.74 	/usr/local/go/src/cmd/go/internal/modget/get.go:1312 +0x105
#6 39.74 cmd/go/internal/modget.runGet({0xb2e7b0, 0xc00002c058}, 0xc000028480?, {0xc0000241c0, 0x2, 0x2})
#6 39.74 	/usr/local/go/src/cmd/go/internal/modget/get.go:351 +0x45e
#6 39.74 main.invoke(0xe28fa0, {0xc000024190, 0x5, 0x5})
#6 39.74 	/usr/local/go/src/cmd/go/main.go:225 +0x34e
#6 39.74 main.main()
#6 39.74 	/usr/local/go/src/cmd/go/main.go:179 +0x7d1

Havent had the time to look into it yet will post more detailed when I get time, just wanted to check if anyone else has same issue.

Edit: This may be due to third party caddy extensions, just wanted to point it out started happening on this update.

I do not know, sorry :frowning:

I would try removing plugins from the build, one by one, until it works. (or do it binary-style if you’ve got a lot.) Then you know which one is culprit. Sometimes we see situations where minor dependency upgrades require plugins to have to upgrade their dependencies or it breaks go.mod tooling, unfortunately.

Edit: Looks like an upstream bug that has been reported before: cmd/go: get: panic: internal error: can't find reason for requirement on golang.org/x/sync@... · Issue #56494 · golang/go · GitHub

hi @matt , just want to confirm that I’m seeing the same behaviour as @mattvb91 is seeing. I’ve been getting pretty much the same error in both automated and manual builds since v2.6.3 release.

The following Dockerfile:

FROM caddy:builder AS builder

RUN xcaddy build \
    --with github.com/caddy-dns/acmedns

FROM caddy:latest

COPY --from=builder /usr/bin/caddy /usr/bin/caddy

gives me this error:

#8 16.06 go: added google.golang.org/protobuf v1.28.1
#8 16.07 2023/02/11 00:48:00 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/caddy-dns/acmedns github.com/caddyserver/caddy/v2@v2.6.3
#8 16.75 go: downloading github.com/caddy-dns/acmedns v0.2.0
#8 28.71 panic: internal error: can't find reason for requirement on github.com/google/pprof@v0.0.0-20210407192527-94a9f03dee38
#8 28.71
#8 28.71 goroutine 1 [running]:
#8 28.71 cmd/go/internal/modget.(*resolver).updateBuildList.func1({{0xc0005fad98?, 0xc000220c90?}, {0xc000138660?, 0xc00012b208?}})
#8 28.71 	/usr/local/go/src/cmd/go/internal/modget/get.go:1760 +0x114
#8 28.71 cmd/go/internal/modget.(*resolver).updateBuildList(0xc00056e800, {0xb2e7b0, 0xc000118000}, {0x0, 0x0, 0x0})
#8 28.71 	/usr/local/go/src/cmd/go/internal/modget/get.go:1765 +0x597
#8 28.71 cmd/go/internal/modget.(*resolver).resolveQueries(0xc00056e800, {0xb2e7b0, 0xc000118000}, {0xc0001115c0, 0x2, 0x472485?})
#8 28.71 	/usr/local/go/src/cmd/go/internal/modget/get.go:1243 +0x1e5
#8 28.71 cmd/go/internal/modget.runGet({0xb2e7b0, 0xc000118000}, 0xc000142420?, {0xc00012c160, 0x2, 0x2})
#8 28.71 	/usr/local/go/src/cmd/go/internal/modget/get.go:314 +0x40b
#8 28.71 main.invoke(0xe28fa0, {0xc00012c130, 0x5, 0x5})
#8 28.71 	/usr/local/go/src/cmd/go/main.go:225 +0x34e
#8 28.71 main.main()
#8 28.71 	/usr/local/go/src/cmd/go/main.go:179 +0x7d1
#8 28.72 2023/02/11 00:48:12 [FATAL] exit status 2
------
executor failed running [/bin/sh -c xcaddy build     --with github.com/caddy-dns/acmedns]: exit code: 1

while this one:

FROM caddy:2.6.2-builder AS builder

RUN xcaddy build \
    --with github.com/caddy-dns/acmedns

FROM caddy:2.6.2

COPY --from=builder /usr/bin/caddy /usr/bin/caddy

runs and builds without any problems. In other words, v2.6.2 and older works without a problem, v2.6.3 throws an error.

Just an update: I’ve found some details about the issue here:

with some temporary workarounds. So for now I’m good. This is my working (temporary) Dockerfile for now:

FROM caddy:builder AS builder

RUN xcaddy build \
    --with github.com/caddy-dns/acmedns \
    --with github.com/caddyserver/caddy/v2=github.com/caddyserver/caddy/v2@v2.6.3

FROM caddy:latest

COPY --from=builder /usr/bin/caddy /usr/bin/caddy
4 Likes

Congratulation, updating my server took less than a minute and nothing was needed to be changed! Continue the great development, thanks to all working on this!

2 Likes

That’s amazing :slight_smile: Thanks for the comment!

built using x-caddy with the deprecated lego dns plugin… the built binary is about 50% larger than previous… is that normal? 96,264kb

I’m not sure what you mean by “previous”, but yeah, the deprecated lego plugin is deprecated precisely because of that reason (and all the implications that go along with it).

previous 2.6.2 was around 60,000kb
I wouldn’t use lego deprecated if there was a Namecheap plugin

@DavidFW1960 , for what it’s worth, as a NameCheap customer myself, I went with acmedns plugin and I couldn’t be more happier with it.

1 Like

Interesting. I might see if I can set that up…

I run daily automated builds, so if you’d like to run some quick tests with caddy, acme-dns provider and NameCheap, please feel free to use my caddy-dns-acmedns.

I don’t know how long we’re going to experience this build issue, so I’ve updated @matt 's workaround in my Dockerfile to use CADDY_VERSION rather than the hardcoded version value:

FROM caddy:builder AS builder

RUN xcaddy build \
    --with github.com/caddy-dns/acmedns \
    --with github.com/caddyserver/caddy/v2=github.com/caddyserver/caddy/v2@${CADDY_VERSION}

FROM caddy:latest

COPY --from=builder /usr/bin/caddy /usr/bin/caddy

Just to make it a tiny bit more flexible :slight_smile:

2 Likes