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
}
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
I just updated your initial discussion here:
https://www.digitalocean.com/community/questions/web-app-not-working-with-caddy?comment=204785
As per the discussion on the Caddy forum, the suggestion was that this could happen if caddy was started with caddy start once and then with systemctl start caddy a second time.
The suggested solution was to find any Caddy running processes with:
ps aux | grep caddy
And kill them with kill THE_PID, and after that start Caddy with systemctl start caddy again.
Let me know how this goes!
- Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.