I have an initial caddy.json config file that I have edited manually to insert an @id. I start caddy with caddy run --config=/etc/caddy/caddy.json
. This works fine, I am able to use the @id token.
When I restart my caddy, I lose all of the modifications to the config via the api. So after reading the docs, I need to use the caddy-api.service file so that it will persist the changes I make to disk, so that on a restart we don’t lose the changes.
However, it won’t allow me to load the initial caddy.json file. I changed the .service file to this. ExecStart=/usr/bin/caddy run --environ --resume --config=/etc/caddy/caddy.json
I am not sure how to make this work. Any suggestions would be very appreciated.