Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Supysonic All‑in‑One systemd Unit (Ubuntu 24.04.2 LTS)

Minimal, batteries‑included unit that starts both supysonic-daemon and supysonic-server together, manages a runtime socket under /run, and cleans the socket on stop/shutdown. Designed and tested for Ubuntu 24.04.2 LTS.

What this repository contains

  • supysonic@.service — a template systemd unit. Run as any user via instance name (defaults below to supysonic).
  • .supysonic — a minimal ~supysonic/.supysonic configuration. (If you instead keep configs in ~/.config/supysonic, that also works; this unit does not force a location.)

Note: Ensure your daemon/server configs agree on the same socket path. The unit expects /run/supysonic-<user>/socket. Set this in your Supysonic config (daemon section).

Install

# 1) Copy the unit into place
sudo install -m 0644 supysonic@.service /etc/systemd/system/supysonic@.service

# 2) (Optional) Place your minimal config under the actual user's home
#    If your config lives at ~supysonic/.supysonic, create it there now.
#    Example (you will supply real files):
# sudo -u supysonic install -d -m 0755 ~supysonic/.supysonic

# 3) Reload systemd and enable the unit for user 'supysonic'
sudo systemctl daemon-reload
sudo systemctl enable --now supysonic@supysonic.service

# 4) Verify
systemctl status --no-pager supysonic@supysonic.service
journalctl -u supysonic@supysonic.service -n 100 --no-pager

How it works

  • Runs both processes in one unit; if either exits, the other is terminated and the unit stops.
  • Socket path is under /run/supysonic-<user>/socket via RuntimeDirectory. Stale sockets are removed on start and stop.
  • User/group, home, and runtime dir are derived from the instance: supysonic@<user>.service.

Common tweaks

  • Run as another user (e.g., media):
    sudo systemctl enable --now supysonic@media.service
  • If you prefer TCP for the web server, keep your existing host/port in Supysonic’s server config; the unit doesn’t override those.
  • If your media library sits outside the user’s home, you may relax hardening by setting ProtectSystem=read-only or false as needed.

Uninstall / revert

sudo systemctl disable --now supysonic@supysonic.service
sudo rm -f /etc/systemd/system/supysonic@.service
sudo systemctl daemon-reload

Why this exists

The stock supysonic-daemon.service only runs the daemon and can leave a stale Unix socket after crashes. This unit consolidates lifecycle control (daemon + server), relocates the socket to /run for automatic cleanup on restart/reboot, and provides a user‑parameterized instance for clean multi‑user setups on Ubuntu 24.04.2 LTS.

About

Ubuntu 24.04.2 LTS: all-in-one systemd unit for Supysonic (daemon+server) with runtime socket & cleanup

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors