Print version on startup

Hi,

Did Caddy used to print version to log on startup?

I thought I used to see it there, but now it doesn’t. Not easy to find out which version am I running just by looking at logs.

Thanks

If you run Caddy with caddy run --environ it will print the environment when it starts, as if you ran caddy environ separately.

In addition to printing the literal environment, it prints the build environment like version, OS, arch, etc. The beginning has a line starting with caddy.Version= you are looking for.

It’s been like this for a long time (since around the beginning of Caddy 2).

thanks!
that worked. Since I’m building my own image, I added this to Dockerfile, and now I get it in logs.

CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile", "--environ"]

Cool. FYI, you can omit --adapter caddyfile because that’s the default for config files named or starting with Caddyfile.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.