Press "Enter" to skip to content

Logitech Media Server and FreeBSD/FreeNAS

There are 3 ways to install Logitech Media Server on you FreeBSD computer: ports, packages and DIY (yes … you have to compile everything)

Package built by me

Ports are not constantly updated so I decided to create an installer which is easy to maintain for my personal use.

This will allow you to 1- Install Logitech Media Server, 2- Uninstall Logitech Media Server, 3- Update LMS whenever I’ll publish an updated version (works only if you have installed LMS with this software)

It will install Logitechmediaserver updated at the latest commit (refer to the date written in the changelog) with these included binaries:

  • SoX with DSD support
  • Flac 1.3.3
  • Faad2 2.8.8
  • Wavpack 4.80.0

Instructions (must be executed as root!)
pkg install curl
curl -A "audiodigitale" -o /usr/local/bin/lms_installer https://audiodigitale.eu/repo/freebsd/lms_installer
chmod +x /usr/local/bin/lms_installer
lms_installer

Using this software you are agreeing to its EULA.

For those of you who installed lms_installer when it was in ALPHA please delete it and reinstall it.

Changelog Installer
(ALPHA) 18/10/2019. slimserver commit 8a9e9fb, vendor commit 8b05092. First release of installer software, tested on FreeBSD/FreeNAS >= 11 
(ALPHA)22/10/2019. installer update to fix some bugs 
(ALPHA) 14/12/2019. installer update to support FreeBSD 12.1-RELEASE
(BETA) 09/01/2020. First beta released. Installer can now auto-update itself
(BETA) 24/01/2020. Software completely rewritten in c++. Added option to choose what version of lms install.
(STABLE) 27/06/2020. Fixed a security bug
(STABLE) 06/07/2020. using upsampling SoX requires libogg and libiconv which are not downloaded by the installer. Fixed
(STABLE) 23/10/2020. Update to match funcionalitites needed with the corresponding lms update.
(STABLE) 08/02/2021. Uninstall fixes. Dependencies download fixes.
(STABLE) 21/08/2021. Added gettext-runtime as dependecy to download
Changelog LMS
(BETA) 09/01/2020. slimserver-vendor commit 8b05092. slimserver commit 8d85ddd
(BETA) 21/01/2020 updated to LMS 7.9.3 slimserver commit 4f7c9f49
(STABLE-7.9.3) 24/01/2020. updated to version 1579448956
(BETA-8.0.0) 24/01/2020. added version 1579786032
(STABLE-7.9.3) 20/03/2020. updated to version 1582867832
(BETA-8.0.0) 20/03/2020. updated to version 1584422335
(BETA-8.0.0) 07/06/2020. updated to version 1591161678
(BETA-8.0.0) 31/08/2020. updated to version 1598791476. Updated binaries
(STABLE-7.9.4) 31/08/2020. updated to version 1598243812. Updated binaries
(STABLE-8.0.0) 23/10/2020. update to include wavpack dsd. I decide to detach from the official slimserver-vendor repository, updating all the modules and compiling a local perl which will be shipped with LMS, this is necessary to avoid perl incompatibility issues. Support for FreeBSD 11 dropped. Support for lms 7.9.3 dropped.
(STABLE-8.1.2) 08/02/2021. Updated all the CPAN modules. Fixed a bug which cause a memory leak when transcoding
(STABLE-8.1.2) 12/08/2021. Binaries update. Fixed ALAC transcoding
(STABLE-8.2.1) 21/08/2021. Update to 8.2.1
(STABLE-8.2.1) 02/09/2021. Perl updated to 5.34. CPAN modules updated.
(STABLE-8.2.1) 01/10/2021. LMS update. Update IO-Socket-SSL and Audio-Scan libraries.
(BETA-8.3.0) 29/01/2022. Bump to version 8.3
(BETA-8.4.0) 19/01/2023. Bump to version 8.4. Perl updated to 5.36

Installing LMS from my installer script means that you are accepting Logitechmediaserver license -> License_eng

Ports

Just type:

pkg install portmaster
portmaster audio/logitechmediaserver

IMPORTANT: while configuring the options of all softwares you are going to install, when logitechmediaserver options will be prompted make sure that “TEST” will NOT be ticked.

Note that the last update of this port was at the 11th July 2017.

DIY, aka: compile everything from source

IMPORTANT: this guide is meant to be an example,all the links and lms downloads are outdated but it should be pretty easy to follow the guide using the latest version of lms and all of the dependencies. To build all the CPAN modules you might want to use this updated fork that I made to build the packages: https://github.com/simonefil/slimserver-vendor
As you may notice I skipped the SoX compilation in this guide because it’s a bit more complex compared to the other binaries. If you really want to compile it from scratch there’s already a guide on this website and you might wanna check the repo I maintain for SoX to get the sources: https://github.com/simonefil/sox
Otherwise if you want to use binaries already compiled they are here: https://audiodigitale.eu/repo/sox/ . These are statically linked binaries which do not require any dependecies installed on your system. If you have a CPU with AVX instruction-set you should use the sox-FreeBSD-AMD64-AVX binary to get improved performances in certain scenarios.

Before starting this is what you need:

  • libtime.a
  • libpatience.a
  • Knowledges about what are jails (I will use CBSD to manage them)

Let’s start creating a jail that we will use to build everything:

cbsd jconstruct-tui

In “pkglist” insert manually:

unzip bash gmake rsync nasm wget libgd gcc perl5-5.24.1 automake libtool

Enter in the jail:

cbsd jstart build
cbsd jlogin build

I’m going to use /tmp to download everything and build lms:

cd /tmp
wget http://downloads.slimdevices.com/nightly/7.9/sc/3adb1b4/logitechmediaserver-7.9.1-1489743085.tgz
wget https://github.com/Logitech/slimserver-vendor/archive/public/7.9.zip
unzip 7*
tar xjf l*

Let’s start compiling:

cd slimserver-vendor-public-7.9/CPAN
./buildme.sh -t | tee /tmp/build.log
cd /tmp/logitechmediaserver-7.9.1-1489743085/CPAN/arch/5.24
rm -rf 5.1* && rm -rf 5.8 && rm -rf 5.22 && rm -rf 5.20
cp -Rp /tmp/slimserver-vendor-public-7.9/CPAN/build/arch/5.24/amd64-freebsd-thread-multi .
rm -rf x*

cd /tmp
tar cf FreeBSD-lms-7.9.1.tar logitechmediaserver-7.9.1-1489743085

wget http://downloads.xiph.org/releases/flac/flac-1.3.2.tar.xz
tar xf f*
cd flac-1.3.2
autoreconf -i
./configure --enable-static --disable-shared
make

cd /tmp
wget http://downloads.sourceforge.net/faac/faad2-2.7.zip
unzip faad2-2.7.zip
cd faad2-2.7
./configure --enable-static --disable-shared
make

cd /tmp
wget http://www.wavpack.com/wavpack-5.1.0.tar.bz2
tar xf wavpack-5.1.0.tar.bz2
cd wavpack-5.1.0
autoreconf -i
./configure --enable-static --disable-shared
make

Now we have to exit from this jail and move everything we have just compiled to a new jail when logitechmediaserver will run.

First of all exit from the build jail:

exit

Create a new jail like we did before including the following packages:

wget perl5-5.24.1 libiconv

cbsd jstart lms
mv /usr/jails/jails-data/build-data/tmp/FreeBSD-lms-7.9.1.tar /usr/jails/jails-data/lms-data/tmp
cbsd jlogin lms

Now I’m going to copy lms and the binaries we have compile above in the “lms” jail. I will include the modified version of SoX able to convert in DSD; for further info: Logitechmediaserver, C-3PO and PCM to DSD conversion

cd /tmp
tar xf F*
pw groupadd -n lms -g 20000
pw useradd -n lms -u 20000 -g lms -s /usr/sbin/nologin -c "Logitech Media Server" -d /nonexistent
mkdir /usr/local/lms
mv logitechmediaserver-7.9.1-1489743085 /usr/local/lms/
cd /usr/local/lms
mv logitechmediaserver-7.9.1-1489743085/* /usr/local/lms
rmdir logitechmediaserver-7.9.1-1489743085
rm -rf Bin/a* && rm -rf Bin/i* && rm -rf Bin/p* && rm -rf Bin/s* && rm -rf Bin/x*
cd Bin
wget https://audiodigitale.eu/repo/sox/sox-FreeBSD
mv sox-FreeBSD sox

exit

Move flac, faad, wavpack binaries into the Bin folder of LMS:

mv /usr/jails/jails-data/build-data/tmp/flac-1.3.2/src/flac/flac /usr/jails/jails-data/lms-data/usr/local/lms/Bin/
mv /usr/jails/jails-data/build-data/tmp/faad2-2.7/frontend/faad /usr/jails/jails-data/lms-data/usr/local/lms/Bin/
mv /usr/jails/jails-data/build-data/tmp/wavpack-5.1.0/cli/wvunpack /usr/jails/jails-data/lms-data/usr/local/lms/Bin/

Back into lms jail:

cbsd jlogin lms
chown -R lms:lms /usr/local/lms
chmod -R 755 /usr/local/lms/Bin
mkdir /var/log/lms
mkdir /var/db/lms
mkdir /var/db/lms/cache
mkdir /var/db/lms/prefs
mkdir /var/db/lms/playlists
chown -R lms:lms /var/db/lms
chown -R lms:lms /var/log/lms
cd /etc/rc.d
wget https://audiodigitale.eu/repo/freebsd/lms
chmod 555 lms
echo 'lms_enable="YES"' >> /etc/rc.conf && echo 'lms_logdir="/var/log/lms"' >> /etc/rc.conf && echo 'lms_cachedir="/var/db/lms/cache"' >> /etc/rc.conf && echo 'lms_prefsdir="/var/db/lms/prefs"' >> /etc/rc.conf && echo 'lms_playlistdir="/var/db/lms/playlists"' >> /etc/rc.conf

exit

Now restart the jail and Logitech Media Server will start at boot (if you are lucky 😉 )

cbsd jstop lms
cbsd jstart lms

119 Comments

  1. Wayne Wayne 6 Gennaio 2018

    Many thanks for this!

    I couldn’t get the port to install no matter what, so your pkg has been a big help!

    Any chance we can have an update to the latest 7.9.1 please?

    Thanks!

    • Simone Simone 6 Gennaio 2018

      Hi Wayne! At the moment I am quite busy but I think that within the end of January I can update the packages, be patient and thanks again!

      • Wayne Wayne 6 Gennaio 2018

        No worries there is no rush. 7.9.0 is working very nicely at the moment. Again thanks very much for doing this! Much appreciated 🙂

        • Simone Simone 6 Gennaio 2018

          Well, it seems that you are quite lucky! Try to pkg update and pkg upgrade and tell me if logitechmediaserver will upgrade to 7.9.1. I tried on my VM and it works!

          • Wayne Wayne 6 Gennaio 2018

            Yes pkg upgrade is done quick and easy. I’ll do some proper testing tomorrow and I find anything strange I’ll report back.

            Thanks a lot!!

  2. Aljosa Aljosa 11 Febbraio 2018

    Hi, I am gettin error when try to LMS from ports

    fetch: https://codeload.github.com/Logitech/slimserver/tar.gz/c835a1f?dummy=/Logitech-slimserver-7.9.0.g2016.09.30-c835a1f_GH0.tar.gz: size of remote file is not known

    Logitech-slimserver-7.9.0.g2016.09.30-c835a1f_ 179 MB 6178 kBps 00m30s

    => Fetched file size mismatch (expected 187923230, actual 187921541)

    => Trying next site

    => Attempting to fetch http://distcache.FreeBSD.org/ports-distfiles/Logitech-slimserver-7.9.0.g2016.09.30-c835a1f_GH0.tar.gz

    fetch: http://distcache.FreeBSD.org/ports-distfiles/Logitech-slimserver-7.9.0.g2016.09.30-c835a1f_GH0.tar.gz: Not Found

    => Couldn’t fetch it – please try to retrieve this

    => port manually into /usr/ports/distfiles// and try again.

    *** Error code 1

    Stop.

    make[1]: stopped in /usr/ports/audio/logitechmediaserver

    *** Error code 1

    Stop.

    make: stopped in /usr/ports/audio/logitechmediaserver

    ===>>> make build failed for audio/logitechmediaserver

    ===>>> Aborting update

    ===>>> You can restart from the point of failure with this command line:

    portmaster audio/logitechmediaserver audio/faad audio/mac devel/yasm audio/sox audio/flac audio/libogg audio/gsm audio/lame audio/libao audio/libid3tag audio/libmad audio/libsndfile audio/libvorbis audio/opusfile audio/opus devel/libltdl

    This command has been saved to /tmp/portmasterfail.txt

    root@LMS:/ #

    any idea how to solve this?

    I did try to do pkg upgrade.

    • Simone Simone 11 Febbraio 2018

      It seems that your port list is not updated. You are using the port for lms 7.9.0 but there is already a port for 7.9.1 Try to First update the ports list.

  3. dwhacks dwhacks 28 Febbraio 2018

    I used your repository to install in a FreeNAS jail. I had to do:
    echo ‘logitechmediaserver_enable=”YES”‘ >> /etc/rc.conf
    service logitechmediaserver start

    To get it to start, and it seems to be working now.

  4. Giorgio Giorgio 15 Marzo 2018

    Many thanks for this!
    is it possible to install it on version 10.3.0.3 – Pilingitam (revisione 4374) ?

    • Simone Simone 15 Marzo 2018

      I think you are using NAS4Free. I’ve never tested on this s.o. but as long it uses pkg (like FreeBSD) as package manager you should be able to install everything. Just try and let me know!

  5. Giorgio Giorgio 15 Marzo 2018

    Sorry for my English
    I’ve tried but it gives me a version error (use version 11)
    I tried with a virtual Nas4free version 11 and it works but I installed the 10 on my nas.
    If you want, I can send you the error. I install a virtual Nas4free with the same version of my real

  6. Giorgio Giorgio 15 Marzo 2018

    This is the error

    pkg: wrong architecture: freebsd:11:x86:64 instead of FreeBSD:10:amd64
    pkg: repository audiodigitale contains packages with wrong ABI: freebsd:11:x86:64

  7. Giorgio Giorgio 15 Marzo 2018

    Resolved
    setenv ABI freebsd:11:x86:64

    • Simone Simone 15 Marzo 2018

      Perfect 😉 Is everything working?

  8. AA AA 26 Marzo 2018

    Thanks for the great tips and instructions!

    Just a note that you can make your life easier if you build against a static Perl installation that is not dependent on ports changes. Just download Perl sources from CPAN (http://www.cpan.org/src/5.0/perl-5.24.3.tar.gz) and install into alternate location, e.g.:
    cd perl-5.24.3
    ./Configure -des -Dprefix=/usr/home/squeezeboxserver/perl-5.24.3-LMS -Dusethreads
    make
    make test
    make install-strip

    Now you can build LMS using this alternate version of Perl with “./buildme.sh -t -p /home/squeezeboxserver/perl-5.24.3-LMS/bin/perl”, and next time you upgrade FreeBSD release, you just need to re-build Perl 5.23.4 as above, and you are good to go! Remember to update the interpreter command in the start-up script and the perl executable in slimserver.pl to /home/squeezeboxserver/perl-5.24.3-LMS/bin/perl.

    BTW, I had a problem building latest CPAN modules, and had to make a change to the buildme.sh script (comment out one patch line:
    #patch -p0 < ../../icu58_patches/digitlst.cpp.patch). You might want to uncomment build IO::Socket::SSL as well if you are planning to ever use Spotty plugin.

    • Simone Simone 26 Marzo 2018

      Thanks for the tips, really useful!

  9. ERIK ERIK 17 Agosto 2018

    Thanks for all of the information. I installed via pkg but run into an error when I try to start the service:
    Starting logitechmediaserver
    The following modules failed to load: DBI EV XML::Parser::Expat JSON::XS Digest::SHA1 YAML::XS Sub::Name

    Any assistance would be greatly appreciated!

    Thanks.

    • Simone Simone 18 Agosto 2018

      Mmm, I have an idea. When you install a package pkg tries to find the dependencies from all the mirrors, if you have multiple mirrors he will choose the one with the last version ofc. Maybe (?) the compiled version of LMS in my repo has some problem with the last version of perl. You can try to uninstall the packages and dependencies that you have installed, comment the link to the official repository and leave only my repository, try to install LMS and only after that restore the the FreeBSD.conf file.
      I will recompile and update every package as soon as possibl, but for the moment try to do this and let me know.

      • ERIK L HOPFENSPERGER ERIK L HOPFENSPERGER 20 Agosto 2018

        I completely removed the FreeBSD repository from the file. I then installed LMS and it is running. I did receive an error when I started the service but I forgot to capture the error before deploying the unit. I will try to grab it next time I am connected to that machine and post it back here. I believe it was a SSL error but am not 100% positive. Thanks for the info on the repo solution!

  10. emi emi 10 Novembre 2019

    > Ports are not constantly updated so I decided to create an installer script which is easy to maintain for my personal use.

    Why not just update the Ports instead? Then everybody will benefit from your work without having to go outside the package manager 🙂

    • Simone Simone 8 Dicembre 2019

      Because with ports you have to compile everything. It take hours and it’s not user friendly at all. This is a quick and functional solution that is way more convenient that I created for myself and shared. And anyone can benefit from it anyway!

  11. Erik Sorensen Erik Sorensen 8 Febbraio 2020

    I installed your package in Freenas 11.2 u7 and had no problems,
    Thank you

  12. Thomas Thomas 12 Febbraio 2020

    installed no problems and i can see the service is running but i cant access the server / webinterface port 9000
    any ideas ?

    • Simone Simone 13 Febbraio 2020

      Are you running LMS in a jail? If so you might need to add a firewall rule to enable port forwarding for port 9000. Let me know!

  13. Thomas Thomas 13 Febbraio 2020

    Rule on my PFSense or in freenas ?
    if PFSense then i dont understand why
    and i cant find any firewallrules in Freenas 🙂

    • Simone Simone 14 Febbraio 2020

      FreeNAS. Have you created the jail using NAT or VNET? Tested right now with VNET and it works

  14. Thomas Thomas 15 Febbraio 2020

    right now i am trying again
    reinstalled Freenas 11.3 last night
    now i choose

    BASIC PROPERTIES

    Name = LMS
    Jail Type= Clone Jail
    Release= 11.3
    DHCP=True
    NAT= False
    VNET=TRUE
    BERKLEY= TRUE
    AUTOSTART=TRUE
    ————–
    JAIL PROPERTIES i dont touch
    ————
    NETWORK PROPERTIES

    host_domainname = My domain.dk
    host_hostname
    lms
    ————–
    CUSTUM PROPERTIES i dont touch
    ————-
    it installs Jail no problem

    I Shell in and rupdate the jail
    root@lms:~ # pkg update
    root@lms:~ # pkg upgrade
    all packages is up to date.
    i install curl
    root@lms:~ # pkg install curl
    i get your script
    root@lms:~ # curl -o /usr/local/bin/lms_installer https://audiodigitale.eu/repo/freebsd/lms_installer
    i chmod the script
    root@#lms:~ # chmod +x /usr/local/bin/lms_installer
    i run the installer
    root@lms:~ # curl -o /usr/l
    option 1= install LMS
    option 2 = 7.9.3
    it install no problems.

    Service -e shows

    Introduction to manual pages: man man
    FreeBSD directory layout: man hier

    Edit /etc/motd to change this login announcement.
    root@lms:~ # service -e
    /etc/rc.d/cleanvar
    /etc/rc.d/netif
    /etc/rc.d/newsyslog
    /etc/rc.d/virecover
    /etc/rc.d/motd
    /urs/local/etc/rc.d/logitechmediaserver
    /etc/rc.d/cron

    i restart the Jail
    and everything checks out again
    LMS is loaded.

    IFCONFIG
    root@lms:~ #
    root@lms:~ # ifconfig
    lo0: flags=8049 metric 0 mtu 16384
    options=680003
    inet6 ::1 prefixlen 128
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
    inet 127.0.0.1 netmask 0xff000000
    nd6 options=21
    groups: lo
    epair0b: flags=8843 metric 0 mtu 9000
    options=8
    ether XX:XX:XX:XX:XX:XX
    hwaddr XX:XX:XX:XX:XX:XX:XX
    inet 192.168.110.100 netmask 0xffffff00 broadcast 192.168.110.255
    nd6 options=1
    media: Ethernet 10Gbase-T (10Gbase-T )
    status: active
    group: epair

    i see no problems.

    and it is working.

    hmm yesterday i used 8.0
    could it be the problem ?

    this is strange

  15. Thomas Thomas 15 Febbraio 2020

    yes the same procedure but with 8.0 do not work.

  16. Thomas Thomas 15 Febbraio 2020

    i restarted the jail 4 times now an now it is working
    sorry to have wasted your time.

  17. Thomas Thomas 15 Febbraio 2020

    For the LMS server to have access to the mountpoint i need to set permissions.
    i am guessing i have to create a user on Freenas
    User = slimserv
    but how about password

    or do you have another idea ?
    \\Thomas

    • Simone Simone 15 Febbraio 2020

      Please Thomas edit the same post otherwise it’s a bit confusing. Now the problem is that you want to mount the storage where your music library is inside the jail right? For this refers to FreeNAS handbook: https://www.ixsystems.com/documentation/freenas/11.2/jails.html?highlight=mountpoint . You can create the user without a password using adduser, just leave it empty. Or you can use pw to add a user, refers to FreeBSD handbook for syntax.

  18. Thomas Thomas 15 Febbraio 2020

    Sorry 🙁 Thanks ill give it a try.
    got patreon or something else for donating ?
    Greets
    Thomas

    • Simone Simone 15 Febbraio 2020

      No problem. At the bottom of the article “SqueezeCore a minimal audio OS” there is the PayPal link. Thanks for support; if the problem persist write here in the comments, we’ll figure out a solution for sure!

  19. Christian Christian 1 Aprile 2020

    Hey Simone,
    thank you so much for this tutorial! Everything works fine so far, except one thing: My SqueezeBox Radio refuses to connect to the new LMS server (version 8), saying that the LMS server needs an update. The version check probably fails. I can still assign an SBox Radio to a particular LMS-Server (I have one per child, so switching them is essential for me) but do you know any workaround? Should I try an older version of the LMS?
    Thanks for you help!

    • Simone Simone 1 Aprile 2020

      Hi Christian. V8.0.0 Is still in beta. Can you please try the stable One? (7.9.3)

  20. Simon Zlachevsky Simon Zlachevsky 1 Aprile 2020

    Thanks for your time, working just fine on a freenas 11.3U1 Jail

    • Ole Johan Ole Johan 23 Aprile 2020

      Simon, how did you do it? I have tried multiple times, but it will not start. After installing I restart the jail, and then tried to load the page http://IPaddress:9000, but nothing shows.

      If I ssh into the jail and try starting og restarting I’m getting error message:
      root@lms:~ # service logitechmediaserver restart
      logitechmediaserver not running? (check /var/run/logitechmediaserver/logitechmediaserver.pid).
      Starting logitechmediaserver.
      sh: /usr/local/share/logitechmediaserver/slimserver.pl: not found
      /usr/local/etc/rc.d/logitechmediaserver: WARNING: failed to start logitechmediaserver

      I can see “slimserver.pl” in the correct place, so something is wrong.

      Can you tell me how you did it?

      BR

      • Simone Simone 25 Aprile 2020

        Hi Ole, I’ve read your comments. Sorry for the late reply but my development server had 1 hard disk failure, I’m waiting for the replacement but due to covid19 the shipping Is pretty slow. In these days I’ll try to use a virtual machine on my laptop to analyze the problem and try to help you. Cheers

  21. Russell Baker Russell Baker 18 Aprile 2020

    Hi Simone
    Trying to install LMS 7.9.3 on 11.3U7

    root@LMS:/ # service logitechmediaserver start
    Starting logitechmediaserver.
    sh: /usr/local/share/logitechmediaserver/slimserver.pl: not found
    /usr/local/etc/rc.d/logitechmediaserver: WARNING: failed to start logitechmediaserver

    root@LMS:/ # ls -l /usr/local/share/logitechmediaserver/slimserver.pl
    -rwxr-xr-x 1 slimserv slimserv 33040 Feb 29 11:28 /usr/local/share/logitechmediaserver/slimserver.pl

    Any ideas?

    • Russell Baker Russell Baker 19 Aprile 2020

      Of course I meant FreeNAS 11.3U2, NOT 11.3U7 (which is not out yet!)

    • Simone Simone 25 Aprile 2020

      Hi Russel, in these days I’ll try to use a virtual machine to help you to debug this problem. Please be patient. Cheers, Simone.

    • Simone Simone 26 Aprile 2020

      Russel, what method have you used to install LMS? Compiled or with my script?

      • Russell Baker Russell Baker 2 Maggio 2020

        Your script. Apologies getting back to you, I did not receive a notification

        • Simone Simone 3 Maggio 2020

          Ok, I just updated my FreeNAS version on VM to match your version. 11.3U2. Created a new jail and used lms_installer, everything went buttery smooth. Analyzing your problem: you cannot start logitechmediaserver with “start” you shall use “onestart” if you want to start it manually. the lms_installer verison is updated? The jail was a new one ? What Perl version have you installed?

          • Russell Baker Russell Baker 4 Maggio 2020

            No I don’t want to start it manually, I want it to auto-start with the jail. I was just showing you the error
            lms_installer is updated? Yes, downloaded (again) today
            Jail was a new one? Yes, created (again) today. Add basejail 11.3-RELEASE-p7

            What Perl version have you installed?
            root@Squeeze:/ # perl -v
            This is perl 5, version 30, subversion 2 (v5.30.2) built for amd64-freebsd-thread-multi
            As installed by your lms_installer

            Same error as before:
            root@Squeeze:/ # service logitechmediaserver start
            Starting logitechmediaserver.
            sh: /usr/local/share/logitechmediaserver/slimserver.pl: not found
            /usr/local/etc/rc.d/logitechmediaserver: WARNING: failed to start logitechmediaserver

          • Simone Simone 15 Maggio 2020

            This is so strange. And this error happened to me some yrs ago, and if you look to some forums someone else had and no one have debugged it deeply. First of all do you have both perl5.30.2 and perl in /usr/local/bin?

          • Russell Baker Russell Baker 18 Maggio 2020

            root@SqueezeTest:/ # ls -l /usr/local/bin/perl*
            -rwxr-xr-x 1 root wheel 7824 Apr 23 09:18 /usr/local/bin/perl
            lrwxr-xr-x 1 root wheel 4 Apr 23 09:18 /usr/local/bin/perl5.30.2 -> perl
            -rwxr-xr-x 2 root wheel 45824 Apr 23 09:18 /usr/local/bin/perlbug
            -rwxr-xr-x 1 root wheel 274 Apr 23 09:18 /usr/local/bin/perldoc
            -rwxr-xr-x 1 root wheel 10831 Apr 23 09:18 /usr/local/bin/perlivp
            -rwxr-xr-x 2 root wheel 45824 Apr 23 09:18 /usr/local/bin/perlthanks

            I have managed to setup LMS 7.9.2 in a jail using ports using:
            echo “DEFAULT_VERSIONS=perl5=5.28” > /etc/make.conf
            setenv ALLOW_UNSUPPORTED_SYSTEM 1
            Unfortunately, I couldn’t get ALAC decoding to work, so it is of no use + your script would/should allow me to upgrade much more easily

            There was also an SSL error: Async::HTTP: Unable to load IO::Socket::SSL
            which I tried to resolve with: pkg install p5-IO-Socket-SSL-2.0 eg. 67
            Sadly this overwrote the version of perl so that LMS would no longer work afterwards

          • Simone Simone 18 Maggio 2020

            Compiling with ports is just a tremendous waste of time because everytime some new problem appears. It’s definetly a perl linking problem imo. Try to check symlinks in /usr/bin/.
            ln -s -f /usr/local/bin/perl5.30.2 /usr/bin/perl5
            ln -s -f /usr/local/bin/perl5.30.2 /usr/bin/perl
            If you want, since the comment section is becoming big we can continue with email info@audiodigitale.eu. Once we find the solution I’ll update directly the article (and lms_installer if needed)

  22. Ole Johan Ole Johan 21 Aprile 2020

    Hello! This seems great, but I’m not finding the server. I’m on FreeNAS-11.3-U1 and have used your script. After installing I have restarted the jail, and then tried to load the page http://IPaddress:9000

    root@lms:~ # service logitechmediaserver restart
    logitechmediaserver not running? (check /var/run/logitechmediaserver/logitechmediaserver.pid).
    Starting logitechmediaserver.
    sh: /usr/local/share/logitechmediaserver/slimserver.pl: not found
    /usr/local/etc/rc.d/logitechmediaserver: WARNING: failed to start logitechmediaserver

    Am I missing something or is there a bug in the script?

    Best regard!

  23. Ben McNally Ben McNally 23 Aprile 2020

    This is fantastic – thank you so much!

    I’ve a fresh install of FreeNas 11.3-U2 (was previously on 9.10 for the longest time). I needed to put LMS back on, and tried to go the ports route “to be clean”. Well, after literally several hours of pressing return for config choices that I don’t understand and then watching the compiler do it’s thing, of course it crashes out.

    So then I admit defeat and try the “Package Built By Me” instructions. Ha! It took just a couple of minutes and worked perfectly first time. I might have known!

    So, thanks again for providing this software to the community and keeping my five Squeezebox devices alive.

    • Simone Simone 25 Aprile 2020

      Hey Ben, I’m glad It worked for you and I really appreciate your feedback, the updater Is still in beta so every feedback Is precious. I haven’t upload any update in these days due to a hard disk failure on my development server, once the replacement arrives I’ll continue to update LMS regularly. Have a nice day!

  24. Ole Johan Ole Johan 25 Aprile 2020

    Well, I managed to find the solution following another thread lms-on-freenas.61495/post-582588 on ixsystems. I had to install perl5.28. I haven’t yet tried your script because I installed this with ports, but I think this is the missing piece.

    root@lms:~ #portmaster lang/perl5.28

    Best regards

    • Simone Simone 26 Aprile 2020

      Yes, often wrong Perl version cause errors. I usually use always the most updated One.
      Regards

  25. Thomas Szücs Thomas Szücs 31 Maggio 2020

    Hi, there is a plugin called DSDPlayer for playing .dsf files. It uses a .exe called dsdplay which I don’t think exists for FreeBSD. Think it uses https://github.com/SqueezeOnArch/dsdplay
    Would it be possible to get this working on FreeBSD af well?

    • Simone Simone 31 Maggio 2020

      Lms do not reproduce files. It sends file to the client (can be squeezelite or a squeezebox). If the client can reproduce dsd no need for plugin. If the client cannot play dsd you can use C-3PO as a plugin to convert them to PCM

      • Thomas Szücs Thomas Szücs 31 Maggio 2020

        DSDPlayer is an official plugin that can be installed from the Server, but does not work with FreeBSD because of the missing .exe. DSDPlayer can do DOP (DSF over PCM)
        I did find a compiled dsdplay for FreeBSD on https://sourceforge.net/projects/lmsclients/files/utility/ and got the plugin working properly.
        Maybe C-3PO does something simular.

  26. Konrad Konrad 27 Giugno 2020

    When trying to install lms_installer in freenas 11.3 jail I get ‘/usr/local/bin/lms_installer: 1: Syntax error: newline unexpected (expecting word)’ message. Where should I look for the error?

  27. Shane Shane 13 Luglio 2020

    Hi, same problem as others have stated.

    root@LMS:~ # service logitechmediaserver onestart
    Starting logitechmediaserver.
    sh: /usr/local/share/logitechmediaserver/slimserver.pl: not found
    /usr/local/etc/rc.d/logitechmediaserver: WARNING: failed to start logitechmediaserver
    root@LMS:~ #

    • Simone Simone 13 Luglio 2020

      Use a clone jail

    • Simone Simone 15 Luglio 2020

      please check the update. I’ve solved this problem for every kind of jails

  28. Russell Baker Russell Baker 15 Luglio 2020

    Have you solved it for FreeNAS basejail’s?

    • Simone Simone 15 Luglio 2020

      Yes. Can you please try and let me know?

  29. Russell Baker Russell Baker 15 Luglio 2020

    Have been running Squeezebox server 7.9.3 in a CLONE jail since April due to the Perl links not working on a base jail’s read-only filesystem. Now lms_installer works on a base jail too. Mp3 streaming and MySqueezebox.com works fine. I do not trancode flac or alac format files – so have not tested those. Created a read-only mount point for music folder (iocage/jails/Squeeze/root/media/music) and a read-write mount point for Squeezebox configuration data (iocage/jails/Squeeze/root/var/db/logitechmediaserver). Thanks Simone, great work

    • Simone Simone 15 Luglio 2020

      Thanks a lot for your feedback 😉

    • Simone Simone 31 Agosto 2020

      just released a new update. Can you try it?

    • Mark Mark 30 Ottobre 2020

      How did you get it installed in v11.4? I tried both 11.3 and an 11.4 jails. Neither one would work using the script option at the top of this page. The error I would get back was “Your O.S. version is currently not supported!” and it would exit out after checking for a new version.

      • Simone Simone 30 Ottobre 2020

        Hi Mark!
        Since the last update I dropped the support for FreeBSD 11.*. It involved too much work on my side to maintain multiple versions. Since both Free as and Xigmanas are on 12.* And FreeBSD Is at 12.2 I decided to maintain everything only for 12.*. So if you want It to work please update your installation

  30. Juhani Miettunen Juhani Miettunen 31 Agosto 2020

    Problem solved. I installed flac and faad2 packages and copied the binaries to LMS Bin directory.

    • Simone Simone 31 Agosto 2020

      Thanks for reaching me out. I’ll compile new binaries and publish an update

  31. craigduncan craigduncan 19 Ottobre 2020

    Hi there
    Unlike others I am not using FreeNAS (although I did years ago but NAS4Free (or Xigmanas as it is now called.
    I tried your first pkg method but also got this error when trying to start lms;

    The following modules failed to load: DBI EV XML::Parser::Expat HTML::Parser JSON::XS Digest::SHA1 YAML::XS Sub::Name

    I noted you responding to someone else having this error but could not understand your evxplanation of how to fix it.

    Could you please re-iterate thisin more specific terms?

    Many thanks

    Craig Duncan.

    • Simone Simone 19 Ottobre 2020

      The answer you might have found in the comment section was referring to an older and deprecated method to install it. Can you confirm that you have used lms_installer to install LMS? Can you write here your specific version of the OS that you are using so that I can install it in a VM and test It by myself?

  32. craigduncanphotography craigduncanphotography 19 Ottobre 2020

    Thank you Simone for your response!

    I am running XigmaNAS 12.1.0.4.7728 released (FreeBSD 12.1-RELEASE-P8)

    https://www.xigmanas.com/forums/viewtopic.php?f=78&t=15474

    However I am using on of the One Button Installer (https://www.xigmanas.com/forums/viewtopic.php?f=71&t=11189) installed plugins,
    Bastille (https://www.xigmanas.com/forums/viewtopic.php?f=71&t=14848)
    to create a jail (lms) and then through terminal from root@lms I have followed your instructions.

    many thanks for any feedback!

    • Simone Simone 19 Ottobre 2020

      Ok perfect, thanks for the detailed answer. Tomorrow I’ll use your procedure using Xigmanas and Bastille and I’ll try to debug the error. Please patient 1 or 2 days and I’ll find a solution

    • Simone Simone 21 Ottobre 2020

      Hi craig, don’t worry I’m working on It and I’ve already found the reason why you got that error (and I got It on standard freeBSD too). It’s because Perl was updated in these last weeks and LMS Is not compatibile with the latest version of Perl (some module at least). So, since I don’t wanna encounter again this kind of problem I’m preparing the next release with all the Perl modules used by LMS updated (some of them are out of date by more than 10 years in the official repository) and with a local compiled Perl that Will be shipped togerher with the lms installation, in this way I can totally remove the Perl version variable. It’s a bit more work on my side but it’s worth

  33. craigduncanphotography craigduncanphotography 21 Ottobre 2020

    Out of interest which version of perl does work and with which version of lms?

    • Simone Simone 21 Ottobre 2020

      AFAIK Perl 5.20. But I’m facing this issue since years ago. Every time a new version of perl comes out everything about LMS become broken, and every time I have to lose days to fix. Now I prefer to lose some days now but to make the installation completely Independent from the Perl version installed on the system

    • Simone Simone 23 Ottobre 2020

      Please can you try now? I published the update

  34. craigduncanphotography craigduncanphotography 23 Ottobre 2020

    Wow! Thanks!
    It all seemed to install great however I’m not able to login through the lms ip:9000
    Any suggestions?

    Thanks again!

  35. craigduncanphotography craigduncanphotography 23 Ottobre 2020

    Forget that!
    I had the wrong ip address!!!!
    I’m at the gui now – well done!!!!!

  36. craigduncanphotography craigduncanphotography 23 Ottobre 2020

    Getting stuck with directing the setup to my nas music share…..from the lms jail????

    • Simone Simone 23 Ottobre 2020

      Wait what do you mean by “directing the setup to my Nas music share”?

  37. craigduncanphotography craigduncanphotography 26 Ottobre 2020

    Don’t worry Simone – a few extra tweaks but but beatly there…
    Very many thanks for your help on this!

  38. Matthias Matthias 18 Gennaio 2021

    Hey Simone,

    your project looks very promising. I wanted to switch to your solution from an existing setup running on my raspberry pi. I used your script and it runs fine at first, but after about a day the service gets killed. In normal operation I see a prcess by user slimserv with file /usr/local/lm [gets cut here by width limitation of the shell in the browser] which disappears in case of a not working jail.

    Regards,
    Matthias

    • Simone Simone 18 Gennaio 2021

      Hi Mathias, I didn’t quite understand the last sentence “which disappears in case of a not working jail”. Ofc, if the jails is not working then lms doesn’t start, can you please be more specific so that I can help you?

      • Matthias Matthias 19 Gennaio 2021

        Hi, the jail is still running, but the service lms inside it gets killed.

          • Matthias Matthias 21 Gennaio 2021

            where is this located?

          • Simone Simone 23 Gennaio 2021

            Have you updated? Is everything working?

  39. Steve Dowey Steve Dowey 24 Gennaio 2021

    Hi Simone,

    Fantastic script, it works flawlessly. However, if you could it would be useful if you add some descriptions for beginners, expecially on the description of using the script. These might sound like something everyone would know but it might be useful to state them explicitly. For example, using TrueNas GUI you should create a Jail first (this is like a VM or sandbox OS I guess) running the FreeBSD 12.x and run the commands from there. You should use the defualts and choose NAT and VNET. Also autostart and tcp port 9000 fwding.

    I know that most people will be able to figure out mounting (and making permanent?) the mount for their music files but I’m not able to yet. I have used PiCorePlayer with LMS and moved the music store to NFS on my NAS -that all works and I love the pCP interface. But I’m trying to have LMS on the NAS too and the command line is a little daunting when you know about the music you want to listen to and less about the hardware,
    Thanks again,
    Steve

    • Simone Simone 24 Gennaio 2021

      Hi Steve!
      Nice tip, I’ll add a section in the guide marked as “For beginner in TrueNas” to better explain step by step the whole procedure.
      I’ll do it at the end of the month / beginning of February since in the next week I’ll be pretty busy and I need time to setup a VM for TrueNas (I run LMS in a jail on FreeBSD, I don’t use TrueNas).
      Thanks again,
      Simone

  40. Steve Dowey Steve Dowey 24 Gennaio 2021

    Hi Simone,
    Thanks for the quick reply. I am using TrueNAS core. I have looked again more carefully and the mounts can be all set up from the Jail GUI. In fact all the configuration of the Jail can be done from the GUI. I think the only other issues beginners will face are down to the ACL (access control lists) but that could be more about windows and CIFS rather than NFS.
    I’ve set up my /mnt/store/music folder (source) on the NAS to be mapped read only using the GUI to /mnt/store/iocage/jails/lms/root/media/music. Added playlists as Read/Write. All of this can be done with the jail stopped and no need to access the command line apart from running your script following the instructions given.
    Then to turn on Material Skin 🙂
    Best Regards,
    Steve

    • Steve Dowey Steve Dowey 24 Gennaio 2021

      Just more stuff… Initial fault: picoreplayer was not visible in LMS as an available player.

      I have a picoreplayer (called picoreplayer) running squeezelite on a seperate subnet. I did this next step at the same time so I’m not sure if the squeezelite setting is crucial or not. However I have opened up port 3483 and 9090 on the Jail and set the squeezelite to use the specifiic LMS IP address (without port as 3483 seems default). when I did this (and restarted the jail as settings can’t be changed when it’s running) the picoreplayer was picked up by LMS immediately.
      Steve

  41. RobTheGob RobTheGob 20 Maggio 2021

    Worked great! It’s the first step in moving from my old OS X based Squeezebox Server…

    Thank you from the west coast of Canada!

    • Simone Simone 20 Maggio 2021

      Thanks for the feedback! Appreciated! Cheers from Italy

  42. Guillaume Guillaume 1 Giugno 2021

    Hello, it’s kinda weird, here it only install LMS 8.1.2. i have only use the commands listed first.

    • Simone Simone 1 Giugno 2021

      It’s right. What Is the problem?

  43. Max Max 1 Luglio 2021

    Ciao Simone
    I’ve installed the script on Truenas 12.2 in jail called LMS. IP:9000 shows the server, very nice. BUT… then I add a subdirectory in /media, let’s call it “music” and I can choose it in LMS. Of course it’s empty, since I haven’t set a mount point.

    As soon as I set the mount point in Truenas GUI, the subdirectory “music” is invisible. Not when I SSH into the jail. There it shows everything correctly. So I guess I made a mistake with the permissions. But I don’t get it together. Do I have to create a user with a certain PID? Any suggestions?

    Thank you

    • Simone Simone 1 Luglio 2021

      Hi Max. UID and GID of the owner on the host must match UID and GID of slimserv in the jail. So check what are the UID and GID of the folder you want to mount on the host. Then log in the jail, and edit the UID and GID of the slimserv user (/etc/passwd and /etc/groups) to match the ones in the host

  44. Max Max 1 Luglio 2021

    Thanks for your fast response!

    The slimserv id showed me 104. So I created a user slimserv with id 104 in Truenas and added this user in the ACL list in the music share.

    But still, it won’t show me the folder. Sorry for beeing so stupid. Do I have to change the uid in /etc/passwd from 104 to match the directory? And rename the user? /etc/groups is empty in my jail.

    • Simone Simone 1 Luglio 2021

      No, I told you to do the opposite!
      Check on TrueNas which user own the share, write down its UID and GID (for ex UID:1000 GID:1000).
      Then log into the LMS Jail and change slimserv UID and GID from 104 to 1000 (in this example)

      • Max Max 2 Luglio 2021

        I did that. Changed in /etc/passwd and /etc/master.passwd and /etc/group all 104 to 1000 (the owner). I only changed the number, not the owner name. So it still slimserv. When I do id slimserv, it still shows 104…

        Just wanted to report back. Thanks for your effort, but I don’t want to waste your time. I’m sure, I messed something up.

        • Simone Simone 2 Luglio 2021

          Thats very weird. Anyway you can Always share the storage via smb or nfs and then mount it in the jail

  45. Guillaume Guillaume 2 Luglio 2021

    Oh, i’m an idiot, i dunno why i thought the latest version of LMS was 9.*

  46. Tony M Tony M 28 Gennaio 2022

    Hello, grazie for all the work putting this together! I’ve been using your script for awhile now and just noticed a possible bug. I was having random files not playing on my Duet and found that when flac files need to be transcoded flac was throwing an error:

    ld-elf.so.1: /usr/local/share/logitechmediaserver/Bin/flac: Undefined symbol “srand@FBSD_1.6”

    I got around this by installing flac via pkg and replacing the flac in /usr/local/share/logitechmediaserver/Bin with a soft link to /usr/local/bin/flac

    System info:

    FreeBSD lms 12.2-RELEASE-p11 FreeBSD 12.2-RELEASE-p11 75566f060d4(HEAD) TRUENAS amd64

    Current logitechmediaserver version: 01-10-2021. No updates available!

    • Simone Simone 20 Aprile 2022

      Can you please retry with the latest update? Let me know thanks

    • rbeltran rbeltran 4 Aprile 2023

      Hello, many thanks for this, i have installed your script in Xigmanas 12.3.0.4, and it is working with Logitechmediaserver 8.4.0. Nevertheless, with the same “flac” issue (, i made what you say and all the songs are working now.

      This is the error on my system:

      root@LMS:/usr/local/bin # ld-elf.so.1: /usr/local/share/logitechmediaserver/Bin/flac: Undefined symbol “srand@FBSD_1.6” ld-elf.so.1:

      /usr/local/share/logitechmediaserver/Bin/flac: Undefined symbol “srand@FBSD_1.6” ld-elf.so.1:

      • Simone Simone 6 Aprile 2023

        Mmm really weird. I’ll look into it using a vm with xigmanas so that I can reproduce your setup. It might take me some time. (Thx for the donation, really appreciated)

      • Simone Simone 22 Aprile 2023

        Can you post the output of “ldd /usr/local/share/logitechmediaserver/Bin/flac” ?

        • Rodrigo Rodrigo 23 Dicembre 2023

          Hi Simone,

          Sorry for the lag:

          xigmanas: ~# ldd /usr/local/share/logitechmediaserver/Bin/flac
          ldd: /usr/local/share/logitechmediaserver/Bin/flac: No such file or directory
          xigmanas: ~#

      • Simone Simone 23 Aprile 2023

        I just uploaded a new version with flac 1.4.2 compiled on Fbsd 12. Would you kindly check if everything is working for you?

        • Rodrigo Rodrigo 23 Dicembre 2023

          Hi Simone,

          This is with your new version, thank you very much:

          root@LMS:~ # ldd /usr/local/share/logitechmediaserver/Bin/flac
          /usr/local/share/logitechmediaserver/Bin/flac:
          libm.so.5 => /lib/libm.so.5 (0x801061000)
          libc.so.7 => /lib/libc.so.7 (0x80109d000)

  47. Kim Kim 1 Novembre 2023

    Hi and thanks for making this lms_installer. Is it possible to update it for Freebsd 14

  48. Rodrigo Rodrigo 24 Dicembre 2023

    Hi Simome,

    I have a new issue, i have deployed the jail with DHCP, and i think the rc.conf is starting logitechmediaserver before the network, so it fail, this is the message log:

    /etc/rc: WARNING: failed to start logitechmediaserver

    After that if i enter to the jail and do “service logitechmediaserver start” it start and work normaly.

  49. Frank Rockett Frank Rockett 6 Febbraio 2024

    Hi Simome.
    Thank you for this wonderful software. I just learned some bad news, that Logitech are closing down mysqueezebox.com. The announcement is here, together with information on how the latest version of LMS should be modified.
    https://forums.slimdevices.com/forum/user-forums/general-discussion/1668327-uesmartradio-com-and-mysqueezebox-com-servers

    I wonder if you can upload a new LMS that is ready for this change please?

    Also, I am a complete beginner with FreeBSD and the CLI, so I would be very grateful if you can explain for a beginner exactly how and where to use the ‘pkg’ command to update LMS to the latest version, once you have uploaded it please? Thank you so very much!!

Rispondi

Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.

%d blogger hanno fatto clic su Mi Piace per questo: