OwnTone and Pulseaudio¶
You have the choice of running Pulseaudio either in system mode or user mode. For headless servers, i.e. systems without desktop users, system mode is recommended.
If there is a desktop user logged in most of the time, a setup with network access via localhost only for daemons is a more appropriate solution, since the normal user administration (with, e.g.,
pulseaudio -k) works as advertised. Also, the user specific configuration for pulseaudio is preserved across sessions as expected.
System Mode with Bluetooth support¶
Credit: Rob Pope
This guide was written based on headless Debian Jessie platforms. Most of the instructions will require that you are root.
Step 1: Setting up Pulseaudio¶
If you see a "Connection refused" error when starting the server, then you will probably need to setup Pulseaudio to run in system mode . This means that the Pulseaudio daemon will be started during boot and be available to all users.
How to start Pulseaudio depends on your distribution, but in many cases you will need to add a pulseaudio.service file to /etc/systemd/system with the following content:
If you want Bluetooth support, you must also configure Pulseaudio to load the Bluetooth module. First install it (Debian:
apt install pulseaudio-module-bluetooth) and then add the following to /etc/pulse/system.pa:
Now you need to make sure that Pulseaudio can communicate with the Bluetooth daemon through D-Bus. On Raspbian this is already enabled, and you can skip this step. Otherwise do one of the following:
- Add the pulse user to the bluetooth group:
adduser pulse bluetooth
- Edit /etc/dbus-1/system.d/bluetooth.conf and change the policy for
<policy context="default"\>to "allow"
Phew, almost done with Pulseaudio! Now you should:
- enable system mode on boot with
systemctl enable pulseaudio
- reboot (or at least restart dbus and pulseaudio)
- check that the Bluetooth module is loaded with
pactl list modules short
Step 2: Setting up the server¶
Add the user the server is running as (typically "owntone") to the "pulse-access" group:
Now (re)start the server.
Step 3: Adding a Bluetooth device¶
To connect with the device, run
bluetoothctl and then:
Now the speaker should appear. You can also verify that Pulseaudio has detected the speaker with
pactl list sinks short.
User Mode with Network Access¶
Credit: wolfmanx and this blog
Step 1: Copy system pulseaudio configuration to the users home directory¶
Step 2: Enable TCP access from localhost only¶
Edit the file
~/.pulse/default.pa , adding the following line at the end:
Step 3: Restart the pulseaudio deamon¶
Step 4: Adjust configuration file¶
audio section of
 Note that Pulseaudio will warn against system mode. However, in this use case it is actually the solution recommended by the Pulseaudio folks themselves.