Install Caddy2 on Ubuntu 18.04

I’m stuck. On Install Step 2. caddy version results in -bash: /usr/local/bin/caddy: Permission denied. The directory is in my $PATH and the result is the same when caddy is placed in /usr/bin. Pretty sure I’m missing a step between downloading caddy2_beta20_linux_amd64 and Step 2 but I’m not sure where to look / what to look for. Any guidance is much appreciated!

What I’ve done: Guessed. Downloaded caddy2_beta20, renamed it to caddy, placed it in my $PATH. Searched for answers / clues. Turned to you.

Another question: I got Caddy2 running with Docker but am unclear about how one would use the Caddy API with a containerized Caddy. Being able to use the Caddy API is the reason for the first question and my attempt to use Caddy “uncontainered.”

Thanks again

You may have forgotten to give it executable permissions. Run chmod +x <your-Caddy-binary>


could have sworn I found that instruction elsewhere on here and tried it… but this time it worked. Thanks for that voodoo!

Update: It’s alive. Caddyfile:

localhost {
respond "It's Alive"


1 Like

With a colon after the directive? That’s odd, that shouldnt work…

I believe you. It wasn’t in my Caddyfile and I’ve edited my edit. thanks and thanks for Caddy!

1 Like

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