Bad install on Debian

1. My Caddy version (v1.0.4):

2. How I run Caddy:

Can’t even get that far! :slight_smile:

a. System environment:

Debian GNU/Linux 10 (buster) / Linux 4.19.0-6-amd64

b. Command:

caddy version

c. Service/unit/compose file:

# This service file requires the following:
#
# 1) Group named caddy:
#      $ groupadd --system caddy
#
# 2) User named caddy, with a writeable home folder:
#      $ useradd --system \
#           --gid caddy \
#           --create-home \
#           --home-dir /var/lib/caddy \
#           --shell /usr/sbin/nologin \
#           --comment "Caddy web server" \
#           caddy
#
# 3) Caddyfile at /etc/caddy/Caddyfile that is
#    readable by the caddy user
#

[Unit]
Description=Caddy Web Server
Documentation=https://caddyserver.com/docs/
After=network.target

[Service]
User=caddy
Group=caddy
ExecStart=/usr/bin/caddy run --config /etc/caddy/Caddyfile --adapter caddyfile --resume --environ
ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile --adapter caddyfile
TimeoutStopSec=5s
LimitNOFILE=1048576
LimitNPROC=512
PrivateTmp=true
ProtectSystem=full
AmbientCapabilities=CAP_NET_BIND_SERVICE

[Install]
WantedBy=multi-user.target

d. My complete Caddyfile:

:2015

respond "Hello, world!"

3. The problem I’m having:

This is embarrassing I seem to have stuffed up my installation somehow and can’t get past step 2! I unpacked my download, then moved the caddy binary to /usr/bin. Simple! But when I type
caddy version
I get the following error. Sudo made no difference. I am very new to Linux, but what on earth have a I done wrong?

4. Error messages and/or full log output:

**2020/01/24 13:49:56 args:2 - Error during parsing: Unknown directive 'version'**

5. What I already tried:

Sudo. Reinstalled the binary.

6. Links to relevant resources:

This is my guide…

Hope somebody can whack me into the right direction. Thanks and sorry for such a major fail.

As noted on the header at the top of the page Install — Caddy Documentation, that’s the documentation for Caddy v2 which is still in beta.

You’re looking for https://caddyserver.com/v1/docs/cli instead.

The correct command in v1 to get the version is caddy -version

1 Like

WOW, I’m a goose. Thanks so much.

2 Likes

Hahahaha HONK

Glad I could help

1 Like

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