diff --git a/docs/src/config/services/Systemd.md b/docs/src/config/services/Systemd.md index 2430357c..36bcbe7a 100644 --- a/docs/src/config/services/Systemd.md +++ b/docs/src/config/services/Systemd.md @@ -1,4 +1,6 @@ -# Running spotifyd as a service using systemd +# Running spotifyd as a systemd service + +## As as a user service A `systemd.service` unit file is provided to help run spotifyd as a service on systemd-based systems. The file `contrib/spotifyd.service` should be copied to either: @@ -9,9 +11,23 @@ A `systemd.service` unit file is provided to help run spotifyd as a service on s Packagers of systemd-based distributions are encouraged to include the file in the former location. End-user should prefer the latter. It should be noted that some targets are not available when running under the user directory, such as `network-online.target`. -Control of the daemon is handed over to systemd. The following example commands will run the service once and enable the service to always run on login in the future respectively: +Control of the daemon is handed over to systemd. The following command will start the service whenever the user logs in to the system. Logging out will stop the service. + +```bash +systemctl --user enable spotifyd.service --now +``` + +## As a system wide service + +A `systemd.service` unit file is provided to help run spotifyd as a service on systemd-based systems. The file `contrib/spotifyd.service` should be copied to: + +```bash +/etc/systemd/system/ +``` + +Control of the daemon is handed over to systemd. The following example commands will start the service and keep it running across reboots. ```bash -systemctl --user start spotifyd.service -systemctl --user enable spotifyd.service +systemctl daemon-reload +systemctl enable spotifyd.service --now ```