Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Installing Subsonic on unRAID

Featured Replies

First off excellent tutorial.

 

I have Subsonic running on my Unraid box though I do have one issue that I hope someone can help me figure out. The problem I'm having is setting the Music folder directories. I have my music in shares which spread over two drives. My share is called "iTunes" and lives on disk5 and disk4. I've tried /shares/Itunes, /iTunes, /disk4, /disk5 and can't seem to get the list to populate. How would I add the share to subsonic's settings?

  • Replies 194
  • Views 70.5k
  • Created
  • Last Reply

I have my music in shares which spread over two drives. My share is called "iTunes" and lives on disk5 and disk4. I've tried /shares/Itunes, /iTunes, /disk4, /disk5 and can't seem to get the list to populate. How would I add the share to subsonic's settings?

 

Try /mnt/user/iTunes   

 

thanks for the quick response and the help, greatly appreciated.

would it be possible to host that transcode.zip file somewhere else?

 

I keep getting "Sorry, there are currently no free download slots available on this server. Please try again later, or you can upgrade to FileFactory Premium below for instant access." from FileFactory..

This is almost working for me, but not quite.  After rebooting, none of my subsonic settings were saved.  This is the email from the cron job that ran the night before (before the reboot):

 

### Removing Subsonic Thumbs ###
### Copy Subsonic From Memory ###
cp: cannot stat `/var/subsonic/data/db/*': No such file or directory
cp: omitting directory `/var/subsonic/data/db'
cp: omitting directory `/var/subsonic/data/transcode'
### Copy Subsonic tmp Cache ###
`/tmp/subsonic/ehcache/chatCache.data' -> `/boot/subsonic/tmp-subsonic-ehcache/chatCache.data'
`/tmp/subsonic/ehcache/chatCache.index' -> `/boot/subsonic/tmp-subsonic-ehcache/chatCache.index'
`/tmp/subsonic/ehcache/musicFolderCache.data' -> `/boot/subsonic/tmp-subsonic-ehcache/musicFolderCache.data'
`/tmp/subsonic/ehcache/musicFolderCache.index' -> `/boot/subsonic/tmp-subsonic-ehcache/musicFolderCache.index'

 

Looking into it, there are no files in /var/subsonic/data/db.  The database files are in /var/subsonic/db.  Likewise, my flac files wouldn't play until I moved the files from /var/subsonic/data/transcode to /var/subsonic/transcode.  Your scripts expect the data directory, but my subsonic isn't using it for some reason.

 

I am using subsonic version 3.9 (build 1335) – February 9, 2010.

 

I'm trying to go through and change the scripts, but I keep getting lost in the logic.  Not sure why my installation is not using the data directory.  It doesn't seem to be a problem for others.

 

Thanks

 

hi  me unraid server dont start the subsonic when boot

me go file is like this  waht have I dont do right ?

#!/bin/bash

# Start the Management Utility

/usr/local/sbin/emhttp &

# JAVA Runtime

installpkg /boot/packages_custom/jre-6u6-i586-3.tgz

 

# Run Subsonic and add Backup Job.

/boot/scripts/subsonic_start.sh

/boot/scripts/cron_subsonic_copy_from_memory.sh

 

  • 3 weeks later...
  • Author

This is almost working for me, but not quite.  After rebooting, none of my subsonic settings were saved.  This is the email from the cron job that ran the night before (before the reboot):

 

### Removing Subsonic Thumbs ###
### Copy Subsonic From Memory ###
cp: cannot stat `/var/subsonic/data/db/*': No such file or directory
cp: omitting directory `/var/subsonic/data/db'
cp: omitting directory `/var/subsonic/data/transcode'
### Copy Subsonic tmp Cache ###
`/tmp/subsonic/ehcache/chatCache.data' -> `/boot/subsonic/tmp-subsonic-ehcache/chatCache.data'
`/tmp/subsonic/ehcache/chatCache.index' -> `/boot/subsonic/tmp-subsonic-ehcache/chatCache.index'
`/tmp/subsonic/ehcache/musicFolderCache.data' -> `/boot/subsonic/tmp-subsonic-ehcache/musicFolderCache.data'
`/tmp/subsonic/ehcache/musicFolderCache.index' -> `/boot/subsonic/tmp-subsonic-ehcache/musicFolderCache.index'

 

Looking into it, there are no files in /var/subsonic/data/db.  The database files are in /var/subsonic/db.  Likewise, my flac files wouldn't play until I moved the files from /var/subsonic/data/transcode to /var/subsonic/transcode.  Your scripts expect the data directory, but my subsonic isn't using it for some reason.

 

I am using subsonic version 3.9 (build 1335) – February 9, 2010.

 

I'm trying to go through and change the scripts, but I keep getting lost in the logic.  Not sure why my installation is not using the data directory.  It doesn't seem to be a problem for others.

 

Thanks

 

 

Sorry I missed your post. Were you able to get it working?

 

When you modified the subsonic.sh file and saved it as subsonic_RAM.sh (Step #5), make sure you have the line that tells where subsonic should save the DB correct...

SUBSONIC_HOME=/var/subsonic/data

This will also fix having to move the transcode folder too.

I just discovered this customization and just got it working. AWESOME stuff! Thanks for the tutorial.

  • Author

SCSI, Thanks for the feedback.

Sorry I missed your post. Were you able to get it working?

 

When you modified the subsonic.sh file and saved it as subsonic_RAM.sh (Step #5), make sure you have the line that tells where subsonic should save the DB correct...

SUBSONIC_HOME=/var/subsonic/data

This will also fix having to move the transcode folder too.

 

I did get it working, but I rewrote your scripts to work with the directory structure I had.  I guess I missed the bit about changing the SUBSONIC_HOME variable, mine is /var/subsonic.  That would've been a lot easier.  Oh well, it's working and it's awesome.  Thanks for posting the how-to.

 

 

  • 2 weeks later...
  • Author

I do remember seeing some topics for this on the subsonic forums. The subsonic developer is really good at responding to posts on the forum

  • 2 weeks later...

kapperz: Thanks for a great tutorial. Thanks to you I have a nice music streaming application both on my computer and on my iPhone.  I donated 20€  :)

 

1# question: Can you stop and start Subsonic with some command(telnet/PuTTY)?

 

[EDIT]2# question: In the log of unraid I find 19:00:16 Tower crond[19824]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null is there something to do about the unable to exec...?

kapperz: Thanks for a great tutorial. Thanks to you I have a nice music streaming application both on my computer and on my iPhone.  I donated 20€  :)

 

1# question: Can you stop and start Subsonic with some command(telnet/PuTTY)?

 

[EDIT]2# question: In the log of unraid I find 19:00:16 Tower crond[19824]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null is there something to do about the unable to exec...?

 

If you have the DS_Store package installed with the option to send mail then that is why you are getting that message.  Cron needs a way to send mail out and if it can't then you get the message you are seeing.

kapperz: Thanks for a great tutorial. Thanks to you I have a nice music streaming application both on my computer and on my iPhone.  I donated 20€  :)

 

1# question: Can you stop and start Subsonic with some command(telnet/PuTTY)?

 

[EDIT]2# question: In the log of unraid I find 19:00:16 Tower crond[19824]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null is there something to do about the unable to exec...?

Apparently one of your processes is attempting to send mail outbound

(Actually, every cron process sends mail upon completion if there is anything sent to stdout or stderr output).

 

Install the ssmtp package with the package-manager built into unMENU.  It installs /usr/sbin/sendmail

Then, you'll get the mail (assuming it is mailing it to you).

 

 

 

  • Author

Hogwind,

 

#1 You can stop subsonic by killing the process that looks like below.

/usr/lib/java/bin/java -Xmx256m -Dsubsonic.home=/var/subsonic/data...

I also included subsonic_stop.sh script which reads the SUBSONIC_PIDFILE=/boot/subsonic/PID.txt path that was set in step #5 (file subsonic_RAM.sh).

 

#2 There is my one the cron_subsonic_copy_from_memory.sh file which is set in step #7. As Joe L said, I'm 99% sure I'm not sending anything to to stdout or stderr output. The script just adds a job line to the crontabs for the current user.

 

Glad you like the setup. I wish I was advanced enough to make a install package for this process.

#2 There is my one the cron_subsonic_copy_from_memory.sh file which is set in step #7. As Joe L said, I'm 99% sure I'm not sending anything to to stdout or stderr output. The script just adds a job line to the crontabs for the current user.

Unless you specifically redirected both stdout and stderr in the line in your cron script I think it will attempt to send you mail.

 

you want something like this

1 2 * * * script_name.sh >/dev/null 2>&1

  • Author

Thanks,

 

My scripts is like that..

0 19 * * * /boot/scripts/subsonic_copy_from_memory.sh >/dev/null 2>&1

Thanks,

 

My scripts is like that..

0 19 * * * /boot/scripts/subsonic_copy_from_memory.sh >/dev/null 2>&1

You are sharp...

 

In that case, you might want to install ssmtp/sendmail anyway , to see what message it is trying to send to you. ???

  • 3 weeks later...

Thanks kapperz!  These instructions are great.  Got this working on my unraid server 4.4.2.

 

I had some trouble with lame and faad transcoding apple lossless files, so I compiled ffmpeg (with help from your great instructions again) and followed instructions I found here:

 

http://www.activeobjects.no/subsonic/forum/viewtopic.php?t=1498&highlight=m4a

 

Basically, it has instructions to use a shell script to call ffmpeg and transcode to mp3.

 

#!/bin/bash

song=$1

bitrate=$2

 

/var/subsonic/transcode/ffmpeg -i "$song" -f mp3 -ab $bitrate - 2>/dev/null

 

FFMPEG seems to do much better at decoding for these types of files.  It might work well for other problematic file types too.  I didn't have to copy any additional library files - just the compiled ffmpeg.

 

Again - thank you!  It's nice to not have to store music on my mobile devices and at work.

 

Acutally, correction.  That shell script didn't work for me.  Instead, I changed it to convert to wav first and then run a second transcode step using lame.

 

#!/bin/bash

song=$1

bitrate=$2

 

/var/subsonic/data/transcode/ffmpeg -i "$song" -f wav - 2>/dev/null

Sorry for the late answer...

 

kapperz: Thanks for a great tutorial. Thanks to you I have a nice music streaming application both on my computer and on my iPhone.  I donated 20€  :)

 

1# question: Can you stop and start Subsonic with some command(telnet/PuTTY)?

 

[EDIT]2# question: In the log of unraid I find 19:00:16 Tower crond[19824]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null is there something to do about the unable to exec...?

 

If you have the DS_Store package installed with the option to send mail then that is why you are getting that message.  Cron needs a way to send mail out and if it can't then you get the message you are seeing.

I have the notify script installed. So that is probably why cron is trying to send some email.

 

 

Hogwind,

 

#1 You can stop subsonic by killing the process that looks like below.

/usr/lib/java/bin/java -Xmx256m -Dsubsonic.home=/var/subsonic/data...

I also included subsonic_stop.sh script which reads the SUBSONIC_PIDFILE=/boot/subsonic/PID.txt path that was set in step #5 (file subsonic_RAM.sh).

 

#2 There is my one the cron_subsonic_copy_from_memory.sh file which is set in step #7. As Joe L said, I'm 99% sure I'm not sending anything to to stdout or stderr output. The script just adds a job line to the crontabs for the current user.

 

Glad you like the setup. I wish I was advanced enough to make a install package for this process.

I want to be able to restart Subsonic without restarting unRAID. Because as it is now Subsonic doesn't add new music to the artist menu or to the iPhone app. I can only find new music under Home -> Newest after a search index update.

 

The subsonic_stop.sh script doesn't work. I think it's because the PID.txt isn't correct.

 

My PID.txt file just contains the numbers 5404.

 

What should I do to make the stop/start script work?

  • 2 weeks later...

*deleted, problem solved*

  • 1 month later...

I've been enjoying streaming music to my Android phone since this tutorial was first posted.  A BIG Thanks to you kapperz.

 

I did donate and I have a license key.  Is there any way to pass license key during startup so that I don't have to log in and install the key everytime my server is restarted?

I had trouble starting v4.1 on my unraid.

 

I had to change the subsonic_RAM.sh script (got this from another site)

:

 

Delete or comment out the following lines:

 

cd $(dirname $0) 
if [ -e /bin/readlink ] || [ -e /usr/bin/readlink ]; then 
cd $(dirname $(readlink -f $0)) 
fi 

 

Replace above with:

 

cd `dirname $0`

 

Note the that above is a " ` " not a " ' "

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.