I think I installed via Debian package manager, but running apt update/upgrade didn’t move Caddy to version 2.5
Likely the Debian Bullseye (11) repos haven’t caught up.
How does Caddy Upgrade work?
If you run sudo caddy upgrade, Caddy will fetch a new binary from Download Caddy and replace itself in-place (then you need to restart Caddy yourself because the running instance will still be the old version otherwise).
Doing that would desync your apt package though, so it’s best to use apt upgrade if you installed that way.
If you need a build of Caddy with plugins though, then after following these instructions for moving your binary, using sudo caddy upgrade is probably the easiest option from then on, because at that point you’re managing your own Caddy binary instead of using the one shipped in the apt repo.
Not sure why. Hard to say. Glad you figured it out though