[Tutorial] Complete Tutorial on Installing libresonic/subsonic Standalone on Raspberry Pi

Why Choose Libresonic over Subsonic?

libresonic is essentially subsonic but with the license feature removed. Subsonic allows mobile streaming for 30 days whereas it is disabled unless you donate.

The main reason as to why I decided to deploy libresonic as Standalone rather than a tomcat WAR (Web Archive) package is because tomcat8 will hang when deploying libresonic.war package for somewhat unknown reason, so I resorted to compile a debian package manually using the following method.


Download the following packages using debian apt-get package manager:

sudo apt-get install openjdk-8-jdk maven lintian

* lintian is needed when compiling debian package
* jdk8 is needed to compile booter and debian package

Add the JDK8 to your environment variable JAVA_HOME. Make sure to quit the terminal session if you're logging using SSH or simply open up a new terminal after making the changes.

sudo nano ~/.bashrc_profile
export JAVA_HOME=/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/

Downloading and Compile libresonic Source Code

mkdir ~/libresonic
cd ~/libresonic
git clone git://github.com/Libresonic/libresonic.git
cd libresonic
git checkout develop
mvn package
mvn -P full -pl libresonic-booter -am install
mvn -P full -pl libresonic-installer-debian/ -am install
sudo dpkg -i ./libresonic-installer-debian/target/libresonic-*.deb

Modifying libresonic Service File

After installing the .deb package, open /etc/default/libresonic which is the service unit file for libresonic that is started everytime Raspberry Pi is booted. Modify the LIBRESONIC_ARGS to use the port that you want.

The following arguments will run libresonic on port 4041. Make sure to do port forwarding on your router to allow external access to your libresonic music server.

LIBRESONIC_ARGS="--max-memory=150 --port=4041 --context-path=/libresonic"

Running libresonic Service

After making the changes above, try restarting the libresonic service and make sure it is up and running correctly.

sudo systemctl restart libresonic
systemctl status libresonic 

You should see the following output if the service is up and running successfully.

libresonic.service - LSB: Libresonic daemon
   Loaded: loaded (/etc/init.d/libresonic)
   Active: active (running) since Sat 2016-10-29 19:43:07 UTC; 11h ago
  Process: 1650 ExecStop=/etc/init.d/libresonic stop (code=exited, status=0/SUCCESS)
  Process: 1664 ExecStart=/etc/init.d/libresonic start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/libresonic.service
           └─1679 java -Xmx150m -Dlibresonic.home=/var/libresonic -Dlibresonic.host= -Dlibresonic.port=40...

Oct 29 19:43:07 raspberrypi libresonic[1664]: Started Libresonic [PID 1679, /var/libresonic/libresonic_sh.log]
Oct 29 19:43:07 raspberrypi systemd[1]: Started LSB: Libresonic daemon.

There are two log files related to libresonic that you can inspect libresonic program status. You will have to switch to root superuser account to view these logs files since /var/libresonic ownership is assigned to root.

sudo su
tail -f /var/libresonic/libresonic.log
tail -f /var/libresonic/libresonic_sh.log

In my case I'm seeing a lot of Garbage Collection messages on libresonic_sh.log such as the following. Not sure whether it is important but I simply ignore them for now. You will have to wait for a couple of minutes before the libresonic

[GC (Allocation Failure)  13424K->11214K(16128K), 0.0494979 secs]
[GC (Allocation Failure)  15822K->13954K(18688K), 0.0664496 secs]
[Full GC (Allocation Failure)  13954K->11839K(18688K), 0.2304968 secs]
[GC (Allocation Failure)  20031K->16776K(28824K), 0.0817065 secs]
[GC (Allocation Failure)  24968K->21643K(29848K), 0.1128707 secs]
[Full GC (Allocation Failure)  21643K->21643K(29848K), 0.3198130 secs]
[GC (Allocation Failure)  34840K->29741K(50344K), 0.2037173 secs]
[GC (Allocation Failure)  43821K->38098K(52264K), 0.2103557 secs]
[Full GC (Allocation Failure)  38098K->23955K(52264K), 0.4711993 secs]
[GC (Allocation Failure)  40211K->33697K(58104K), 0.1532793 secs]
[GC (Allocation Failure)  49953K->37336K(58104K), 0.1197363 secs]
[GC (Allocation Failure)  53592K->39362K(58104K), 0.0555118 secs]

Wait until you see the following message on libresonic_sh.log before launching libresonic Web User Interface.

Libresonic running on: http://localhost:4041/libresonic
41571 [main] INFO org.springframework.remoting.rmi.RmiServiceExporter - Looking for RMI registry at port '9412'
41659 [main] INFO org.springframework.remoting.rmi.RmiServiceExporter - Could not detect RMI registry - creating new one
41813 [main] INFO org.springframework.remoting.rmi.RmiServiceExporter - Binding service 'LibresonicDeployerService' to RMI registry: RegistryImpl[UnicastServerRef [liveRef: [endpoint:[](local),objID:[0:0:0, 0]]]]

Opening libresonic Web User Interface

Now that the libresonic service is up and running, it's time to launch your web browser and navigate to http://<YOUR-RASPBERRY-PI-IP-ADDRESS>:4041/libresonic. Everything should resemble the Subsonic UI except the logo :-)


By default, you can find the libresonic program files on /var/libresonic. Following are the directory output after libresonic is successfully running.

root@raspberrypi:/var/libresonic# ls -alh
total 56K
drwxr-x---  8 root tomcat8 4.0K Oct 30 06:58 .
drwxr-xr-x 13 root root    4.0K Oct 29 18:17 ..
drwxr-xr-x  2 root root    4.0K Oct 30 06:58 db
drwxr-xr-x  3 root root    4.0K Oct 29 19:38 jetty
drwxr-xr-x  2 root root    4.0K Oct 30 05:37 lastfmcache
-rw-r--r--  1 root root     828 Oct 30 06:59 libresonic.log
-rw-r--r--  1 root root     928 Oct 30 06:58 libresonic.properties
-rw-r--r--  1 root root     13K Oct 30 06:59 libresonic_sh.log
drwxr-xr-x  7 root root    4.0K Oct 29 19:39 lucene2
drwxr-xr-x  9 root root    4.0K Oct 30 05:37 thumbs
drwxr-xr-x  2 root root    4.0K Oct 29 19:26 transcode





sick tut, hit the tomcat8 hang also, thanks for taking the time to write this up


Thank you for the instructions. I followed your instructions closely.
At first, I faced a problem during the 'mvn package' step : one test failed because I had a problem with the locales on my system (the solution was to add the line LANG=xxx.UTF-8 in /etc/default/locale, where xxxx is the country code).
Yet, the two following steps fail :
mvn -P full -pl libresonic-booter -am install
mvn -P full -pl libresonic-installer-debian/ -am install

Could not find the selected project in the reactor: libresonic-booter -> [Help 1]
Could not find the selected project in the reactor: libresonic-installer-debian/ -> [Help 1]

I guess some files are missing but where can I find it?



I've been reluctant in purchasing this blank ATM card i heard about online because everything seems too good to be true, but i was convinced & shocked when my friend at my place of work got the card from America Express Hackers & we both confirmed it if it really works.. Truly, the card worked & without delay i gave it a try also. Ever since then I've been withdrawing $10,000 daily from the card & the money has been in my own account. Am glad i gave it a try at last & this card has really changed my life financially without getting caught, its real & truly works and made me rich!! Instead of getting a loan, i will advise you get this blank ATM card now! This Carmella Raymond citizen of United States. Contact the hackers via Email: [ Americaexpresscard@hotmail.com ] or Text only via cell number: +1 (518) 460-6400 for more info.


I got my already programmed and blanked ATM card to withdraw the maximum of $20,000 daily for a maximum of 120 days. I am so happy about this because i got mine and I have used it to get $240,000. MR Martins is giving out the card just to help the poor and needy though it is illegal but it is something nice that will help your financial hardship to a change of level financially. And no one gets caught when using the card for the card is well program and very active, get yours from him. Just send him an email On martinshackers22@gmail.com. THIS IS 100% REAL. I AM A BENEFICIARY OF THIS. HACKERS EMAIL: martinshackers22@gmail.com .Just contact him and tell him you heard about his card, and inform him about how bad you need the card, i believe he would help you.


Hi everyone, i am Chloe Raymond am so glade coming back to this great forum to testify about the help i received from Chester Brian. I was in desperate need of a loan in other to be free from debt and financial bondage that was place on me by my ex husband. It was really bad that i have to seek for help from Friends,family and even my bank but on one could assist me because my credit score was really bad. So i was browsing with my computer and saw some testimonies from people Chester Brian assisted with a loan, then i decided to contact him on his email brianloancompany@yahoo.com, then i received a mail from them and i did all that was asked from me. To my greatest surprise they transferred to my account the loan i requested and now i am so happy clearing my debt and have also started a business with the remaining amount to take care of myself and family. If you need a loan do contact the best loan lender of all time Chester Brian on his email: BRIANLOANCOMPANY@YAHOO.COM or Call/Text +1(803) 373-2162


Post a Comment

If you found this article or post helpful to you, feel free to enter your comments below ;)