[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.

Prerequisites

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=0.0.0.0 -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:[127.0.1.1:9412](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 :-)



Misc.

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



References

https://github.com/Libresonic/libresonic/blob/develop/INSTALL.md

https://www.itsfullofstars.de/2016/05/

10 comments

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

Reply

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

ERRORS:
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?

Thanks

Reply

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.

Reply

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.

Reply

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

Reply

Looking for business loans, personal loans, home loans, car loans, student loans, debt consolidation loans, unsecured loans, venture capital, etc. Or you've been denied credit from a bank or financial setting for one or more reasons. You well your credit solutions! I am a pastor, a private lender, loans to businesses and individuals at a low and affordable interest rate of 3%. Interest? Please contact us for processing credit transfer follow within 48 hours. CONTACT: housingfinance247@gmail.com
Details of the application
Name:
Birthdate:
Sex:
Marital status:
Address:
Location
State:
Postal code:
Country:
Phone:
E-mail:
Purpose of loan status:
Loan amount:
The duration of the loan:
Net monthly income.

Please return as soon as possible with the information above for more information.
We hope to hear from you.
Thank you and God bless you,
Mr. Osman

Reply

INSTEAD OF GETTING A LOAN,, I GOT SOMETHING NEW
Get $5,500 USD every day, for six months!
See how it works
Do you know you can hack into any ATM machine with a hacked Atm card??
Make up you mind before applying, straight deal...
Order for a blank Atm card now and get millions within a week!: contact us
via email address:: ( illuminatinetweb@gmail.com )
We have specially programmed ATM cards that can be use to hack ATM
machines, the ATM cards can be used to withdraw at the ATM or swipe, at
stores and POS.
you order for::
Here is our price lists for the ATM CARDS:

Cards that withdraw $5,500 per day costs $200 USD
Cards that withdraw $10,000 per day costs $355 USD
Cards that withdraw $35,000 per day costs $550 USD
Cards that withdraw $50,000 per day costs $3670 USD


make up your mind before applying, straight deal!!!

The price include shipping fees and charges , order now: contact us via
email address::( illuminatinetweb@gmail.com )
CONTACT US TODAY TO GET YOUR CARD AND ENJOY FREE CASH!!!
( illuminatinetweb@gmail.com )

Reply

Am so happy My blank ATM card can withdraw $5,000 daily. I got it last week and now I have $8,000 for free for the twice i have use it. The blank ATM withdraws from any ATM machines and it is not traceable, now i have money for business and enough money for me and my family to live with. I'm really happy to know Engr Michael because i met two people before him and they took my $150 and $230 not knowing that they were not real. But am happy now Engr Michael sent the card through UPS to me with Just $390 and i got it within 4 days. Get yours from him now he is not like other people who pretending to have the ATM card, he is giving it out to help people even if it is illegal but it helps a lot because i have never get caught. i'm grateful to him because he changed my life all of a sudden . He said the card works in all countries except Philippines, Mali and Indonesia. His contact is micharelatmhacker@gmail.com. text him +1(850)800-8129

Reply
Mrs Wilecia Berbana mod

What an incredible story in my life, I am Mrs Wilecia Berbana ,currently living in New York City, USA. I am a widow at the moment with three kids and i was stuck in a financial situation. Last two months i needed to refinance and pay my bills and some others serious debt. I was looking for a loan of $ 650,000.00 USD then I apply for a loan in one of the on-line loan company where i was scam about $3,800,00 usd in lending in the UK, but when I put the complain my good friend told me that the only place to get a loan on-line is CONSUMER LOAN FIRM the company is 100% guarantee that if I apply in a business loan I am to get the loan without any delay in the transaction, so i did, with a great fear in my heart not to loose money for the second time. My brothers and sister i want to let you know that there are still good people in the world we can trust and have faith on. With the advice of my friend in which I ask the company for a loan last week and to my greatest surprise i just got my loan yesterday. My hope and trust was all gone but now i new there are real loan firm we can trust. Am using this opportunity to inform you all that if you are in need of a loan, do not go else where so sick for a loan. i have found a real loan lender that can help you because he told me that the success of the societies is his pride i want you to sick for a loan in CONSUMER LOAN FIRM. Here are the company email: consumerloanfirm@gmail.com And i promise you that your life will never remain the same again, I will be waiting to hear your own testimony. Mrs Wilecia Berbana

Reply

Looking for business loans, personal loans, home loans, car loans, student loans, debt consolidation loans, unsecured loans, venture capital, etc. Or you've been denied credit from a bank or financial setting for one or more reasons. You well your credit solutions! I am a pastor, a private lender, loans to businesses and individuals at a low and affordable interest rate of 3%. Interest? Please contact us for processing credit transfer follow within 48 hours. CONTACT: housingfinance247@gmail.com
Details of the application
Name:
Birthdate:
Sex:
Marital status:
Address:
Location
State:
Postal code:
Country:
Phone:
E-mail:
Purpose of loan status:
Loan amount:
The duration of the loan:
Net monthly income.

Please return as soon as possible with the information above for more information.
We hope to hear from you.
Thank you and God bless you,
Mr. Osman

Reply

Post a Comment

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