Skip to content

Compare: Running as a service

New page
Showing with 5 additions and 11 deletions.
  1. +4 −10 Running-as-a-service.md
  2. +1 −1 _Sidebar.md
14 changes: 4 additions & 10 deletions Running-as-a-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Many distributions use systemd to manage both system services an user services.

## Running as a system-wide service

`contrib/systemd.service` should be installed into `/usr/lib/systemd/system/`.
`contrib/systemd.service` can be used an example to write your own service unit file or can be installed as-is into `/usr/lib/systemd/system/`.
This'll allow running librespot as a system-wide service permanently by
enabling it:

Expand All @@ -14,24 +14,18 @@ enabling it:
This is the recommended approach for embedded devices. Note that only `root`
can manage this service.

It is recommended that downstream packagers include this file in distribution
packages.

## Running as a user service

_Note: This is pending merging of https://github.com/librespot-org/librespot/pull/800_

`contrib/systemd.user.service` should be installed into `/usr/lib/systemd/user/`.
`contrib/systemd.user.service` can be used an example to write your own service unit file or can be installed as-is into `/usr/lib/systemd/user/`.
This'll allow running librespot as a user service which can be controlled
without privileges, and is bound to the currently logged in user.

systemctl --user enable --now librespot

This is the recommended approach for desktops and especially for shared devices
where not all users will have root privileges.

It is recommended that downstream packagers include this file in distribution
packages.
This is the recommended approach for desktops, especially for shared devices
where not all users will have root privileges and to avoid compatibility issues with PulseAudio.

# Using supervisord

Expand Down