MCPSERV.CLUB
LMS

LMS

Self-Hosted

Self-hosted music streaming with rich metadata and discovery

Active(75)
1.4kstars
0views
Updated Sep 22, 2025

Overview

Discover what makes LMS powerful

_LMS (Lightweight Music Server)_ is a fully self‑hosted audio streaming platform designed to expose a local music library over the network via a web interface and a comprehensive API. It targets developers who need a lightweight, extensible solution that can be embedded in custom stacks or used as a drop‑in replacement for larger systems like Plex. From a technical standpoint, LMS is built around the Subsonic/OpenSubsonic API specification, which guarantees compatibility with a wide range of clients (mobile apps, media players, home automation systems) while allowing developers to extend or replace the API surface with custom endpoints.

Language & Runtime

Web Framework

Database

Transcoding & Audio Handling

Overview

LMS (Lightweight Music Server) is a fully self‑hosted audio streaming platform designed to expose a local music library over the network via a web interface and a comprehensive API. It targets developers who need a lightweight, extensible solution that can be embedded in custom stacks or used as a drop‑in replacement for larger systems like Plex. From a technical standpoint, LMS is built around the Subsonic/OpenSubsonic API specification, which guarantees compatibility with a wide range of clients (mobile apps, media players, home automation systems) while allowing developers to extend or replace the API surface with custom endpoints.

Technical Stack & Architecture

  • Language & Runtime: The core server is written in Go, chosen for its compiled binaries, low memory footprint, and built‑in concurrency primitives. This makes LMS ideal for deployment on resource constrained devices such as Raspberry Pi or Docker‑hosted edge nodes.
  • Web Framework: The HTTP layer is powered by the standard net/http library with a small router for API routing. Templates are rendered using Go’s text/template engine, keeping the front‑end lightweight.
  • Database: LMS uses a PostgreSQL backend for metadata, user accounts, and playback statistics. The schema is heavily normalised to support multi‑valued tags, artist relationships, and MusicBrainz identifiers. An embedded SQLite mode is also available for single‑user deployments.
  • Transcoding & Audio Handling: Audio transcoding is performed by invoking ffmpeg or lame, allowing on‑the‑fly conversion to formats like MP3, AAC, or Ogg Vorbis. ReplayGain metadata is parsed and applied during transcoding to ensure consistent playback levels.
  • Scrobbling & External Services: Integration with ListenBrainz and MusicBrainz is implemented via their public APIs. These services are used for scrobbling, love feedback sync, and enriching the local catalog with release groups and artist relationships.

Core Capabilities & APIs

  • Subsonic/OpenSubsonic Compatibility: All standard endpoints (getMusicDirectory, search3, stream, etc.) are implemented, enabling out‑of‑the‑box support for existing clients.
  • Extended Metadata: Multi‑valued tags (genre, mood, artists) and artist relationships (composer, conductor, lyricist) are exposed via custom API endpoints. Developers can query these fields directly or use the built‑in recommendation engine.
  • Release Group & Album Types: LMS supports MusicBrainz release types (album, EP, single, live) and release groups, allowing clients to distinguish between remasters, reissues, and original releases.
  • Podcast & Playlist Support: Dedicated endpoints expose podcast feeds and user‑created playlists, which can be manipulated programmatically.
  • Webhooks & Events: A lightweight event bus emits JSON payloads for key actions (track play, library update). Third‑party services can subscribe via HTTP callbacks.

Deployment & Infrastructure

  • Containerization: A ready‑made Docker image is available, bundling the Go binary and all dependencies. Environment variables expose database credentials, library paths, and feature flags.
  • Scalability: While a single instance is sufficient for most home users, LMS can be horizontally scaled by running multiple replicas behind a reverse proxy that balances requests based on user sessions. The database remains the single source of truth, so proper connection pooling is essential.
  • Self‑Hosting Requirements: Minimum RAM 512 MB, CPU 1 core; for larger libraries (10k+ tracks) a 2‑core CPU and 2 GB RAM are recommended. The only external requirement is access to a PostgreSQL server (or SQLite for small deployments).

Integration & Extensibility

  • Plugin System: Developers can write Go plugins that hook into the request pipeline or extend the database schema. The plugin API exposes lifecycle callbacks (Init, Shutdown) and a simple HTTP router for custom endpoints.
  • Custom Authentication: LMS supports multiple authentication backends (OAuth, LDAP, JWT). Implementing a new backend involves registering an auth provider that implements the Authenticator interface.
  • Configuration: All settings are stored in a YAML file (config.yaml) with support for environment variable overrides. The configuration includes library paths, transcoding presets, and API rate limits.
  • Community & Docs: The project hosts a comprehensive developer guide on GitHub, with examples of API usage, plugin development, and integration patterns. Issues are triaged quickly, and the maintainers encourage pull requests for new features.

Use Cases

ScenarioWhy LMS Fits
Home Media ServerLightweight Go binary, Subsonic API compatible with existing clients (e.g., Subsonic, Sonic Pi).
IoT Edge DeviceSmall footprint, Docker support; can run on a Raspberry Pi to stream local music to smart speakers.
Custom Media PlayerExposes a clean JSON API; developers can build bespoke UIs or integrate with home automation (Home Assistant).
Podcast HostingBuilt‑in podcast support; can serve both local and remote feeds via the same API.
Music Discovery PlatformTag‑based filters, recommendation engine, and MusicBrainz integration make it ideal for building niche discovery services.

Advantages Over Alternatives

  • Performance: Go’s compiled nature and efficient concurrency yield low latency streaming even on modest hardware.
  • Extensibility: The plugin architecture and open API allow developers to add new features without touching the core codebase.
  • Licensing

Open SourceReady to get started?

Join the community and start self-hosting LMS today