Installing Subsonic Music Streamer in Ubuntu Server 10.04 LTS Lucid Lynx

I’ve have finally started to move again some services in my LAN away from Windows onto Ubuntu servers. This time is Subsonic’s turn so I decided to write this guide to keep track of my own work and bring some content to unlockforus.com in the process. Ubuntu Server installation is out of the scope of this guide but honestly, even a caveman could get a Ubuntu server instance up and running in less than 5 minutes.

Installing Subsonic Media Streamer

Login into your ubuntu server box and let’s get it done.

subsonic Media

First, install Java:

sudo apt-get install openjdk-6-jre

subsonic Media

Next download subsonic-4.6.deb package

wget http://downloads.sourceforge.net/project/subsonic/subsonic/4.6/subsonic-4.6.deb

Install subsonic-4.6.deb package

sudo dpkg -i subsonic-4.6.deb

At this point your Subsonic server should be installed, up and running. You can confirm this by browsing to your Ubuntu box:

http://ubuntu-box-IP:4040 or http://hostname:4040 (Please note that Subsonic will run by default in port 4040).

All good, but by default Subsonic runs as root in my Ubuntu box and I don’t really like the idea even when this machine is behind my firewalled LAN. Hence I decided to give it a shot and attempted to run my Subsonic as a non-root user. What follows here is the outcome…

First, let’s check our subsonic process:

ps -Af | grep subsonic

As you saw in the previous screenshot subsonic is running as root. mehh… let’s take care of this small inconvenience now for some peace of mind.
Move yourself as root in your Ubuntu box:

su

and stop subsonic service:

service subsonic stop

Let’s now create the new user that we will use to run our Subsonic service. In my guide I’ll name it subsonic.

adduser --system --no-create-home subsonic

Add subsonic user to the audio group:

adduser subsonic audio

Awesome! Moving forward I now need to change some permissions to make sure my subsonic service will run without any problems…

chown -R subsonic:nogroup /tmp/subsonic
chown -R subsonic:nogroup /var/subsonic
chown -R root:root /var/subsonic/transcode
chown -R root:root /var/subsonic/jetty/*/webapp
chown subsonic /etc/default/subsonic
chmod 754 /etc/default/subsonic

With all this accomplished we will now edit our subsonic configuration to run it as the subsonic user in our next start:

vi /etc/default/subsonic

Change the line SUBSONIC_USER=root to SUBSONIC_USER=subsonic

Exit out the editor saving your changes… Press “ESC” (Escape) to get out of edit-mode and then:

:wq

Move yourself out of root if you wish at this point and start your Subsonic Media Streaming Server service:

su yoni
sudo service subsonic restart

… and verify that your subsonic service is now running as subsonic user:

ps -Af | grep subsonic

Login into your streaming server and start enjoying some music.

Note: I received a couple of e-mails where the transcoder will not work and the server will serve the original file instead. If you run into the same problem just recreate your lame link:

sudo mv /var/subsonic/transcode/lame /var/subsonic/transcode/lame_backup
sudo ln -s /usr/bin/lame /var/subsonic/transcode/lame

Have fun!

Related Post

Numlock in Linux Mint Let's see; you want Numlock to be on (enabled) when the system starts. After all, if your password has numbers it's annoying to find out you can't log...
Update Manager for Linux Lite 4.x Series Update Manager seems to be a welcome addition not just for my Linux Lite installs. A few hundred users do prefer the stripped down version I made avai...
Get the most out of low-end hardware in Linux Lite Linux Lite is a distro perfect for bringing some extra life to ancient hardware although that's not its sole purpose of existence. It has been put tog...

4 thoughts on “Installing Subsonic Music Streamer in Ubuntu Server 10.04 LTS Lucid Lynx

  1. didn’t want to use your guide without giving you props for your help. definitely got my server up and running flawlessly using Subsonic 4.7 and Ubuntu Server 12.04.1.

    Thanks.

    Awesome write up.

  2. Thanks so much for the write up!!! Saved me tons of headaches. Just set up my server and this was extremely NOOB friendly as everything worked flawlessly. I used 4.7 subsonic and 12.04 Ubuntu as well.

Leave a Reply