Page 1 of 5

How to install Subsonic on FreeNAS

PostPosted: Tue Jan 13, 2009 5:49 pm
by sindre_mehus
This tutorial explains how to install Subsonic on the popular FreeNAS server.

The following was done with Subsonic 3.6 and FreeNAS 0.69. Note that a "full", not "embedded" FreeNAS installation is required. Make sure to allocate enough disk space on the OS partition. Java and Subsonic requires at least 150MB.

In terms of hardware requirements, you probably need at least 750MHz CPU and 180MB RAM.

Step 1: Download Java JRE (or JDK) package from

Step 2: Install dependent packages first:
Code: Select all
$ pkg_add -v -r xtrans
$ pkg_add -v -r xproto
$ pkg_add -v -r xextproto
$ pkg_add -v -r javavmwrapper

Step 3: Install the JRE (the .tbz file is the one you downloaded in step 1)
Code: Select all
$ pkg_add -v diablo-jre-freebsd6.i386.

Step 4: Download Subsonic standalone version and install it in /var/subsonic/standalone, as described here.

Step 5: In the FreeNAS web interface, go to System > Advanced > Command script and add the following "PostInit" script:
Code: Select all

Step 6: Reboot FreeNAS, and go to http://<your-freenas-server>:8080 to start using Subsonic.

Your comments are welcome!

PostPosted: Thu Jan 29, 2009 1:17 am
by AndyD
Nice one Sindre.
chmod +x (because I copied from windows probably)

Subsonic is asking for LAME...I can't find the LAME package for FreeBSD....can you help?

PostPosted: Thu Jan 29, 2009 9:10 am
by AndyD
Oh..I knew there was something I forgot....

pkg_add -v -r javawmwrapper

doesn't work, I downloaded the package and did it as:
pkg_add -v javawmwrapper.tgz (or whatever it was called.

Also Subsonic doesn't auto start, I've just chmod 777 to see if that works.

PostPosted: Thu Jan 29, 2009 9:22 am
by sindre_mehus
AndyD wrote:pkg_add -v -r javawmwrapper
doesn't work

Oops, my mistake - it should be "javavmwrapper", not "javawmwrapper".

(I've corrected the typo in the original post).

Thanks for reporting it!

PostPosted: Sun Mar 01, 2009 4:22 am
by heinakenka

Just some clarifying questions:
- which version of Java is right for latest FreeNAS?
- I use windows pc for browsing so what how do I get the Java to the FreeNAS machine? Copy of cource but which directory etc...?

AVI,WMV, ASF streaming

PostPosted: Sat Apr 25, 2009 10:02 pm
by jingy
Hi! Subsonic is awesome! Does anybody know or can give a step-by-step procedure on how to streaming video formats like avi, asf, wmv etc using freenas server? I'm a total newbie with this transcoding thing but willing to learn. Also, I know my subsonic works beacuse I can stream my mp3s.

Thanks a lot!

PostPosted: Sat Jun 06, 2009 11:19 pm
by Kryspy

What is the reason as to why it cannot run on a embedded install ??



PostPosted: Wed Jun 17, 2009 8:36 pm
by rich0805
I am I missing something here?

Step one says download
Step two says install
Step three says the file downloaded in one

So where do I get the files I need to install in two?


PostPosted: Thu Jun 18, 2009 10:11 pm
by sgx1
Using the FreeNAS console, just type in those commands (omitting the $) to download and install the packages from the FreeBSD repository.

pkg_add -v -r xtrans
pkg_add -v -r xproto
pkg_add -v -r xextproto
pkg_add -v -r javavmwrapper

PostPosted: Fri Jun 19, 2009 8:41 am
by rich0805
Thanks sgx1, I'll give that ago...This is all pretty new to me, I'm more used to DOS and Windows :oops:

I installed FreeNAS months ago and it has worked perfectly ever since, this will be the first time I have had to go back and do anything!

PostPosted: Sat Jul 25, 2009 7:14 pm
by censu
Possible noob question here, but everytime I try to complete Step 3 (installing the Java Runtime), the install begins and runs for about 30 seconds, then gets stuck in a loop prompting me for a yes or no answer to the Java license agreement. I am trying to perform the install using the Advance/Execute command interface in FreeNAS. I have uploaded the JRE .tbz to an FTP site and I am running the code "pkg_add -v <ftp address> diablo-jre-freebsd6.i386.".

If I am going about this in the completely wrong manner, could someone please post some step by step instructions (written for an idiot :roll: ) on how to perform the installation?

PostPosted: Sun Jul 26, 2009 5:42 pm
by sgx1
The Java installation cannot be done through the web configuration page. It just loops, as you've seen. There may be a way to pipe in the "y", but I've not tested.

Instead, at the FreeNAS computer, you go to the Console option and type in the same pkg_add command, which will go through the same process, but will allow you to enter a response at the prompt.

Alternatively, you can enable SSH in the FreeNAS services, and you can then use TelNet (Windows: Start > Run > CMD > "TelNet <ipaddress> 22") to get to the command line as well. Then, you can run the same pkg_add command.

I hope this helps.

Also, if you're using the newest FreeNAS based off of BSD 7, you can use the JRE for BSD 7 instead.

PostPosted: Mon Jul 27, 2009 5:14 am
by censu
Well I know I was doing something wrong! Thanks to you, I am now up and running and loving it. Thanks again!

PostPosted: Mon Jul 27, 2009 3:01 pm
by morpheus214
It doesnt' work for me.

I tried to install it on FreeNAS v. 0.69.2. I installed the packages needed for java as well as diablo-jre-freebsd6.i386. Then i created a folder /var/subsonic/standalone/ and copied the contents from the *.tar.gz into the folder. I set the path for the *.sh file and restarted.

When i opened <myfreenas>:8080 in the browser, nothing happened, so i started the sh-file again through the command --> again nothing.

So i opened the subsonic log:

Code: Select all
118 [main] INFO - Refreshing display name []; startup date [Mon Jul 27 14:21:21 GMT 2009]; root of context hierarchy
365 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [applicationContext-deployer.xml]
Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 5 in XML document from class path resource [applicationContext-deployer.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(
   at net.sourceforge.subsonic.booter.Main.<init>(
   at net.sourceforge.subsonic.booter.Main.main(
Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
   at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
   at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
   at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
   at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
   at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
   at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
   at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
   at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
   at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(
   at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(

Does this mean i have the wrong java version? I have no idea what to do now... Do i have to deinstall(how?) java and install another version?

Please help me :?

PostPosted: Mon Jul 27, 2009 4:04 pm
by sgx1
That looks similar to the error message I was getting with the Subsonic 3.7 beta.

Which Subsonic package are you installing?