Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 8 of 8
  1. #1

    LMS in Docker on RPi

    Looking at running LMS in Docker on an existing RPi that already has Libreelec installed.

    I've got Docker installed and successfully runs Hello World.

    Looking for the 'best' LMS RPi container. Which one is most widely used?

    Then looking for some step-by-step guides for configuring the RPi and the Docker start commands for the LMS container to mount my music which will be shared via NFS off a NAS.

    Any good guides out there? (I found lots for setting up Docker, but none on the LMS containers)

    Thanks.

  2. #2
    So I started to jump into trying to get LMS running in a Docker container on a RPi already running Libreelec (Kodi).

    I found this guide: https://cwilko.github.io/home%20auto...me-Server.html

    Following this I got Docker installed via the Libreelec Addon method and got the basic Hello World working.

    I found a couple of LMS Container images:
    Larsks image: https://hub.docker.com/r/larsks/logitech-media-server/
    justifiably image: https://hub.docker.com/r/justifiably...chmediaserver/

    I've tried to follow their indicated docker run commands - but can't seem to get the container to stay up, and I can't get any errors or logs to help my next steps.

    For Larsks image I dropped the port 9090 mapping as that conflicts with Libreelec CLI port (so maybe this is not the best image to run with Libreelec ?)
    justifiably run command would complete, but then the container doesn't appear to be running and definitely nothing at the LMS port 9000 running.

    Anyone got some basic Docker LMS container setup/debug steps?

    Edit: Looks like the LMS container is exiting with Exit Code 1, which apparently means not enough memory. The RPi 3 B+ has 1GB RAM (with the Libreelec build allocating 256MB to GPU and 768MB to system). Looks like there's around 600MB free when Libreelec is running.
    Has anyone run both Libreelec and LMS on a RPi3 B+ - I'm starting to wonder if it's big enough to run the 2 programs.

    Thanks.
    Last edited by kidhazy; 2019-07-14 at 04:46.

  3. #3
    Found some further instructions here https://forum.libreelec.tv/thread/24...cker/?pageNo=2
    with pointer to a RPi container https://github.com/chwba/docker-logi...diaserver-rpi2

    This has got me with a basic LMS running. Now to get music mounted, etc and have it all come up at each reboot.

  4. #4

    Any preferred Docker Container Image for RPi?

    Playing along with LMS in a container on a RPi.

    Seems to be various pre-built containers out there, and others that can be rebuilt for the RPi (ARM) environment. Some on 'stable' 7.9 releases, others pulling the nightly builds.

    Any 'preferred' prebuilt image for LMS 7.9.2 nightlies for RPi that people are using?

    I've tried:
    - a rebuild of larsks/logitech-media-server for ARM
    - chwba/docker-logitechmediaserver-rpi2 - lots of installation steps (scripted though)
    - doliana/logitech-media-server which appears to be prebuilt image based on

    Would ideally like a prebuilt image for RPi (ARM) on nightly 7.9.2. I haven't tried to manually install ShairTunes2W, but would be good if that's installed/supported.

    What have others found to be the best (for their circumstances) ?

  5. #5
    Senior Member
    Join Date
    Sep 2009
    Location
    Norway
    Posts
    198
    Hi kidhazy

    It looks like you're doing some pioneer work here. Thank you for letting us know about it. I hope you keep posting.

    Best regards,
    Claus

  6. #6
    Senior Member
    Join Date
    Apr 2008
    Location
    Paris, France
    Posts
    2,209
    I don't know about the prebuilt images, I remember looking at Larsks, perhaps at another one. I didn't like either much, don't remember why.

    I've built my own, it was rather a hack of a job but I would say this:
    - Either use something like debian or ubuntu as an OS, and rely on /etc/default, init scripts and squeezeboxserver_safe
    - Or use a lighter base image and edit the entrypoint to something like /usr/bin/perl /usr/sbin/squeezeboxserver
    The first case is like a VM or a native OS. The second case does away with any process management, so you can use Docker's health management utilities to take care of starting/restarting the daemon (which is preferable I think)
    3 SB 3 • Libratone Loop, Zipp Mini • iPeng (iPhone + iPad) • LMS 7.9 (linux) with plugins: CD Player, WaveInput, Triode's BBC iPlayer by bpa • IRBlaster by Gwendesign (Felix) • Server Power Control by Gordon Harris • Smart Mix, Music Walk With Me, What Was That Tune? by Michael Herger • PowerSave by Jason Holtzapple • Song Info, Song Lyrics by Erland Isaksson • AirPlay Bridge by philippe_44 • WeatherTime by Martin Rehfeld • Auto Dim Display, SaverSwitcher, ContextMenu by Peter Watkins.

  7. #7
    FYI, here's what I've ended up using in my scenario for running LMS in Docker on a RPi also running LibreELEC.

    I've started to use doliana's pre-built RPi logitech-media-server image: https://hub.docker.com/r/doliana/logitech-media-server on my RPi.
    This image indicates it's updated weekly from the LMS nightlies and appears to be based on info/images/support of larsks and RaymondMouthaan, and you can use different tags to use different images (eg. 7.9.0)

    Steps:
    1. Install Docker via LibreELEC/Kodi Addon
    2. ssh into LibreELEC box
    3. Pull down the docker image: docker pull doliana/logitech-media-server:latest-7.9.2
    4. You need to 'link' persistent storage with the directories within the container for the LMS configuration, and your music.
    5. In my RPI/LibreELEC configuration:
    - LMS config and prefs will be stored at: /storage/.kodi/userdata/Apps/LMS
    - music stored at: /media/Music
    6. Start the Docker container:
    Code:
    docker run -d \
               -p 9000:9000 \
               -p 3483:3483 \
               -p 3483:3483/udp \
               -e TZ=Australia/Melbourne \
               -v /storage/.kodi/userdata/Apps/LMS:/srv/squeezebox \
                -v  /media/Music:/srv/music \
             doliana/logitech-media-server:latest-7.9.2
    7. Access the LMS at http://<RPI ID Address>:9000

    Additional steps were to create a system service so that the Docker container can be automatically started at each reboot.
    1. cd /storage/.kodi/addons/service.system.docker/examples/
    2. Create logitech-media-server.service
    Code:
    [Unit] 
    Description=logitechmediaserver-rpi2 container
    Requires=service.system.docker.service 
    After=service.system.docker.service
    
    [Service]
    Restart=always
    RestartSec=10s
    TimeoutStartSec=0
    ExecStartPre=-/bin/sh -c "mkdir -p /storage/.kodi/userdata/Apps/LMS"
    ExecStart=/storage/.kodi/addons/service.system.docker/bin/docker run \
    --rm \
    --name=logitech-media-server \
    --hostname=libreelec-logitech-media-server \
    -p 9000:9000 \
    -p 3483:3483 \
    -p 3483:3483/udp \
    -e TZ=Australia/Melbourne \
    -v /storage/.kodi/userdata/Apps/LMS:/srv/squeezebox \
    -v  /media/Music:/srv/music \
    doliana/logitech-media-server:latest-7.9.2
    ExecStop=/storage/.kodi/addons/service.system.docker/bin/docker stop logitechmediaserver
    
    [Install] 
    WantedBy=multi-user.target
    3. Enable created service: systemctl enable $PWD/logitech-media-server.service
    4. Start service: systemctl start logitech-media-server

    Commands that may come in handy if things need cleaning up:
    • Stop the LMS Service: systemctl stop logitech-media-server
    • Disable LMS Service: systemctl disable logitech-media-server
    • List ALL containers (running and stopped): docker container ls -a
    • Stop a specific Docker container: docker stop <containerid-4chars>
    • Remove container: docker container rm <container-id 4 char>
    • List images: docker image ls
    • Remove images: docker image rm <image-id 4char>


    With this environment, I've been able to install addons: Spotty, Material and PlayHLS all working.

  8. #8
    Senior Member
    Join Date
    Nov 2015
    Location
    Near Buffalo, NY
    Posts
    183
    Quote Originally Posted by kidhazy View Post
    FYI, here's what I've ended up using in my scenario for running LMS in Docker on a RPi also running LibreELEC.
    ...
    With this environment, I've been able to install addons: Spotty, Material and PlayHLS all working.
    AWESOME! This is terrific information you've included here!

    I just decided to look into using docker for LMS and this is one of the first links to come up in G.

    Definitely going to give it a try. Thanks for posting this!!!
    Player: 1 x Transporter w/Trans-knob, 2 x Touch (Active, 3 x Spares), 4 x Boom (Active, 9 x Spares)
    Server: 1 x Win Server (ESXi 6.x) w/LMS, 1 x HP 24" Touch Screen PC w/LMS & SqueezePlay
    Control: 4 x w/iPeng, 1 x Samsung Note 4, 3ea x Fire 7", 8” tablets, 1 x 10" all w/SqueezeCtrl & Player (Angry Goat)
    Audio: Mark Levinson 23.5 Amp, 380s Pre, 390s CD, B&W 801 II, Acoustic Energy AE-2 signature, SOTA Sapphire table

    Computer geek/tech hoarder(!), and DAMN I love the LMS/Squeeze infrastructure!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •