Latest version of Caddy here. What I am trying to do is not do the following every time I update the Caddyfile in /etc/caddy:
So like an option to change the Caddyfile and then do caddy reload without having to delete files or kill a process. The idea is for me to add a new domain or update an existing domain and then the reload or whatever command can refresh the current running process.
You just need to run
caddy reload --config /etc/caddy/Caddyfile
How did you install Caddy?
Please fill out the help topic template, I can’t really say much more without proper context, which answers to the help topic template would clarify.
Sorry, I installed it via the PPA in Ubuntu. This way:
Then you should use
sudo systemctl caddy reload if you’re running Caddy as a service (which the PPA automatically sets up)
And that would reload the Caddyserver file with the new changes? Also how would that differ just so I can understand from the reload option? Would the systemctl know where the Caddyfile is in the /etc/caddy folder?
It’s defined in the service file:
This file has been truncated.
# For using Caddy with a config file.
# Make sure the ExecStart and ExecReload commands are correct
# for your installation.
# See https://caddyserver.com/docs/install for instructions.
# WARNING: This service does not use the --resume flag, so if you
# use the API to make changes, they will be overwritten by the
# Caddyfile next time the service is restarted. If you intend to
# use Caddy's API to configure it, add the --resume flag to the
# `caddy run` command or use the caddy-api.service file instead.
This topic was automatically closed after 30 days. New replies are no longer allowed.