lms

epouponGPL-3.0活跃维护

轻量级自托管音乐服务器,用 Web 界面管理和串流自己的音乐库,支持 OpenSubsonic、MusicBrainz 等协议,适合在树莓派等低配设备上跑。

Lightweight Music Server. Access your self-hosted music using a web interface.

v3.82.0发布于 2026-11-05 22:37 UTC1,699star +1 / 7 天92fork同步于 2026-11-10 17:49 UTC

怎么上手

由 README 提炼,执行前请确认
README 未给出安装命令,安装步骤见 INSTALL.md
硬件要求按 README 说明

README 未说明具体硬件要求;推荐引擎的音频相似度模式在 Raspberry Pi 4 上约 1k 首/小时,Intel Core i5-13500 上约 25k 首/小时。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

自托管轻量音乐流媒体服务器,用网页随时访问自己的音乐库

轻量级自托管音乐服务器,用 Web 界面管理和串流自己的音乐库,支持 OpenSubsonic、MusicBrainz 等协议,适合在树莓派等低配设备上跑。

核心能力

  • 支持 Subsonic/OpenSubsonic API 接入第三方客户端
  • 按标签、发行类型和 MusicBrainz ID 组织音乐库
  • 内置推荐引擎,支持音频相似度与标签两种模式
  • 支持多音乐库、ReplayGain 与音频转码
  • 支持播客、播放列表、歌词与 Jukebox 播放

容易踩的坑

安装步骤在单独的 INSTALL.md 中,README 未给出可直接执行的命令;音频相似度推荐需用 MusicNN 提取嵌入,扫描速度受线程数和存储速度影响;每个音乐库根目录只支持一个 .lmsignore,子目录中的会被忽略

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v3.82.0
  1. v3.82.0最新正式版2026-11-05 · 2026-11-05 22:37 UTC

    Updates:

    • Filters can now match one of several values or none of them. Multiple filters are still ANDed as before #334 #831
    • Browser-stored settings are now kept per LMS instance and per user. Saved filters and player settings are reset, you need to set them again
    • Added a basic favicon #585
    • Artist names and sort names are now resolved from their tags and artist info files after each scan, see README for more details #870
    • Database: optimized several queries, especially when using filters
    • Subsonic API: alphabeticalByName and byGenre album lists are now sorted by album sort name #896

    Bugfixes:

    • Fixed official docker image unable to work in read only mode #891
  2. v3.81.02026-09-18 · 2026-09-18 20:09 UTC
    查看更新说明

    Updates:

    • Native transcoding is now performed via linked ffmpeg libraries instead of spawning an external ffmpeg process. A new transcode-thread-count setting in lms.conf controls the number of threads used to transcode
    • Scanner: added support for new mp4 codecs exposed by taglib 2.3.2
    • UI:
      • show the target codec/bitrate in the player
      • added Track information in play queue entries

    Bugfixes:

    • Fixed play button in the playlist view queuing only a single track instead of the whole list from the selected index #886
    • Fixed original-ip-header being silently ignored, and fixed the nginx example settings in INSTALL.md
    • Generate UUIDs using a non-deterministic random source GHSA-8cw7-8vph-vr75

    Notes for package maintainers:

    • ffmpeg 7.1 minimum is now required (libraries only, the ffmpeg binary is no longer needed)
    • taglib 2 minimum is now required
  3. v3.80.02026-08-19 · 2026-08-19 20:42 UTC
    查看更新说明

    Updates:

    • Added webp/gif artwork support #447
    • Reworked listens/feedbacks handling to better decorrelatebackends #842
    • Reworked sort name handling to have better determinism #870
    • OpenSubsonic API: added topSongsByArtistId extension support #879

    Bugfixes:

    • Attempt to fix file descriptor leak #871
    • Fixed really long names badly truncated #872
    • OpenSubsonic API: fixed bad playlist parameter handling #876

    Note: you must rescan your library to restore all artworks

  4. v3.79.02026-07-18 · 2026-07-18 11:32 UTC
    查看更新说明

    Updates:

    • Added support for work/movements #834

    • Subsonic API:

      • Added support for the legacy md5 auth token authentication to ease compatibility #865 The lms.conf options api-subsonic-support-password-auth and api-subsonic-old-server-protocol-clients have been removed.
    • Searching albums by name also search in disc subtitles #698

    • Improved the "play next" behavior #864

    Bugfixes:

    • Validate podcast URLs and probe artwork before saving https://github.com/epoupon/lms/security/advisories/GHSA-g32g-vh4m-v482
    • Fixed 'remember me' login option for several LMS instances on the same host #867
    • Fixed .lmsignore sometimes not taken into account #868
    • Fixed bad UTF8 name truncations #861
    • OpenSubsonic API:
      • Do not report bit depth if the transcoded stream is lossless
      • Fixed PCM incorrectly considered as a lossy codec
  5. v3.78.02026-06-23 · 2026-06-23 20:46 UTC
    查看更新说明

    Updates:

    • Added last.fm as a scrobbling backend #138
    • Audio similarity recommendation engine:
      • Speed up audio similarity engine startup
      • Take recording mbid into account to eliminate duplicates
    • Subsonic API: various optimizations to speed up search3 queries (should speed up Symfonium sync times)
    • Use local time (if available) in the UI #427

    Bugfixes:

    • Subsonic API: fixed release-only artists not picked up during search3 calls #852
    • Scanner: fixed crash occurring when too many symlinks are hit #853
    • Audio similarity recommendation engine:
      • Do not treat silent songs as errors
      • Fixed crash on corrupted files #857

    Notes:

    • coverArt ids are invalidated, you need to resync your library if you use Symfonium
    • This update introduces a database schema change that may take a while to migrate

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    LMS - Lightweight Music Server

    Last Release

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

    A demo instance is available. Note the administration settings are not available.

    Main features

    • Subsonic/OpenSubsonic API support
    • Multi-valued tags: genre, mood, artists, ...
    • Artist relationships: composer, conductor, lyricist, mixer, performer, producer, remixer
    • Release types: album, single, EP, compilation, live, ...
    • Release groups support to show different versions of albums, such as remasters, reissues, etc.
    • MusicBrainz Identifier support to handle duplicated artist and release names
    • ListenBrainz support for:
      • Scrobbling and synchronizing listens
      • Synchronizing 'love' feedbacks
    • Last.fm support for scrobbling listens
    • Recommendation engine
    • Multi-library support
    • ReplayGain support
    • Audio transcoding for compatibility and reduced bandwidth
    • User management, with several authentication backends
    • Podcasts support
    • Playlists support
    • Lyrics support
    • Jukebox support

    Music discovery

    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, with endless filling of the play queue with tracks similar to what is there
    • Searches in album, artist and track names (including sort names)
    • Starred Albums/Artists/Tracks
    • Random/Starred/Most played/Recently played/Recently added for Artist/Albums/Tracks, allowing you to search for things like:
      • Recently added Electronic artists
      • Random Metal and Aggressive albums
      • Most played Relaxed tracks
      • Starred Jazz albums
      • ...

    Note: the recommendation engine supports two modes:

    • Audio similarity (default): uses MusicNN embeddings. Extraction throughput depends heavily on both the number of scanner threads and the speed of your storage. Typical reported speeds range from ~1k tracks/hour on a Raspberry Pi 4 to ~25k tracks/hour on an Intel Core i5-13500.
    • Tag-based: uses metadata tags genre, mood, grouping, and language.

    About tags

    LMS primarily relies on tags to organize your music collection but also supports browsing by directory using the Subsonic/OpenSubsonic API.

    Artist information folder

    LMS supports an Artist information folder to manage metadata and images for artists. This folder can be placed anywhere within the scanned libraries but is best located in a dedicated ArtistInfo directory in the root of a media library for maximum compatibility with other softwares.

    The folder must follow a structure defined by Kodi, as detailed here. artist.nfo files are used to define additional artist information such as biography, sort name, and MusicBrainz ArtistID. See the format here.

    The canonical artist name used by LMS is the one specified in the artist.nfo file; If an artist.nfo exists but does not provide a name, the name of the containing folder is used. The same goes for the sort name, when the artist.nfo file provides one. Otherwise, LMS picks the artist name and sort name found in the most recent album artist tags, then in the most recent artist tags of any kind, tags matched using a MusicBrainz ArtistID first. Artists without a MusicBrainz ArtistID keep their name, as it is what identifies them.

    Excluding files from scan

    Place a .lmsignore file at the root of a media library to exclude files or directories from scanning.

    The file uses a gitignore-inspired reduced syntax:

    • *.jpg: ignore all .jpg files at any depth
    • /Unsorted/: ignore the top-level Unsorted/ directory only
    • extras/: ignore any extras/ directory at any depth
    • !cover.jpg: re-include a file previously matched by a broader rule
    • ?: matches any single character except /
    • [abc]: character class

    Lines starting with # are comments. An empty file has no effect.

    Note: only one .lmsignore file per library root is supported; files placed in subdirectories are ignored.

    Filtering

    It is possible to apply global filters on your collection using genre, mood, grouping, language, codec, and by music library. More tags, including custom ones, can be added in the database administration settings.

    Note: You can use the lms-audioinfo tool to get an idea of the tags parsed by LMS.

    Multiple artists

    LMS works best when using the default Picard settings, where the artist tag contains a single display-friendly value, and the artists tag holds the actual artist names. This ensures a cleaner, more organized representation of artist names, when multiple artists are involved.

    Multiple album artists

    While LMS can manage multiple album artists using the albumartist tag, it works better when using the custom albumartists and albumartistssort tags, similar to how it handles regular artist tags.

    Note: if you use Picard, add this script to set up both artist and album artist tags:

    $setmulti(artistssort,%_artists_sort%)
    $setmulti(albumartists,%_albumartists%)
    $setmulti(albumartistssort,%_albumartists_sort%)
    

    Extended artist and MusicBrainz ID support

    LMS supports several non-standard tags to allow more accurate artist identification:

    • MusicBrainz identifiers for artist relationships: musicbrainz_composerid, musicbrainz_conductorid, musicbrainz_lyricistid, musicbrainz_mixerid, musicbrainz_producerid, musicbrainz_remixerid
    • Sort order variants: , albumartistssort, composerssort, conductorssort, lyricistssort, mixerssort, producerssort, remixerssort. Singular forms of these tags are also accepted (e.g., conductorsort, lyricistsort, etc.)

    Album track grouping

    The recommended way to group tracks within an album is to use the musicbrainz_albumid tag.

    When this tag is not present, LMS will attempt to group them as best as possible: if the analyzed file contains a disc number and the total number of discs is greater than 1, sibling directories are also scanned to find a matching album. Otherwise, LMS will only consider albums within the current directory.

    For an album to be considered a match, the following conditions must be met:

    • Same name
    • Same total number of discs
    • Identical 'compilation' flag value
    • Same record labels
    • Same barcode

    Artwork

    LMS scans and serves artwork in jpg/jpeg, png, bmp, webp and gif formats, both as standalone files and embedded in track tags. webp and gif images are always served at their original size: they are never resized, even when a client requests a specific size.

    Album image lookup

    The recommended method is to name the album image file using the release's MusicBrainz ReleaseID. This file can be placed anywhere within one of the scanned libraries.

    If no file with the MusicBrainz ReleaseID is found, LMS will search for a file named cover, front, folder or default (or other names configured in lms.conf, see the cover-preferred-file-names setting), using this logic:

    1. Identify the album's directory: for multi-disc albums, LMS determines the longest common path among all the disc directories (e.g. a cover.jpg placed alongside the CD1/CD2 folders).
    2. Fallback search: if no image is found there, LMS will then search within each individual disc folder.

    If still no image is found, LMS falls back to images embedded in the album's tracks, preferring an embedded "Front Cover" image, then "Media", then "Other" (as some tracks may be badly tagged), using the earliest disc/track that has one, and the largest image as a tiebreaker.

    Disc image lookup

    LMS automatically associates images with each disc in your collection. Name the image file after the disc's subtitle or another identifier configured in lms.conf (see the medium-image-file-names setting), and place it in the same directory as the disc's tracks. If no suitable image is found, LMS will also look for embedded images within the tracks of the disc.

    Artist image lookup

    The recommended method is to name the artist image file using the artist's MusicBrainz ArtistID. This file can be placed anywhere within one of the scanned libraries.

    If no file with the MusicBrainz ArtistID is found, LMS will look for a file named thumb, folder or fanart (or other names configured in lms.conf, see the artist-info-image-file-names setting) in the artist information directory, where the corresponding artist.nfo file is located. If neither exists, it will then search for a file named artist (or another name configured in lms.conf, see the artist-image-file-names setting) in the artist's directories, using this logic:

    1. Identify the artist's directory: LMS selects all albums by the artist using the "AlbumArtist" link and determines the longest common path among them.
    2. Scan for the image: the directory is scanned starting from this common path, moving upwards if needed, until the artist image file is found.
    3. Fallback search: if no image is found, LMS will then search within each individual album folder.

    If still no image is found, LMS falls back to the preferred artwork of the artist's earliest release (by original release date). This behavior is enabled by default and can be disabled in the admin Scan Settings.

    Playlist support

    LMS supports playlist files in m3u and m3u8 formats. These playlists are synced during the scan process and are available as public shared playlists.

    Playlist image lookup

    LMS resolves a playlist's cover image in this order:

    1. #EXTIMG: directive. An explicit path declared inside the playlist file (URLs are ignored).
    2. Same-name image file. An image file in the same directory as the playlist that shares the playlist's filename stem.
    3. First track's artwork – if neither of the above is found, the artwork of the first track in the playlist is used as a fallback.

    Lyrics support

    LMS supports lyrics in lrc files, txt files, and embedded track metadata. Both synchronized and unsynchronized lyrics are supported.

    Keyboard shortcuts

    • Play/pause: Space
    • Previous track: Ctrl + Left
    • Next track: Ctrl + Right
    • Decrease volume: Ctrl + Down
    • Increase volume: Ctrl + Up
    • Seek back by 5 seconds: Ctrl + Shift + Left
    • Seek forward by 5 seconds: Ctrl + Shift + Right

    Installation

    See INSTALL.md file.

    Contributing

    Any feedback is welcome:

    • feel free to participate in discussions if you have questions,
    • report any bug or request for new features in the issue tracker,
    • submit your pull requests based on the develop branch.