Technology

Fast, steady,
everywhere you listen.

Leyr is one Rust server and a web app that runs on any device with a browser. It starts playback quickly, uses little memory, checks its own health, and works with the apps and home systems you already use.

Performance

Quick to start, light to run

These numbers come from the live server, measured on November 12, 2026.

  • 138 MBserver memory, six minutes after start
  • 0.1 sto jump to 25:00 in a 27-minute FLAC
  • 228 KBto open the app, compressed
  • <120 msbetween tracks on an album
  • 12server threads

How each one was measured, and what it was before: Performance week.

A server written in Rustaxum on tokio, with mimalloc returning freed memory to the system. The worker count is capped, so a big machine does not mean a big footprint.
Seeking in the fileWhen a track is converted on the fly, ffmpeg jumps straight to the new position in the file instead of decoding everything before it.
Gapless, with optional crossfadeThe next track loads before the current one ends. Crossfade, up to 12 seconds, leaves tracks on the same album seamless.
Pages load when you open themThe first download holds only sign-in, setup and search. Script and style files are cached for good; the page itself is always fresh.
SQLite, tunedWrite-ahead logging, memory-mapped reads and a small page cache per connection. Readers never wait on the writer.
Originals when they playFiles your device can play are sent as they are, with byte ranges for seeking. Conversion is used only when a device needs it.

Compared

Side by side with other music servers

We ran Leyr, gonic, Navidrome, Jellyfin and Plex Media Server on the same machine, each limited to 4 CPU cores and 4 GB of memory and with no internet access, against the same 3,098-track test library, which anyone can rebuild. Ranges span two runs; scan times are the median of four. Run on November 14 and 15, 2026.

Lower is better in every row. Public generated library. Private memory is resident memory not backed by a file (the Anonymous total of smaps_rollup, summed over the container), so it leaves out the executable, libraries and mapped database files.
WhatLeyrgonicNavidromeJellyfinPlex
Scan the whole library1.0 s7.1 s10.6 s273.8 s106.1 s
Browse the newest albums, 16 clients at once10–11 ms33–40 ms36–55 ms78–137 ms217–235 ms
Search, 16 clients at once26–38 ms41–43 ms43–99 ms111–229 ms531–865 ms
Start a converted stream at 25:00 in a 63-minute FLAC56–61 ms734–890 ms570–723 msn/an/a
Memory at rest26–32 MB38–43 MB55–56 MB361–402 MB362–401 MB
Private memory at rest14–15 MB20–23 MB24–26 MB210–230 MB232–245 MB
Memory while scanning41–43 MB47–66 MB142–175 MB474–507 MB491–494 MB
Private memory while scanning19–21 MB25–45 MB114–145 MBn/an/a
Memory under 16-client load, peak56–58 MB63–64 MB119–120 MB448–483 MB451–453 MB
Private memory under load, peak25–30 MB41–42 MB88–89 MBn/an/a

Leyr scanned fastest, answered browsing and searching fastest with 16 clients at once, and started a converted stream 25 minutes into a long file in about 58 ms: about 11 times sooner than Navidrome and 14 times sooner than gonic. On memory, Leyr used less than gonic in every row. While scanning, Leyr held 41–43 MB against gonic’s 47–66 and 19–21 MB of private memory (the part not backed by a file) against 25–45. At the peak of the 16-client load it held 56–58 MB against 63–64, and 25–30 MB of private memory against 41–42. At rest Leyr held 26–32 MB against 38–43 and 14–15 MB of private memory against 20–23; the resident figure at rest includes the executable’s file pages, which varied by 15 MB between runs earlier the same day, so we lean on private memory there. Navidrome used about two to four times more than either while scanning and under load, and Jellyfin and Plex about ten times more at rest. Leyr and gonic were rerun together on the evening of November 15, with a Leyr build from before the memory change and one after it taken in between; Navidrome, Jellyfin and Plex are from earlier runs, and Jellyfin and Plex have no private-memory figure while scanning or under load. Single requests with nobody else connected were a tie between Leyr, Navidrome and gonic, and so was start-up time. Jellyfin and Plex have no Subsonic API, so their rows use their own closest requests. Jellyfin did not seek in a converted stream the way we asked, and Plex cannot convert audio with no internet access, so those cells are n/a. This was one library on a shared desktop, busy during the runs: treat differences under about two times as noise. Leyr’s scan time comes from its own log; the others include up to a second of polling. The same tests on a real 3,129-track library were run earlier with an older Leyr build and are in the full results; on that library gonic used less memory than Leyr.

How we tested, every result, and how to reproduce it

Stability

Updates that check themselves

On Leyr's own servers, a new version only stays live once it proves it is healthy. If it doesn't, the previous one comes back on its own.

Health checks

The server checks its own health every 30 seconds. The container restarts if the server ever exits.

Automatic rollback

After an update, Leyr waits for the new version to report itself healthy. If it doesn't within three minutes, the previous version is restored. The last five builds are kept.

Safe through a power cut

With write-ahead logging, a power cut can lose the last few writes, but it cannot corrupt the library.

Clean shutdowns

On stop, the server closes open streams and exits cleanly instead of being cut off mid-request.

Locked down by default

Leyr's own servers run it in a rootless container, with every Linux capability dropped and no way to gain new privileges.

Tested on every change

Over 1,000 server tests, about 1,500 web tests, and browser tests at phone and desktop sizes run before anything ships. A test keeps every Subsonic API call answered.

Live service health is public at status.leyr.stream.

Open platforms

Works with what you already run

Leyr speaks open standards, so your apps, speakers and smart home can use your library without anything made just for Leyr.

Home Assistant

Bring your library into your smart home.

  • Home Assistant discovers Leyr on its own through its built-in DLNA Digital Media Server integration. Your library then shows up under Media and as a source for your speakers.
  • Music Assistant can connect through its Open Subsonic provider.

Subsonic and OpenSubsonic apps

Keep the player you like, on Android, iPhone, desktop or the command line.

  • Every call in Subsonic API 1.16.1 has an answer.
  • OpenSubsonic extensions: synced lyrics, transcode offsets, index-based queues and form posts.
  • Each app gets its own app password, separate from your sign-in.

DLNA and UPnP

TVs, AV receivers, network speakers, VLC and BubbleUPnP can browse Leyr by artist, album, genre and playlist, and play the original files.

Sign-in

Local accounts with two-factor codes, single sign-on through any OpenID Connect provider such as Authentik or Keycloak, and Discord.

Music data

MusicBrainz, ListenBrainz, Discogs, Bandcamp, Wikipedia and LRCLIB lyrics fill in what your files leave out.

Playlists and concerts

Import M3U, M3U8 and XSPF playlists with a preview of every match. Find concerts near you through Ticketmaster and Bandsintown.

Every device

If it has a browser, it plays Leyr

No store, no download. Open Leyr on Android, iPhone, iPad, Mac, Windows, Linux or a Chromebook, and add it to your home screen to use it like an app.

Lock screen and media keysArtwork, play, pause, skip and seek from the lock screen, headphones and keyboard media keys.
Offline songsSave songs to your device and keep listening without a connection.
One device controls anotherStart music on your computer and control it from your phone.
Listen togetherListening rooms keep friends on the same track, each on their own device.
Made for touch and keysPhone-first layouts with large touch targets, and keyboard shortcuts on desktop.
Native apps tooPrefer a native player? Any Subsonic app connects with your account.

The stack

What it's made of

One rootless container: the server, the web app, the databases and ffmpeg.

Browser
React 18, TypeScript, Vite 6 and Tailwind. An installable web app with a service worker.
Server
Rust, axum 0.8 on tokio, with mimalloc as the allocator.
Data
SQLite in WAL mode through sqlx. One database for the music library, one for the app.
Audio
ffmpeg for on-the-fly conversion to MP3, Opus or AAC.
Protocols
Subsonic and OpenSubsonic, UPnP AV and DLNA, OpenID Connect.
Licence
Free software under the GNU GPL, version 3 or later.

Hear the difference

Try the demo in your browser, then pick Leyr Cloud or install it yourself.

Or self-host it for free.