lighttpd and music streaming


Recommended Posts

I have been using Subsonic Music Streamer for years on my windows machine (using apache & JAVA). I really love the application. There is a stand-alone version for Linux machines and even instuctions for installing Subsonic on FreeNAS.

 

Would it be possible to run Subsonic on unRaid using lightpd web server?

It has its own web-server... so lighttpd is not needed at all.

 

Only issue I can see is that its default port is 8080, and that port in unRAID is used by many for the unMENU web-server.  If you have both installed, you'll need to move one or the other to a different port.  (I know that unMENU can be configured for any port, and I'm pretty sure Subsonic has the same capability.)

 

You will have to install all the needed libraries ans support files, but it should not be an impossible task.  Document what you do for others benefit.

 

Joe L.

Link to comment

After reading this post I was interested to see how it worked.

 

It took me no effort at all to get it running under unraid.

 

- Download their 'all in one ready to go' package.

 

- Edit the subsonic.sh script to change the port used

 

- Edit the java environment variable to point to my java install ( I already have it installed as part of Crashplan).

 

That was it. I guess to get transcoding going you will need the various encoders listed as well. I didn't try any of them.

 

I found it quite heavyweight in terms of system resources and quite slow so not sure I'll stick with it, but that could be more down to my server hardware and size of music folders than anything!

Link to comment

It took me no effort at all to get it running under unraid.

Well this is great news. I know that it can work on unRAID.

 

I knew nothing about linux (except that it sounded hard) before I started to build my unRAID. I may need a little more detail on what you did.

 

1) using 7zip, unzip subsonic-3.7-standalone.tar.gz (which turns into a .tar file) and then unzip this into the root of my flash drive into SUBSONIC_HOME/standalone.

 

- Edit the subsonic.sh script to change the port used

I also changed SUBSONIC_MAX_MEMORY=256 (like it is on my windows box). It made a difference on Windows to give JAVA some more resources.

 

- Edit the java environment variable to point to my java install ( I already have it installed as part of Crashplan).

How did you install JAVA? I found this one link to jre-6u6-i586-3.tgz (I had to use the newest mirror). Any specifics on this step (commands to type and such) would be helpful.

 

That was it. I guess to get transcoding going you will need the various encoders listed as well. I didn't try any of them.

I will need this and will try to get this working on my own.

Link to comment

Boof,

 

The instructions to install Subsonic on FreeNAS had a step to "Install dependent packages first". I neglected this step and Subsonic still will run for me. Is this an important step?

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

 

I looks like the JAVA libs are removed from /usr/lib/java at each reboot, so I put the JRE package on the flash and added these two lines to my go script

installpkg /boot/subsonic_home/jre-6u6-i586-3.tgz
sleep 15; /boot/subsonic_home/standalone/subsonic.sh

 

I changed some paths around in the subsonic.sh script (see attached) because the default directory was set to /var/subsonic and that directory is removed each reboot too.

 

I'm having an issue when I reboot the server, Subsonic thinks its a new install. All the settings are gone and I'm prompted to assign an admin pw again. I've posted on Subsonic forums, but I don't think this is entirely a Subsonic issue.

 

Link to comment

Not just Java, but the entire Linux operating system and file systems are gone after every boot, because they are all stored in memory, and created fresh at each boot.  I created a FAQ entry to try to help explain this, found here:  "Why do I have to keep reinstalling a user application?"

 

It probably could be worded better, feel free to do so, but hopefully it will help you understand why the files an app requires, need to be placed in a non-volatile location, or saved and restored along with the app.

 

I suspect the Subsonic CONTEXT path also needs to be adjusted.

Link to comment

Boof,

 

The instructions to install Subsonic on FreeNAS had a step to "Install dependent packages first". I neglected this step and Subsonic still will run for me. Is this an important step?

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

 

I looks like the JAVA libs are removed from /usr/lib/java at each reboot, so I put the JRE package on the flash and added these two lines to my go script

installpkg /boot/subsonic_home/jre-6u6-i586-3.tgz
sleep 15; /boot/subsonic_home/standalone/subsonic.sh

 

I changed some paths around in the subsonic.sh script (see attached) because the default directory was set to /var/subsonic and that directory is removed each reboot too.

 

I'm having an issue when I reboot the server, Subsonic thinks its a new install. All the settings are gone and I'm prompted to assign an admin pw again. I've posted on Subsonic forums, but I don't think this is entirely a Subsonic issue.

 

 

I wouldn't worry about the FreeNAS dependencies. I don't see why any of them are relevant - likely just oddities to let the javavmwrapper be installed.

 

As Robj has said you will need to reinstall everything each reboot. Or make sure it's originally installed onto your actual array.

 

This all depends on what subsonic does with files though. It looked quite self contained but whilst it's running you might want to run 'lsof' from the shell and look for anything it's holding open that's out with its directory structure - and would be on the ram drive (i.e temp files in /var etc). You'll need to make sure these are backed up or managed suitably. This is probably what's happening with the lost password etc.

 

I think, as Robj has highlighted, the location of these files (I actually suspect they're held in the subsonic database) is probably reliant on the subsonic home path and the context path controlled in the startup script.

 

If you get the transcoding dependencies working please post back, I'd be interested to try it and see how it works / how low I can get the bitrate for streaming whilst still retaining good quality.

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.