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
- 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
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.
Notes:
- 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)
- to use the self-organizing map based engine, you have to enable it first in the settings panel.
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.
Docker images are available, please see detailed instructions on https://hub.docker.com/r/epoupon/lms.
Buster packages are provided for amd64 and armhf architectures.
As root, trust the following debian package provider and add it in your list of repositories:
wget -O - https://debian.poupon.io/apt/debian/epoupon.gpg.key | apt-key add -
echo "deb https://debian.poupon.io/apt/debian buster main" > /etc/apt/sources.list.d/epoupon.list
To install or upgrade LMS:
apt update
apt install lms
The lms service is started just after the package installation, run by a dedicated lms system user.
Please refer to Deployment for further configuration options.
Note: this installation process and the default values of the configuration files have been written for Debian Buster. Therefore, you may have to adapt commands and/or paths in order to fit to your distribution.
Notes:
- a C++17 compiler is needed
- ffmpeg version 4 minimum is required
apt-get install g++ autoconf automake libboost-filesystem-dev libboost-system-dev libavutil-dev libavformat-dev libmagick++-dev libpstreams-dev libconfig++-dev libpstreams-dev ffmpeg libtag1-dev
You also need Wt4, which is not packaged yet on Debian. See installation instructions.
No optional requirement is needed, except openSSL if you plan not to deploy behind a reverse proxy (which is not recommended).
Get the latest stable release and build it:
git clone https://github.com/epoupon/lms.git 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
).
make
Note: you can use make -jN
to speed up compilation time (N is the number of compilation workers to spawn).
Note: the commands of this section require root privileges.
make install
Create a dedicated system user:
useradd --system --group lms
Copy the configuration files:
cp /usr/share/lms/lms.conf /etc/lms.conf
cp /usr/share/lms/lms.service /lib/systemd/system/lms.service
Create the working directory and give it access to the lms user:
mkdir /var/lms
chown lms:lms /var/lms
To make LMS run automatically during startup:
systemctl enable lms
To upgrade LMS from sources, you need to update the master branch and rebuild/install it:
cd build
git pull
make
Then using root privileges:
make install
systemctl restart lms
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)
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 myserver.org using nginx:
server {
listen 80;
server_name myserver.org;
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
Log traces can be accessed using journactl:
journalctl -u lms.service
To connect to LMS, just open your favorite browser and go to http://localhost:5082
- Wt (http://www.webtoolkit.eu/)
- bootstrap3 (http://getbootstrap.com/)
- ffmpeg project (https://ffmpeg.org/)
- Magick++ (http://www.imagemagick.org/Magick++/)
- MetaBrainz (https://metabrainz.org/)
- Bootstrap Notify: https://github.com/mouse0270/bootstrap-notify