Skip to content
Lightweight Music Server. Access your self-hosted music using a web interface.
C++ Makefile Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
docroot Slightly better UI looking Jun 19, 2019
systemd Updated README. lms.conf and lms.service are not longer installed by … Aug 10, 2019
tools Fix tools/checks builds Jul 30, 2019
AUTHORS Updated documentation Sep 30, 2014
COPYING Initial import from SVN Mar 9, 2014
ChangeLog Initial import from SVN Mar 9, 2014
INSTALL Initial import from SVN Mar 9, 2014 Updated README. lms.conf and lms.service are not longer installed by … Aug 10, 2019
NEWS Initial import from SVN Mar 9, 2014
README Restored README to mahe autoreconf happy Sep 4, 2015 Updated README Aug 10, 2019

LMS - Lightweight Music Server

LMS is a self-hosted music streaming software: access your music collection from anywhere using a web interface!

A demo instance is available, with the following limitations:

  • Settings cannot be saved
  • No persistent playqueue
  • No administration panel

Main features

  • Low memory requirement (the demo instance runs on a Raspberry Pi3B+, using less than 10% of total memory even when transcoding)
  • User management
  • Recommendation engine
  • Audio transcode for maximum interoperability and low bandwith requirements
  • Persistent play queue across sessions
  • Subsonic API
  • Album artist
  • Multi-value tags: artists, genres, ...
  • Custom tags (ex: mood, genre, albummood, albumgrouping, ...)
  • MusicBrainzID support to handle duplicated artist and release names
  • Playlists, (only using Subsonic API for now)
  • Starred Album/Artist/Tracks (only using Subsonic API for now)
  • Systemd integration

Recommendation engine

LMS provides several ways to help you find the music you like:

  • Tag-based filters (ex: Rock, Metal and Aggressive, Electronic and Relaxed, ...)
  • Recommendations for similar artists and albums
  • Radio mode
  • Searches in album, artist and track names
  • Most played/Recently added music

The recommendation engine makes use of Self-Organizing Maps.

  • constructing the map requires significant computation time on large collections (ex: half an hour for 40k tracks)
  • audio data is pulled from AcousticBrainz. Therefore your music files must contain the MusicBrainz Identifier for the recommendation engine to work properly (otherwise, only tag-based recommendations are provided)

Subsonic API

The API version implemented is 1.12.0 and has been tested on Android using the official application, Ultrasonic and DSub.

Since LMS uses metadata tags to organize music, a compatibility mode is used to navigate through the collection using the directory browsing commands.

The Subsonic API is enabled by default.

Note: since LMS stores hashed and salted passwords, it cannot handle the token authentication method defined from version 1.13.0.


Note: this installation process and the default values of the configuration file and the systemd service file have been written for Debian Stretch. Therefore, you may have to adapt commands and/or paths in order to fit to your distribution.

Build dependencies

apt-get install g++ autoconf automake libboost-filesystem-dev libboost-system-dev libavcodec-dev libavutil-dev libavformat-dev libav-tools libmagick++-dev libpstreams-dev libconfig++-dev libpstreams-dev ffmpeg libtag1-dev

You also need W4, that is not packaged yet on Debian. See installation instructions.


Get the latest stable release and build it:

git clone lms
cd lms
autoreconf -vfi
mkdir build
cd build
../configure --prefix=/usr

configure will report any missing library.

Note: in order to customize the installation directories, you can use the following options of the configure script:

  • --prefix (defaults to /usr/local).
  • --bindir (defaults to $PREFIX/bin).

Note: you can use make -jN to speed up compilation time (N is the number of compilation workers to spawn).

Raspberry 3 build notes

Due to memory limitations, you may need to build Wt4 in Release mode if you want to compile it natively on a Raspberry Pi3B+.

The build process is really long, roughly 1 hour to build Wt4 + LMS.


Note: the commands of this section require root privileges.

make install

Create a dedicated system user:

useradd --system lms

Copy the configuration files:

cp /usr/share/lms/default.conf /etc/lms.conf
cp /usr/share/lms/default.service /lib/systemd/system/lms.service

Create working directories and give access to the lms user:

mkdir /var/lms
touch /var/log/lms.log
touch /var/log/lms.access.log
chown lms:lms /var/lms /var/log/lms.log /var/log/lms.access.log

Note: don't forget to give the lms user read access to the music directory you want to scan.


LMS uses a configuration file, installed by default in /etc/lms.conf. It is recommended to edit this file and change relevant settings (listen address, listen port, working directory, Subsonic API activation, ...).

All other settings are set using the web interface (user management, scan settings, transcode settings, ...).

If a setting is not present in the configuration file, a hardcoded default value is used (the same as in the default.conf file)

Reverse proxy settings

LMS is shipped with an embedded web server, but it is recommended to deploy behind a reverse proxy. You have to set the behind-reverse-proxy option to true in the lms.conf configuration file.

Here is an example to make LMS properly work on using nginx:

server {
    listen 80;


    access_log            /var/log/nginx/myserver.access.log;

    proxy_request_buffering off;
    proxy_buffering off;
    proxy_buffer_size 4k;

    location / {

      proxy_set_header        Host $host;
      proxy_set_header        X-Real-IP $remote_addr;
      proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header        X-Forwarded-Proto $scheme;

      proxy_pass          http://localhost:5082;
      proxy_read_timeout  120;


systemctl start lms

Two log files are used:

  • /var/log/lms.log: logs of the lms daemon
  • /var/log/lms.access.log: access logs of the embedded web server

To connect to LMS, just open your favorite browser and go to http://localhost:5082

To make LMS run automatically during startup:

systemctl enable lms


To upgrade LMS, you need to update the master branch and rebuild/install it:

cd build
git pull

Then using root privileges:

make install
systemctl restart lms

Read the release notes to check if any relevant setting has been added into the configuration file.

Any change in the database schema is made automatically by the application during startup.


You can’t perform that action at this time.