Add a SystemD template service for owntone (issue #1353)

Create a SystemD template and document how to use it for multiple instances of owntone
This commit is contained in:
Derek Atkins
2021-11-25 16:11:59 -05:00
committed by GitHub
parent 28b2822d9d
commit 434fc4652c
5 changed files with 72 additions and 3 deletions

View File

@@ -52,6 +52,7 @@ please see the [INSTALL.md](INSTALL.md) file.
- [Spotify](#spotify)
- [LastFM](#lastfm)
- [MPD clients](#mpd-clients)
- [Running Multiple Instances](#running-multiple-instances)
- [References](#references)
@@ -569,6 +570,30 @@ The following table shows what is working for a selection of MPD clients:
| [mpc](http://www.musicpd.org/clients/mpc/) | CLI | Working commands: mpc, add, crop, current, del (ranges are not yet supported), play, next, prev (behaves like cdprev), pause, toggle, cdprev, seek, clear, outputs, enable, disable, playlist, ls, load, volume, repeat, random, single, search, find, list, update (initiates an init-rescan, the path argument is not supported) |
| [ympd](http://www.ympd.org/) | Web | Everything except "add stream" should work |
## Running Multiple Instances
To run multiple instances of owntone on a server, you should copy
`/etc/owntone.conf` to `/etc/owntone-zone.conf` (for each `zone`) and
modify the following to be unique across all instances:
* the three port settings (`general` -> `websocket_port`,
`library` -> `port`, and `mpd` -> `port`)
* the database paths (`general` -> `db_path`, `db_backup_path`, and `db_cache_path`)
* the service name (`library` -> `name`).
* you probably also want to disable local output (set `audio` -> `type =
"disabled"`).
Then run `owntone -c /etc/owntone-zone.conf` to run owntone with the new
zone configuration.
Owntone has a `systemd` template which lets you run this automatically
on systems that use systemd. You can start or enable the service for
a `zone` by `sudo systemctl start owntone@zone` and check that it is
running with `sudo systemctl status owntone@zone`. Use `sudo
systemctl enable ownton@zone` to get the service to start on reboot.
## References