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/httplibrary 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
ffmpegorlame, 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
Authenticatorinterface. - 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
| Scenario | Why LMS Fits |
|---|---|
| Home Media Server | Lightweight Go binary, Subsonic API compatible with existing clients (e.g., Subsonic, Sonic Pi). |
| IoT Edge Device | Small footprint, Docker support; can run on a Raspberry Pi to stream local music to smart speakers. |
| Custom Media Player | Exposes a clean JSON API; developers can build bespoke UIs or integrate with home automation (Home Assistant). |
| Podcast Hosting | Built‑in podcast support; can serve both local and remote feeds via the same API. |
| Music Discovery Platform | Tag‑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
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Explore More Apps
Liwan
Privacy‑First Web Analytics in a Single Binary
Elgg
Open source social networking engine for custom communities
sigal
Self-hosted other
Odoo
All-in-one open source business suite
Open Source Social Network (OSSN)
Build a vibrant, multilingual community platform
WBO
Real‑time collaborative whiteboard for art, design, and teaching