How to override protecthome on caddy

Hello,

I currently have a complete dev stack setup made with docker, and I want to learn how to do the same in the nix way step by step.

First step : I want to use caddy as a local webserver, but my vhosts directories are located under my home directory.
Caddy package has a default systemd protectHome configuration set to “true” and therefore serving files located under my home directory ends up with a 403 forbidden error.

Question : how can I override this protectHome configuration ?

Thx

Hello,

systemd.services.caddy.serviceConfig.ProtectHome = lib.mkForce false; should work.

2 Likes

Thx nurelin, it works !

1 Like