How To Install Subsonic on FreeNas 8.3.1 release

Tutorials, tips and tricks.

Moderator: moderators

How To Install Subsonic on FreeNas 8.3.1 release

Postby ForSSUx » Tue Apr 02, 2013 8:27 pm

Hi There,

I'm working as a sound engineer in the Belgian army...We have our own communications department.
At the video department we have 5 Avid stations that uses "Library Music" to enhance the viewing experience.

Our "Library Music" publisher mostly visit us once a year to upgrade ( add ) music.
We have several of these fine publisher one Universal is another.
They tend to do of course things a little different.
Anyway enough with the chit chat.

Tech Spec
Old Avid Unity chassis HP 8200xw Motherboard with 8GB ram and 16 disk each 160 GB running a zfs pool
I opted for FreeNas 8.3.1 release. We have over 500k of songs

I have installed subsonic on it from here ... nic-Plugin from Joshua Parker thanks for this.
And learned a lot from here ... tructions/
After running this I quickly learned that although a great program, I needed tag search and here begins the MusicCabinet story

1) Requierments:
a) a jail setup as described here:

b) DNS check like the one from google
In the main one can do it via the webpage "Horizontal Network tab and in Global Configuration choose nameserver 1 and fill and/or nameserver 2

c) a mount point for your media

2) Remove or make the jail
a) create two datasets in your ZFS pool

b) upload the FreeNAS-8.3.1-RELEASE-x64.Plugins_Jail.pbi

c) make sure the plugin service is active

now to be on the safe side ...the web page doesn't always tells the truth.
Go to the shell and type

[root@freenas ~]#
Code: Select all

JID IP Address Hostname Path
1 - software /mnt/DGCOM-Music/jail/software
voila the jail is running and has a JID of 1

d) make sure you can search the jail
[root@freenas ~]#
Code: Select all
jexec 1 /bin/tcsh

Code: Select all

3) Installing subsonic in the jail.
a) open the jail

[root@freenas ~]#
Code: Select all

JID IP Address Hostname Path
1 - software /mnt/DGCOM-Music/jail/software

okay open the jail with:
[root@freenas ~]#
Code: Select all
jexec 1 /bin/tcsh


The software# is the name of my jail and may be different for you

b) install dependencies in the jail

I'm not sure about these steps you can try to skip them..

Code: Select all
pkg_add -v -r xtrans

Code: Select all
pkg_add -v -r xproto

Code: Select all
pkg_add -v -r xextproto

Code: Select all
pkg_add -v -r javavmwrapper

Code: Select all
pkg_add -r -v

Code: Select all
pkg_add -v -r flac

Code: Select all
pkg_add -v -r ffmpeg

Difficult to get the packages?
software# pkg_add -rn openjdk7
Fetching Done.
Package dependency xextproto-7.1.1 for not found!

ping result not okay?
ping result not okay ?
if above doesn't work you'll never find the packages..

I had this at my work we have a public part ipadress are in the this range has ftp
The working server when running needs to be at this range has no ftp
So I needed to switch between them and forgot to change the Ipadress of the jail ..
Of course the packages weren't found

exit the jail...
Code: Select all

do you have a nameserver in your /etc/reolv.conf?
Code: Select all
vi /etc/resolv.conf

some keys for vi "esc" "i" "d" "r" i=insert r=replace d=delete alter between them with the esc key
to save "esc" ":wq!" :wq! is entered at the prompt
to quit without saving ":q!"
so change your /etc/resolv.conf and add nameserver or at the prompt you can:
echo nameserver > /etc/resolv.conf the > pipes the output to a file instead of standard to the screen..

You can also use the gui tab network fill nameserver 1 and IPv4 default gateway !!!

You can also copy the files onto the nas with al its dependencies aargh ..look at the -r
The -r let it go to a standard location if you know another place

Code: Select all

Code: Select all
pkg_add -v -r xproto-7.0.22.tbz

or if you downloaded with fillezilla at home place it somwhere in your jail and do
Code: Select all
pkg_add -v /media/ xproto-7.0.22.tbz
notice that the -r is not used

c) installing actual subsonic software

download the stand allone version here and move it to your share, mine is /mnt/DGCOM-Music
software# mkdir /var/subsonic
software# mkdir /var/subsonic/standalone
software# cd /var/subsonic/standalone
software# tar xvzf /mnt/DGCOM-Music/subsonic-x.x-standalone.tar.gz

some of us will have to do a: chmod 777 *.*

d) adapt some variables here and there

software# vi /etc/hosts
change this line localhost
to localhost software

software# vi /var/subsonic/standalone/

SUBSONIC_HOST= #my jail has ip yours?

where is it:

cd /var/subsonic/standalone
#if [ -L $0 ] && ([ -e /bin/readlink ] || [ -e /usr/bin/readlink ]); then
#cd $(dirname $(readlink $0))

for the java

If you'll get a error in the subsonic.sh_log ( software# cd /var/subsonic ) about java then
software# vi /var/subsonic/standalone/

if [ -e "${JAVA_HOME}" ]

software# pkg_add -v -r openjdk7 (this takes some time)

4) test your subsonic

[root@freenas ~]# jexec 1 /bin/tcsh
software# cd /var/subsonic/standalone
software# ./
Started Subsonic [PID 5613, /var/subsonic/subsonic_sh.log]

write down the pid number 5613

software# kill pidnumber of subsonic you'll wrote down otherwise reboot

exit jail

software# exit

5) startup modifications

echo postgresql_enable="YES" > /etc/rc.conf
subsonic startup script somebody?

6) transcoding

I didn't need this so this is a 1/1 copy of ... tructions/

mkdir /var/subsonic/transcode
cp /usr/local/bin/lame /var/subsonic/transcode/
cp /usr/local/bin/flac /var/subsonic/transcode/
cp /usr/local/bin/ffmpeg /var/subsonic/transcode/

Configure your transcoder settings. In the Subsonic web interface go to “Settings > Transcoding”.

In this example, I’ve set up FLAC to transcode to WAV, then to MP3. On the line reads “flac > mp3″ modify the following:

Step 1 = flac -c -s -d %s
Step 2 = lame -b 192 – -

Kind Regards and thanks for reading
Guy Forssman
Posts: 24
Joined: Thu Mar 21, 2013 7:12 pm

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 3 guests