Coder.comC
Coder.com2y ago
7 replies
farah

cannot get caddy server to run as a service

caddy will not run by default. and when done manually i don’t get an error and seems to still not work.

$systemctl status caddy
× caddy.service - Caddy
Loaded: loaded (/usr/lib/systemd/system/caddy.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Tue 2024-05-07 01:40:13 UTC; 9s ago
Docs: https://caddyserver.com/docs/
Process: 3413 ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile (code=exited, status=1/FAILURE)
Main PID: 3413 (code=exited, status=1/FAILURE)
Status: "loading new config: loading http app module: provision http: getting tls app: loading tls app module: provision tls: provis>
CPU: 40ms


$caddy run
2024/05/07 01:42:02.224 INFO admin admin endpoint started {"address": "localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//127.0.0.1:2019"]}
2024/05/07 01:42:02.224 INFO serving initial configuration
Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go
Welcome - Caddy Documentation
Solution
Hi. Regarding the issues you are getting with running Coder and now caddy as system services.
I advice you to run coder using this method
https://github.com/coder/coder/tree/main/examples/web-server/caddy#with-docker-compose
GitHub
Provision remote development environments via Terraform - coder/coder
coder/examples/web-server/caddy at main · coder/coder
Was this page helpful?