diff --git a/src/docs/markdown/install.md b/src/docs/markdown/install.md index f926e9b..2ccee56 100644 --- a/src/docs/markdown/install.md +++ b/src/docs/markdown/install.md @@ -61,7 +61,7 @@ Testing releases (includes betas and release candidates): [**View the Cloudsmith repos**](https://cloudsmith.io/~caddy/repos/) -If you wish to use the packaged support files (systemd services, bash completion and default configuration) with a custom Caddy build, instructions can be [found here](https://caddyserver.com/docs/build#package-support-files-for-custom-builds-for-debian-ubuntu-raspbian). +If you wish to use the packaged support files (systemd services, bash completion and default configuration) with a custom Caddy build, instructions can be [found here](https://caddyserver.com/docs/build#package-support-files-for-custom-builds-for-debianubunturaspbian). ## Fedora, RedHat, CentOS diff --git a/src/docs/markdown/service.md b/src/docs/markdown/service.md index 1f72073..35c6e77 100644 --- a/src/docs/markdown/service.md +++ b/src/docs/markdown/service.md @@ -23,10 +23,9 @@ We provide two different systemd unit files that you can choose between, dependi They are very similar, but differ in the `ExecStart` and `ExecReload` commands to accommodate the workflows. -If you need to switch between the services, you should disable the previous one before enabling the other. For example, to switch from the `caddy` service to the `caddy-api` service: -
sudo systemctl disable caddy
-sudo systemctl enable caddy-api
-sudo systemctl start caddy-api
+If you need to switch between the services, you should disable and stop the previous one before enabling and starting the other. For example, to switch from the `caddy` service to the `caddy-api` service: +
sudo systemctl disable --now caddy
+sudo systemctl enable --now caddy-api
## Using the Service @@ -88,8 +87,7 @@ The usual place to save the service file is: `/etc/systemd/system/caddy.service` After saving your service file, you can start the service for the first time with the usual systemctl dance:
sudo systemctl daemon-reload
-sudo systemctl enable caddy
-sudo systemctl start caddy
+sudo systemctl enable --now caddy Verify that it is running:
systemctl status caddy
@@ -113,7 +111,9 @@ Environment="CF_API_TOKEN=super-secret-cloudflare-tokenvalue" Or, for example if you need to change the config file from the default of the Caddyfile, to instead using a JSON file: ```systemd [Service] +ExecStart= ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/caddy.json +ExecReload= ExecReload=/usr/bin/caddy reload --config /etc/caddy/caddy.json ```