$ sudo caddy start
2020/12/26 15:23:03.768 INFO using adjacent Caddyfile
2020/12/26 15:23:03.777 INFO admin admin endpoint started {"address": "tcp/localhost:2019", "enforce_origin": false, "origins": ["127.0.0.1:2019", "localhost:2019", "[::1]:2019"]}
2020/12/26 15:23:03.779 INFO tls.cache.maintenance started background certificate maintenance {"cache": "0xc000353dc0"}
2020/12/26 15:23:03.818 INFO http server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS {"server_name": "srv0", "https_port": 443}
2020/12/26 15:23:03.818 INFO http enabling automatic HTTP->HTTPS redirects {"server_name": "srv0"}
2020/12/26 15:23:03.822 INFO http enabling automatic TLS certificate management {"domains": ["arkmap.axi92.at"]}
2020/12/26 15:23:03.906 INFO tls cleaned up storage units
2020/12/26 15:23:04.172 INFO autosaved config {"file": "/home/sunny/.config/caddy/autosave.json"}
2020/12/26 15:23:04.172 INFO serving initial configuration
Successfully started Caddy (pid=29752) - Caddy is running in the background
Ok I upgraded to v2.2.1 h1:Q62GWHMtztnvyRU+KPOpw6fNfeCD3SkwH7SfT1Tgt2c= that was the bundle that I got from Download Caddy hence I need the cloudflare plugin.
I have still the same problem with v2.2.1, caddy does not work because my site is offline.
sudo caddy stop never returns, the only workaround that I have is kill the process and restart it. But after some time it stops working.
Where are the caddy logs to find whats the problem?
v2.2.1 does not have the fix, v2.3 does (see my reply above, I recommend v2.3.0 – not 2.2.1). It’s been released now. What is happening is your CDN is DDoSing your server. This is an unusual and inconsiderate choice on Cloudflare’s part. Caddy now mitigates this by default by closing idle connections after some time.
With the new version and the change that my problem was that I started caddy only with sudo caddy start
But that was not working so well. It used the /lib/systemd/system/caddy.service for the systemctl.
I removed it and enabled it with the full path to my /etc/systemd/ caddy.service file (from here dist/caddy.service at master · caddyserver/dist · GitHub) with modified config path
Now it is working, also with the logs =)