Categories
Linux Logitech Media Server Raspberry Pi

Common Logitech Media Server (LMS) Commands

I’ve tried multiple self-hosted audio streaming options including: Ampache, Airsonic, Mopidy, Volumio and more.

However, I always come back to Logitech Media Server.
In my opinion, it’s the best for streaming your audio to your desk (It’s not so great for taking your tunes with you.)

I’m always tinkering or trying out new Logitech Media Server installs, and this is an accumulated Cheat Sheet of Linux/Raspberry Pi commands that I’ve used over the years.

Start, Stop, and Restart LMS

  • sudo service logitechmediaserver start
  • sudo service logitechmediaserver stop
  • sudo service logitechmediaserver restart

Get proper ownership of the main LMS directory

  • sudo chown squeezeboxserver -R /var/lib/squeezeboxserver/

Backup your LMS files

  • sudo cp -r /var/lib/squeezeboxserver MyBackupDirectory

Restore your LMS files

  • sudo service logitechmediaserver stop
  • cd MyBackupDirectory
  • sudo cp -r squeezeboxserver /var/lib/
  • sudo chown squeezeboxserver -R /var/lib/squeezeboxserver/
  • sudo service logitechmediaserver start

Need to copy your favorites back over and the “OPML Playlist Browser & Editor” isn’t cooperating?

CD to the folder where your backup is and use these commands

  • sudo service logitechmediaserver stop
  • sudo cp favorites.opml /var/lib/squeezeboxserver/prefs
  • sudo chown squeezeboxserver /var/lib/squeezeboxserver/prefs/favorites.opml
  • sudo service logitechmediaserver start

Restore just your plugins

  • sudo service logitechmediaserver stop
  • cd MyBackupDirectory/squeezeboxserver/cache/Installed Plugins
  • sudo cp -r Plugins /var/lib/squeezeboxserver/cache/InstalledPlugins/
  • sudo chown squeezeboxserver -R /var/lib/squeezeboxserver/
  • sudo service logitechmediaserver start

Installed a plugin and LMS won’t start?

  • sudo service logitechmediaserver stop
  • cd /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins
    sudo rm -r MyBadPlugin
  • sudo service logitechmediaserver start

Want to start over without reinstalling?

  • sudo service logitechmediaserver stop
  • cd /var/lib/squeezeboxserver/cache
  • sudo rm *.db
    • If you’d like to verify that you are deleting the correct db first, try this: echo sudo rm *.db which shows which db will be deleted or sudo rm -i *.db which will prompt you to delete the db before it happens.
  • sudo service logitechmediaserver start

Delete everything

  • sudo rm -r /var/lib/squeezeboxserver
  • sudo rm -r /etc/squeezeboxserver

4 replies on “Common Logitech Media Server (LMS) Commands”

Great over – thanks a lot! Regarding cache I would recommend also to delete the *.wal files

“Write Ahead Logging” files used by the database storing LMS music

Many thanks – this is a most helpful summary of all the commands you need to get out of trouble ! Might be worth putting a ‘check you are in the correct directory with a pwd’ before issuing a ‘sudo rm*.db’ command. The unwary might expect an undo function having mistyped the ‘cd’ command. (Never happened to me of course 😉

Leave a Reply

Your email address will not be published. Required fields are marked *