Plugin suggestion: libresonic

zuzuzzzip

Dabbler
Joined
Apr 4, 2016
Messages
28
Hello,

I have a suggestion - or call it feature request - for a new plugin.

I am interested in running libresonic on my FreeNAS.

I know, we already have Subsonic and Madsonic. But the libresonic project is different as it sticks close to upstream and does not require any license whatsoever as opossed to the other two.
It is free as in freedom and free beer!
 

zuzuzzzip

Dabbler
Joined
Apr 4, 2016
Messages
28
Don't want to push anyone, but since Joshua wrote the other two ... maybe he can have a look :)
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
if you want to run it yourself, you could just replace the jar in the subsonic plugin.

if several people want this plugin I can take a look at some point
 
Joined
Jan 7, 2015
Messages
1,155
A big fat +1!!!

Libresonic is far and away better than the other two. But the recent tomcat update broke it on my freenas. I had it running successfully, after some tinkering, for a long time very successfully. The documentation is lacking (for BSD) and as it was written on the github page it does not work, I had to do some tweaking to get it to install and run. Now im stuck, the logs point to a driver that is unregistered because of memory leaks. It fails to deploy/run. If truly this driver causes memory leaks, then I certainly dont wont to re register it. I have tried to do standalone installs in a jail, without success, so the war file is the only way as far as FreeNAS goes.

I would love to have Libresonic plugin replace subsonic/madsonic because the other two hardly provide "free ubiquitous access to your music". If by free you mean paying for a license. Joshua- I have tried to simply replace the war files and trick the subsonic plugin to actually run libresonic, but it too errors out. If you could get this going you could save mankind.
 
Joined
Jan 7, 2015
Messages
1,155
So running across this thread got me to revisit getting libresonic v6.1 working in a jail again. And it is working with a simple reinstall of tomcat8. So for any interested the instructions to get this going are HERE. If memory serves there were simple issues to hammer out, i think it had to do with creating and permissioning the proper directories in /var. If any need further help on this I would be glad to try and help. LIBRESONIC FTW!!

Edit: Before you deploy the WAR file rename it to something more aesthetic i.e, music.war or something, otherwise to get to your server its a long ugly address http://domain.com:8080/libresonic-v.6.1. I prefer it simply as domain.com:8080/music. Then some simple reverse proxying/virtual hosting has it as music.domain.com. Very slick!
 
Last edited:

Glitch69

Cadet
Joined
Mar 29, 2017
Messages
4
So running across this thread got me to revisit getting libresonic v6.1 working in a jail again. And it is working with a simple reinstall of tomcat8. So for any interested the instructions to get this going are HERE. I
Dear John Digital,
thank you for your really good tutorial! It helped me a lot! Only one comment - instead of the dir in /var/sonsonic has to use /var/libresonic, otherwise you cant start the webapp.
 

Glitch69

Cadet
Joined
Mar 29, 2017
Messages
4
btw, is there a way to set up utf-8 support for libresonic? I have some special characters in titles, and i cant play these files.... thx!
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
btw, is there a way to set up utf-8 support for libresonic? I have some special characters in titles, and i cant play these files.... thx!
I'm not sure what you method uses to start libresonic. but for the subsonic-standalone port and subsonic plugin, which use the freebsd rc.d system, we have the start_precmd="export LC_CTYPE='en_US.UTF-8'"
 
Joined
Jan 7, 2015
Messages
1,155
Interesting issue. Ive noticed in the past the squirrelly naming files sometimes have. I havent yet had one not play because of it or maybe I didnt notice.

I recently spent several weeks renaming and cataloging all my music. It was so annoying, I installed my own musicbrainz database, and updated it to recent and Picard now works so very sweet. Little by little I got it all done. I chose to have non asc characters replaced, so now where there is a special character its an underscore, but the tags are legit, they display as they should.

Also, to be noted, I did not write the tutorial it was a link to the github docs.
 

Glitch69

Cadet
Joined
Mar 29, 2017
Messages
4
I'm not sure what you method uses to start libresonic. but for the subsonic-standalone port and subsonic plugin, which use the freebsd rc.d system, we have the start_precmd="export LC_CTYPE='en_US.UTF-8'"
Hi,
im using the above linked guide, using a standard jail, and set up tomcat8, using the webapp / war version of libresonic.
if I write some characters to the terminal, using characters like "ü,ó,ő,é,á" working fine, no problem, but most of my music is not available right now, because the titles contain characters like these.
Previously i have used subsonic, as a plugin/jail, without any problem, so do hope, it should be solved somehow...
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hi,
im using the above linked guide, using a standard jail, and set up tomcat8, using the webapp / war version of libresonic.
if I write some characters to the terminal, using characters like "ü,ó,ő,é,á" working fine, no problem, but most of my music is not available right now, because the titles contain characters like these.
Previously i have used subsonic, as a plugin/jail, without any problem, so do hope, it should be solved somehow...
did you try applying the note I gave?

Since you are using tomcat to start libresonic I checked it's rc.d script here...
https://github.com/freebsd/freebsd-ports/blob/master/www/tomcat8/files/tomcat8.in
It looks like in its prestart function "tomcat_prestart()" it runs another script to set environmental variables. This should be at "/usr/local/apache-tomcat-8.0/bin/setenv.sh"
In that file you should add the line...
Code:
export LC_CTYPE='en_US.UTF-8'

I just tested an install of tomcat8 and it did not create that file for you, so you will likely need to create it.


I wish the libresonic dev would release standalone (jar using jetty) versions of this program. I could then edit the subsonic-standalone port and make a libresonic-standalone port.
 

Glitch69

Cadet
Joined
Mar 29, 2017
Messages
4
thank you for your reply! I have created the file, and inserted the line -above - after deleted the db folder, and run a scan. The output is the same. But there is something i dont understand: some file - in the file name with spec chars. - looks good, but some contains strange figures, and not available for play.
Because the number of the files are aprox same as before, i guess, it was the situation as before, and not because of modified the file.
I do remember, in the past when i used subsonic 5.xx i had similar issues, but later on it was somehow fixed in subsonic. That was the reason, i did not renamed my music files...
 

noobi3

Dabbler
Joined
May 2, 2014
Messages
24
I have reached the deploy part but Apache keeps giving error

QHHvv3n.png

Could you guys please help

Thanks
 
Joined
Jan 7, 2015
Messages
1,155
There are directories that need to be created and owned by the www user or it doesnt start.

I think you need /var/subsonic and/or /var/libresonic

+### 4. Create directories and set up permissions
+As a recent fork of Subsonic, Libresonic expects a directory called subsonic.
+ #mkdir /var/subsonic
+ #chown -R www:www /var/subsonic
+ #chown -R www:www /usr/local/apache-tomcat-8.0/webappsq
 

Bmck26

Dabbler
Joined
Dec 9, 2013
Messages
48
Is this guide still relevant? I'm trying to install libresonic-v6.2 that was released in May 2017 but the .war file fails to deploy.
 
Joined
Jan 7, 2015
Messages
1,155
Mine is still running great.
 

Bmck26

Dabbler
Joined
Dec 9, 2013
Messages
48
I got it to work with Libresonic v6.1 but unfortunately the network configuration is different from subsonic, madsonic, or the libresonic docker container that I was running previously so I haven't been able to figure out how to access from outside my network with my android app. I use HAProxy on pfsense as a shared front but the /music after the port number messes that up so I'll have to figure something else out.
 
Joined
Jan 7, 2015
Messages
1,155
I have mine installed in a BAMP jail with an Apache 2.4 reverse proxy. pfsense ships the correct port to the jail and Apache takes over from there. I just go to music.domain.com. It works great. I even have it running SSL too via certbot. It works out real well. Ultrasonic on Android is the way I'm listening. It's pretty good.

To get all this running took a bit of tinkerage I will admit, but once I got it i got it and it's been great.

If I can help further let me know.
 

Bmck26

Dabbler
Joined
Dec 9, 2013
Messages
48
I have mine installed in a BAMP jail with an Apache 2.4 reverse proxy. pfsense ships the correct port to the jail and Apache takes over from there. I just go to music.domain.com. It works great. I even have it running SSL too via certbot. It works out real well. Ultrasonic on Android is the way I'm listening. It's pretty good.

To get all this running took a bit of tinkerage I will admit, but once I got it i got it and it's been great.

If I can help further let me know.

Yeah, Ultrasonic is what I've been using too. I'll have to do some more research on it. I have done much of anything with Apache.
 
Top