Open ahoiroman opened 3 days ago
As mentioned on the forum, this is due to how systemd works. Users are generally expected to know better how their system is setup and which directories should the service be allowed to access. It's not related to the file's absence/presence or the file permissions. The only thing we can do in terms of documentation is to mention that users should be mindful of their system setup and perhaps need to adjust their init system, but we cannot assume all users use systemd-led Linux distro. Other *nix systems might not have the same restrictions enforced by systemd.
My issue was in fact pointing in that direction: Adding more context to the docs.
I think I am working that out and, if it's something you'd welcome, I'll create a PR for the docs.
PRs are always welcome and appreciated! Documentation written from user's perspective may be clearer than ones written by the developers and maintainers.
The docs at https://caddyserver.com/docs/caddyfile/options#admin describe how to use a unix socket in order to make the api listen to the unix socket.
Following this leads to a service failure on restart:
This happens, if caddy is installed via package manager and running as user caddy.
But even if I create that socket using:
Leads to the very same error: