Subsonic for Synology

Third-party modifications and add-ons, Apps and Clients

Moderator: moderators

Subsonic for Synology

Postby DviousDogzz » Sun Mar 01, 2015 4:47 pm

Hi all. I've been scouring the interwebs for any information on a Subsonic package for Synology NAS systems. The only thing I have found is this from 2013: http://www.eg-blog.de/?cat=8 Though I appreciate the time and effort put into creating at least something compatible, my experience with the installation and use of the 4.8 package was less than desirable. I'm used to SS running flawlessly on my old Windows Home Server but now that I have moved on to a NAS (for the first time), I am severely disappointed that I can't use SS to its full potential.

I don't know much about creating 3rd party packages for NAS systems, but I wonder if anyone out there knows if there is a way to get the latest version of Subsonic working on a Synology DS414j? I don't mind having to jump through a few hoops for setup, as long as the end result is being able to use SS on my NAS works with all the bells and whistles. I would appreciate any advice or information you all may have.
User avatar
DviousDogzz
 
Posts: 12
Joined: Sun Oct 30, 2011 10:51 pm

Re: Subsonic for Synology

Postby msub » Mon Mar 02, 2015 8:07 pm

Hi,

I'm running latest Subsonic on a Synology DS1512+, using the standard Subsonic WAR installer under Apache Tomcat.
I ended up with this setup because I also could not find an up-to-date synology package for Subsonic.

/Michael
msub
 
Posts: 3
Joined: Thu Aug 14, 2014 5:28 pm

Re: Subsonic for Synology

Postby DviousDogzz » Tue Mar 03, 2015 10:24 pm

Good to know, Michael. Was it difficult to set up and are you able to use all the features?
User avatar
DviousDogzz
 
Posts: 12
Joined: Sun Oct 30, 2011 10:51 pm

Re: Subsonic for Synology

Postby msub » Thu Mar 05, 2015 9:48 pm

Hi,

Setup wasn't that bad:
- install Apache Tomcat 6 from the sinology package manager.
- download the Subsonic war package from subsonic.org.
- deploy the war file using Tomcats admin interface.
- restart Tomcat (once or twice ;-))
Now you should be ready to use subsonic from within local local LAN.
As far as I remember, it is subsonic will be reachable on HTTP://IP_OF_YOUR_SYNOLOGY:7070/subsonic.

Accessing subsonic from outside the local LAN was a bit more tricky, because I did not want the port to be part of the external URL, i.e. my server should be reachable on http://mydomain.com/subsonic.
This part involved som custom Apache webserver configuration to proxy the Tomcat server:
Code: Select all
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
    Order allow,deny
    Allow from all
</Proxy>
ProxyPass /subsonic http://localhost:7070/subsonic
ProxyPassReverse /subsonic http://localhost:7070/subsonic


I think you can avoid the Apache proxy configuration part completely if you are willing to open up a port in your router (port 7070 in my case).

I am not using video streaming on the Subsonic server, but I fully expect it to work - Everything related to music, podcast and internet radio is working perfectly with my setup.

/Michael.
msub
 
Posts: 3
Joined: Thu Aug 14, 2014 5:28 pm

Re: Subsonic for Synology

Postby DviousDogzz » Thu Mar 05, 2015 9:52 pm

Wow, thank you SO MUCH for the detail! I will attempt to do this myself with your instructions. :D
User avatar
DviousDogzz
 
Posts: 12
Joined: Sun Oct 30, 2011 10:51 pm

Re: Subsonic for Synology

Postby producerism » Tue Mar 10, 2015 2:48 pm

I've got subsonic WAR installed on my ds1515 under tomcat7 -- it's running and managed to index my music folders (it says 78 artists found, xx songs, xx space, etc.) However none of the music is being displayed in the sidebar, in the cover art section, anywhere. It's as if the media search is finding the files and indexing them, but then none of that is ever getting loaded into the frontend.

I've been using subsonic for a few years on windows, but this is my first install on a synology nas. I'm guessing it's a permissions issue of some kind, but that's really strange that it can find and index the music, just not display any of it.
producerism
 
Posts: 13
Joined: Tue Mar 01, 2011 12:09 am

Re: Subsonic for Synology

Postby DviousDogzz » Tue Mar 10, 2015 3:12 pm

Did you install Java via the Package Center? It gives explicit instructions on what to download and where. I'm still working on my setup. I've got the WAR package deployed via Tomcat 6, but the Subsonic service won't start (FAIL). I believe it is another permissions issue, so I am going back in to troubleshoot.
User avatar
DviousDogzz
 
Posts: 12
Joined: Sun Oct 30, 2011 10:51 pm

Re: Subsonic for Synology

Postby producerism » Tue Mar 10, 2015 6:31 pm

Yes, I have Java package manager installed, and I downloaded the correct version and loaded it.

The Subsonic service starts and seems to run fine. It just doesn't display any of the folders/coverart/etc. I can't even generate a random playlist, because despite knowing how big my library is, what genres the songs are in, and how many artists... it doesn't actually show any of the music.
producerism
 
Posts: 13
Joined: Tue Mar 01, 2011 12:09 am

Re: Subsonic for Synology

Postby raydiognome » Wed Mar 11, 2015 12:53 am

Trying to get Subsonic installed my Synology but currently stuck at using putty to edit the user file.
I can login in via SSH using my admin account and it shows my servername at the prompt. I believe the admin account is a root user.

Where do I go from here?

I believe I need to go to directory /var/packages/Tomcat/target/apache-tomcat-????/conf/ ???? is my version number. I installed TomCat7 and have tried both build numbers 7.0.54 and 59

Could someone give me a little more detailed step by step?

Thanks
raydiognome
 
Posts: 9
Joined: Tue Mar 10, 2015 10:31 pm

Re: Subsonic for Synology

Postby producerism » Wed Mar 11, 2015 3:05 am

I was finally able to get it all working, but for some reason I had to uninstall everything (java manager, tomcat, etc.) and do it all from scratch. I really don't think I missed any steps, but thankful I have it down now.

For the benefit of anyone else that ends up looking to do this, here are some quick steps:

1. in Package Manager, add the "Java Manager" package and follow the instructions for downloading (I used jdk-7u75-linux-i586.gz), then uploading java to the Java Manager

2. in Package Manager, add "Tomcat7" package

3. edit this file: "/volume1/@appstore/Tomcat7/src/conf/tomcat-users.xml" and add this to the <tomcat-users> section
Code: Select all
<role rolename="admin"/>
<role rolename="admin-gui"/>
<role rolename="manager"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user username="user" password="password" roles="manager-gui,manager-script,manager-jmx,manager-status,manager,admin,admin-gui"/>


4. also, create a folder at /var/subsonic (and I gave it 0777 permission)

5. to enable transcoding, point subsonic to synology's ffmpeg instance by running the following line:
Code: Select all
ln -s /usr/syno/bin/ffmpeg /var/subsonic/transcode/ffmpeg


6. stop, then start tomcat again (it has to be restarted so that it can load the updated tomcat-users.xml file.

7. now you can go to your Tomcat instance (defaults to port 7070) and click on app manager, or just go here: http://SYNOLOGY_IP:7070/manager/html and look for the "Deploy" section. In the subsection called "WAR file to deploy" upload the subsonic WAR file. It should either automatically start, or you may have to click the "start" button next to the subsonic entry in the list of your tomcat applications.

8. that should be it! http://SYNOLOGY_IP:7070/subsonic should load up. In order to get subsonic to read my music folders, I had to give the user "Everyone" read access to them (e.g. set "Everyone" with read access to /volume/media/music/rock)
producerism
 
Posts: 13
Joined: Tue Mar 01, 2011 12:09 am

Re: Subsonic for Synology

Postby raydiognome » Wed Mar 11, 2015 10:57 am

This is great Thank You.

Forgive my ignorance but Linux is not my thing.

Any chance of spelling out how to perform steps 3 & 4?

IE:
Use Putty to login via SSH
Use the admin account username and password

Type the following to navigate to the proper folder (if needed) : ?

Type the following to edit the Tomcat users file: ?

Type the following to add the dir: ?

I was googling for hours last night and found a lot of the same thing. I'm just missing the actual commands

Also before I go through all this do you know if the Sonos option still works? I see no reason why it wouldn't.

Thank You
raydiognome
 
Posts: 9
Joined: Tue Mar 10, 2015 10:31 pm

Re: Subsonic for Synology

Postby producerism » Wed Mar 11, 2015 11:42 am

No problem. To be honest, it might be easier to use a program like WinSCP since it can edit files pretty easily, and also allows you to navigate through the NAS with a gui.

For step 3, you can use WinSCP to navigate to the tomcat-users.xml file, then just right click and select 'edit' and scroll down to the bottom of the file, and put the following code right before the </tomcat-users> end tag.

If you can't/won't use WinSCP, similarly you can do it all in the command line, but it's a bit harder to explain how to edit the file. For example, to open the tomcat-users.xml file, you can use:
Code: Select all
vi /volume1/@appstore/Tomcat7/src/conf/tomcat-users.xml


Then when the file opens, you hit "i" to enter into editing mode, then type all of the info in, and then hit ESC to exit edit mode, then type ":x" to exit and save the file.

For step 4, you can just type "mkdir /var/subsonic" then to set permissions type "chmod 0777 /var/subsonic"

As for Sonos, I don't use that option, but since transcoding and DLNA work, I can't imagine why Sonos wouldn't work.

Good luck!
producerism
 
Posts: 13
Joined: Tue Mar 01, 2011 12:09 am

Re: Subsonic for Synology

Postby raydiognome » Wed Mar 11, 2015 12:01 pm

WOW, WinSCP MUCH easier! Can't thank you enough.

One last question. I get a permissions error when trying to edit the file or change the properties to make it writable.
I'm logging in with my Synology admin / password. Shouldn't this account have root privileges? (or whatever privileges are needed?)

Thanks
raydiognome
 
Posts: 9
Joined: Tue Mar 10, 2015 10:31 pm

Re: Subsonic for Synology

Postby DviousDogzz » Wed Mar 11, 2015 1:30 pm

If I am not mistaken, I believe you have to log in as root, not admin. Should be the same password.

Thank you all for the plethora of information here, I will have my subsonic server up and running because of you all, even if I barely know linux! :)
User avatar
DviousDogzz
 
Posts: 12
Joined: Sun Oct 30, 2011 10:51 pm

Re: Subsonic for Synology

Postby raydiognome » Thu Mar 12, 2015 12:12 am

Thanks to everyone. Finally got my Subsonic working on my Diskstation AND it works with my Sonos. I guess now I have to cough up for premium

For those who are looking, here's Producerism's instructions with some blanks filled in. If anyone see's an issue, please fix and update!

Thanks again for the help

1. In Package Manager, add the "Java Manager" package and follow the instructions for downloading (I used jdk-7u75-linux-i586.gz), then uploading java to the Java Manager

2. In Package Manager, add "Tomcat7" package

3. Download and use WinSCP.
Login as root and use your admin Diskstation password
Navigate to "/volume1/@appstore/Tomcat7/src/conf/tomcat-users.xml"
Edit this file: <tomcat-users> section
Add the following before the last </tomcat-users>

<role rolename="admin"/>
<role rolename="admin-gui"/>
<role rolename="manager"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user username="user" password="password" roles="manager-gui,manager-script,manager-jmx,manager-status,manager,admin,admin-gui"/>

Be sure to change "user" & "password" to whatever you like. This is what you'll use to login to the Manager App in Tomcat

4.Create a folder at /var/subsonic (and I gave it 0777 permission)
Using the Command window in WinSCP type without the quotes: "mkdir /var/subsonic"
Then to set permissions type without the quotes "chmod 0777 /var/subsonic

5. To enable transcoding, point subsonic to synology's ffmpeg instance by running the following line:

Using the Command window in WinSCP type without the quotes: "ln -s /usr/syno/bin/ffmpeg /var/subsonic/transcode/ffmpeg

6. Stop, then start tomcat again (it has to be restarted so that it can load the updated tomcat-users.xml file.

7. Now you can go to your Tomcat instance (defaults to port 7070) and click on app manager, or just go here: http://SYNOLOGY_IP:7070/manager/html and look for the "Deploy" section.
In the subsection called "WAR file to deploy" upload the subsonic WAR file. Then hit deploy
It should either automatically start, or you may have to click the "start" button next to the subsonic entry in the list of your tomcat applications.

8. That should be it! http://SYNOLOGY_IP:7070/subsonic should load up.

9 In order to get subsonic to read my music folders, in the diskstation create a user "Everyone" and allow read access to them (e.g. set "Everyone" with read access to /volume/media/music/rock)

10 In Subsonic create a user called Everyone. Log out as admin and log back in as Everyone.

All should be good!
raydiognome
 
Posts: 9
Joined: Tue Mar 10, 2015 10:31 pm

Next

Return to Mods, Apps and Clients

Who is online

Users browsing this forum: No registered users and 2 guests