Error with xcaddy on 2.8.4


When trying to build a custom caddy 2.8.4 (for the cloudflare plugin) I get an error.

FROM caddy:2.8.4-builder AS builder

RUN xcaddy build \

FROM caddy:2.8.4

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


Step 1/4 : FROM caddy:2.8.4-builder AS builder

 ---> 45d732f429c5

Step 2/4 : RUN xcaddy build     --with

 ---> Running in cae1b530a203

fatal error: nanotime returning zero

goroutine 1 gp=0xc02128 m=0 mp=0x3662b8 [running, locked to thread]:


({0x1f95fd, 0x17})
	runtime/panic.go:1023 +0x4c fp=0xc2c7a8 sp=0xc2c794 pc=0x51ecc
	runtime/proc.go:192 +0x4a4 fp=0xc2c7ec

 sp=0xc2c7a8 pc=0x550f0

	runtime/asm_arm.s:859 +0x4 fp=0xc2c7ec sp=0xc2c7ec pc=0x8ba6c

The command '/bin/sh -c xcaddy build     --with' returned a non-zero code: 2

I’m trying to build it by using a Raspberry Pi 5 which runs Ubuntu 24.04 LTS and Docker 26.1.3

I don’t have any problem with the 2.8.1

Thank you in advance for your help.

So uhh that’s really weird. There’s gotta be something going on. I’m pretty sure it’s not a bug in xcaddy, but I’ve never seen this before so I dunno what to tell you. Googling that error message only yields a couple results in English for me:

The first link above looks closer / more relevant. But I don’t really know how to help beyond this. You say it works with 2.8.1, all else being the same? Everything?


Hello, indeed everything the same, just changing 2.8.4 by 2.8.1 so that’s very strange

And it’s also not just with the cloudflare plugin, I also have the issue when trying to build caddy with another plugin.

I wonder if your issue and the one linked below are related. Can you try the listed solution and check again?


Hello, thanks for your reply. Indeed, after having redownloaded the 2.8.4-builder image it solved the problem.