OwnTone

From ArchWiki

OwnTone is a free and open-source DAAP (iTunes) and MPD media server with support for AirPlay 1 and 2 speakers (multiroom), Apple Remote (and compatibles), Chromecast, Spotify and internet radio.

OwnTone sends stream to multiple devices, but there are no multiple streams, because there are no multiple users or sessions.

Installation

Install owntone-serverAUR.

Start/enable the owntone.service systemd unit.

Configuration

See the official documentation for detailed configuration options.

The configuration file is /etc/owntone.conf.

Running as the owntone user

The default user in owntone.conf is owntone. However, this user is not set in the service file. Edit owntone.service and set the user:

/etc/systemd/system/owntone.service.d/override.conf
[Service]
User = owntone

If the service was started without the above changes, the user directory will be owned by root. Change the owner of the directory if needed with:

# chown owntone:owntone /var/lib/owntone

Once this is fixed, pipewire will be able to create its configuration files.

Example Firewall Configuration

Create application profile

/etc/ufw/applications.d/owntone
[owntone]
title=owntone
description=owntone media server
ports=3688,3689,6600/tcp

Implied Environment for the following instructions:

  • IPv4 LAN is 10.0.1.0/24 (change to match yours)
  • IPv6 LAN is fd04:1bb:ab65:4c80::/64 (change to match yours)
  • Apple Home Security is set to "Anyone On the Same Network"

Apply the following instructions with changes to match your environment.

ufw allow from 10.0.1.0/24 to any app owntone comment 'owntone IPv4'
ufw allow from fd04:1bb:ab65:4c80::/64 to any app owntone comment 'owntone IPv6'

Listening UDP ports are dynamic, so allow LAN UDP traffic on all ports:

ufw allow from 10.0.1.0/24 to any proto udp comment 'multicast IPv4'
ufw allow from fd04:1bb:ab65:4c80::/64 to any proto udp comment 'multicast IPv6'

Bonjour application profile might need to be added. The following may need to be added:

ufw allow from 10.0.1.0/24 to 224.0.0.251 comment 'mDNS multicasts'