Report this

What is the reason for this report?

Caddy Service not starting

Posted on June 2, 2024

I installed Caddy following the official instructions and when I’m doing sudo systemctl start caddy I’m getting:

× caddy.service - Caddy
     Loaded: loaded (/lib/systemd/system/caddy.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sun 2024-06-02 13:20:21 CEST; 1min 18s ago
       Docs: https://caddyserver.com/docs/
    Process: 706 ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile (code=exited, status=1/FAILURE)
   Main PID: 706 (code=exited, status=1/FAILURE)
        CPU: 185ms

Jun 02 13:20:21 remoti-prod caddy[706]: LOGNAME=caddy
Jun 02 13:20:21 remoti-prod caddy[706]: USER=caddy
Jun 02 13:20:21 remoti-prod caddy[706]: INVOCATION_ID=c17f9e6ef1c44f43aee1e9697ebf1b31
Jun 02 13:20:21 remoti-prod caddy[706]: JOURNAL_STREAM=8:21709
Jun 02 13:20:21 remoti-prod caddy[706]: SYSTEMD_EXEC_PID=706
Jun 02 13:20:21 remoti-prod caddy[706]: {"level":"info","ts":1717327221.9778447,"msg":"using config from file","file":"/etc/caddy/Caddyfile"}
Jun 02 13:20:21 remoti-prod caddy[706]: Error: ambiguous config file format; please specify adapter (use --adapter)
Jun 02 13:20:21 remoti-prod systemd[1]: caddy.service: Main process exited, code=exited, status=1/FAILURE
Jun 02 13:20:21 remoti-prod systemd[1]: caddy.service: Failed with result 'exit-code'.
Jun 02 13:20:21 remoti-prod systemd[1]: Failed to start Caddy.

The contents of my /etc/caddy/Caddyfile I’ve trimmed to be as small as possible:

:80 {
        reverse_proxy localhost:4000
}

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.