Update

The below post explains how to install squeezebox server in jail in FreeNAS 8.3.0.

Squeezebox server is much easier to install and run on Ubuntu; as such this is what I now do and would recommend.

e.g. on Ubuntu 14.04

wget http://downloads.slimdevices.com/nightly/7.8/sc/a4244c4/logitechmediaserver_7.8.1~1428327708_all.deb
sudo dpkg -i ./logitechmediaserver_7.8.1~1428327708_all.deb
sudo shutdown -r now

Nightly builds for various OS are available at http://downloads.slimdevices.com/nightly/?ver=7.8

Even if you are looking to install it on FreeNAS, it would be worth checking that a PBI is not available in the first instance.


That said, to install squeezebox server in jail in FreeNAS 8.3.0:

1) Go into jail and put ports into it

Firstly we enter our jail and download the ports tree.

[root@freenas ~]# jls
[root@freenas ~]#$ jexec 1 tcsh
software# portsnap fetch extract
software# portsnap update
software# cd /usr/ports/audio/squeezeboxserver

2) Run the commands in the gist below. I have no idea if some of these are unncesserary. If you know what you’re doing take a look at the official FreeBSD instructions for squeezebox here. The below is what worked for me. Note this takes a lot of time! I suggest finding something to watch/listen to in between the ports config state prompting you for user input.

3) After the above you should hopefully be installed: check out http://freenas:9000/ where freenas is the IP address of your FreeNAS server. Note that by default the slimserver is open – with no password (hit Server Settings -> Security in the web interface to change). Note the uid and gid so mountpoints can be set with the correct permissions later (both 104 in my installation).

4) Set up the mountpoint so the jail can access your music

Use jls to see what your jail ID is (I assume 1 here)

[root@freenas ~]# jls
[root@freenas ~]# jexec 1 tcsh
software# mkdir /usr/music
[root@freenas ~]# exit

By making the folder from within the jails, the mountpoint gets the correct permissions.

5) Add the mountpoint from within the web user interface: Services -> Plugins -> Management -> Mount points -> Add mount point

Source is where you want to pull the data (e.g. your main storage pool), in my case /mnt/silver/mike/music

Destination is the mount point in the jail, in this case /usr/music

6) Go bask into the jail and set the permissions

[root@freenas ~]# jls
[root@freenas ~]#$ jexec 1 tcsh
software# chown 104:104 /usr/music
software# chmod 775 /usr/music

7) In the squeezebox server web interface, point it to /usr/music as your music folder when it asks you.

All done!