Headphones is an automated music downloader and manager. It uses MusicBrainz service to query for music metadata which can unfortunately be unreliable at times. It is comparable to CouchPotato or Sonarr but for music. For improved security it is installed under it’s own user and group. Backing up settings and the library is very simple and only requires a database and configuration files to be saved.
Create a system account and group.
sudo useradd -r -s /bin/false headphones
Optionally add the user to secondary groups.
sudo usermod -a -G nzbget,utorrent headphones
Update the package list.
sudo apt-get update
Install the required dependencies.
sudo apt-get install git-core python
Change the current directory to the final installation directory.
Clone the latest release of Headphones from the official git repository.
git clone https://github.com/rembo10/headphones.git
Set user and group ownership on the installation directory.
sudo chown -R headphones:media /opt/headphones
Set permissions on the installation directory.
sudo chmod -R 755 /opt/headphones
Create Music Download Directory
Create download destination directory.
sudo mkdir /mnt/downloads/music
Set the ownership of the download directory.
sudo chown -R headphones:headphones /mnt/downloads/music
Set the permissions of the download directory.
sudo chmod -R 770 /mnt/downloads/music
Create Music Storage Directory
Create a destination directory for music.
sudo mkdir /mnt/virtual/music
Set the ownership of the music directory.
sudo chown -R headphones:headphones /mnt/virtual/music
Set the permissions of the music directory.
sudo chmod -R 770 /mnt/virtual/music
Create Upstart Script
Create a new upstart configuration file.
Copy the script below and save the configuration file.
description "Headphones upstart script" author "DominicM @ dominicm.com" # What user to run as setuid headphones # What group to run as setgid media # When to start the service start on runlevel  # When to stop the service stop on runlevel  # Automatically restart process if crashed respawn # Start the process script exec python /opt/headphones/Headphones.py end script
Run Headphones manually.
Run Headphones with upstart.
Access the web interface on 192.168.0.100:8181 and configure it from the settings page.
192.168.0.100 to the actual IP address if different. Leave the default port as
8181 unless it has been changed during configuration.