Install the server
Leyla’s server is one image, tropicalthink/leyla, for amd64 and arm64, with its database inside. Every box runs the same thing; only how it hands over folders differs.
Pick your box
Choose what the server will run on. The page then shows only that box’s steps.
Tested means installed from the published image on the real thing, then played, seeked and resumed. The other boxes follow their maker’s documented steps and have not been walked through on real hardware yet. Show every box
Docker on any Linux Tested
This works on any distribution with Docker and the compose plugin, on a home machine or a VPS.
Get the compose file
$ mkdir -p ~/leyla && cd ~/leyla $ curl -fsSLo compose.yaml https://leyla.media/compose.yamlSet the lines marked CHANGE
Run
idto see your user and group numbers, then setPUID,PGIDand the path to your media in the compose file. Data and plugins are kept beside the file.$ id $ nano compose.yamlStart it
$ docker compose up -dOpen
http://<the machine’s address>:10001and continue with the setup.
On a VPS Put a reverse proxy in front of Leyla for HTTPS (Caddy, nginx, Traefik or a Cloudflare Tunnel), then save its address in Administration › Settings › Network. Your own domain has the details.
Synology
For DSM 7.2 and later, with Container Manager.
Install Container Manager
It is in Package Center.
Make Leyla’s folders
In File Station, create
docker/leyla/dataanddocker/leyla/plugins.Find your PUID and PGID
Enable SSH under Control Panel › Terminal & SNMP, run
ssh you@nas, thenid. On a Synology they are usually1026and100.Create the project
In Container Manager choose Project, then Create. Set the path to
docker/leyla, choose “Create docker-compose.yml”, and paste the compose file. SetPUID,PGIDand your media path,/volume1/videoor wherever your films live.
Important Uncomment devices only if ls /dev/dri lists renderD128, as it does on most Intel “+” models. AMD Ryzen models such as the DS923+ have no /dev/dri, and the container will not start with the block uncommented. See Hardware.
QNAP
For QTS 5 and QuTS hero, with Container Station.
Install Container Station
It is in the App Center.
Make a share folder
Create
Container/leyla, withdataandpluginsinside it.Create the application
In Container Station choose Applications, then Create, and paste the compose file. Paths on a QNAP start with
/share/: use/share/Container/leyla/datafor data and/share/Multimedia:/media:rofor your media. ForPUIDandPGID, runidover SSH as your own account, not as admin.Intel models only: hardware transcoding
Uncomment
devicesif/dev/driexists. See Hardware.
unRAID
Add the container
Under Docker › Add Container, choose the Leyla template. Until it is in Community Applications, write to hi@tropicalthink.com for its address.
Fill in the folders
The template asks for the data, plugins and media folders.
PUID99 andPGID100 are filled in already.Graphics, if the box has any
For Intel or AMD, keep
/dev/dri. For NVIDIA, install the Nvidia-Driver plugin, add--runtime=nvidiato Extra Parameters and setNVIDIA_VISIBLE_DEVICES.
TrueNAS Scale
For 24.10 and later.
Make datasets for Leyla
Create
/mnt/<pool>/apps/leyla/dataand/mnt/<pool>/apps/leyla/plugins.Install via YAML
Under Apps › Discover, open the ⋮ menu, choose Install via YAML and paste the compose file, with those datasets and your media dataset.
Choose who Leyla runs as
TrueNAS’s
appsuser is 568, group 568. Either use it and give it read access to your media, or use your own account’s numbers.
For an Intel or AMD GPU, uncomment devices. For NVIDIA, install the drivers under Apps › Settings and add this to the service:
runtime: nvidia
environment:
NVIDIA_VISIBLE_DEVICES: all
NVIDIA_DRIVER_CAPABILITIES: compute,video,utility
OpenMediaVault
For version 7, with the compose plugin.
Install the compose plugin
Install
openmediavault-composefrom omv-extras.Create the file
Under Services › Compose › Files, choose Create and paste the compose file. Use your shared folders’ full paths, such as
/srv/dev-disk-by-uuid-…/media.Set PUID and PGID
OMV’s first user is usually 1000, group 100.
TerraMaster
For TOS 6, with Docker Manager.
Install Docker Manager
It is in the App Center.
Create the project
Choose Project, then Create, and paste the compose file. Volumes on a TerraMaster are
/Volume1/…. TakePUIDandPGIDfromidover SSH.
Raspberry Pi
For a Pi 4 or 5 running the 64-bit Raspberry Pi OS.
Install Docker
$ curl -fsSL https://get.docker.com | shFollow Docker on any Linux
The steps are the same as Docker on any Linux.
Tip Use a Pi with 2 GB of memory or more; 1 GB runs out on a large library. Keep the data folder on a USB SSD, not the SD card. A Pi has no hardware encoder, so anything that must be converted runs on the CPU. Playing files as they are, and rewrapping them, is what a Pi does well.
Debian, Ubuntu, Fedora In VMs
These packages install Leyla without Docker, for amd64 and arm64, on systems with glibc 2.34 or later: a .deb for Debian 12 and 13 and Ubuntu 22.04 and later, an .rpm for Fedora, RHEL, Rocky and Alma 9 and later, and a tarball. They are tested in Debian 13, Ubuntu 26.04, Fedora 44 and Rocky 9 virtual machines with SELinux on, and not yet on metal.
Download the package
Get the file for your system from Download.
Install it
$ sudo apt install ./leyla_<version>_amd64.deb$ sudo dnf install ./leyla-<version>.x86_64.rpmThe
./matters: without it the package manager looks for a package of that name instead of the file. The package prints the address to open.Open the firewall, if there is one
If a browser on another device just waits, a firewall is in the way. Fedora Server, RHEL, Rocky and Alma have one on by default.
$ sudo firewall-cmd --permanent --add-service=leyla && sudo firewall-cmd --reload $ sudo ufw allow LeylaLet Leyla read your media
The setup marks any folder that the user
leylacannot read. Let it in. On Debian and Ubuntu, runsudo apt install aclfirst.$ sudo setfacl -R -m u:leyla:rX /srv/media $ sudo setfacl -m u:leyla:x /home/<you> # only for a folder inside your home
Where things are
- Runs as
- The user
leyla, as the serviceleyla, at every boot. - Data
/var/lib/leyla- Settings
/etc/leyla/leyla.env- Log
journalctl -u leyla, and Administration › History › Work- Upgrade
- Install the newer package the same way. Removing the package keeps the library, the database and the settings.
A NAS share as a library
Mount the share at every boot, then add it as a library at /mnt/nas:
//nas.local/video /mnt/nas cifs ro,credentials=/etc/leyla/nas.cred,uid=leyla,_netdev,nofail 0 0
# /etc/leyla/nas.cred: username= and password= linesWindows Early
For Windows 10 and 11, x64. The setup file is on Download, under “Windows server”. The Windows zip listed there is the app for watching, not the server. So far it is tested on Windows Server 2025 in a virtual machine, and not yet on a Windows 10 or 11 PC.
Important The beta’s installers are not signed, so SmartScreen says “Windows protected your PC”. Check the file against the SHA-256 on the download page, then choose More info and Run anyway.
Run
Leyla-Setup-<version>.exeIt installs to
C:\Program Files\Leyla, starts the Leyla service at every boot and adds the firewall rule for the home network. To install on many PCs, useleyla-<version>-windows-x64.msi.Give the service access to your media
The service runs as
NETWORK SERVICE. Local drives are read as they are. A network share must allow this computer’s account.Open the setup
The installer opens your browser. Later, the address is http://localhost:10001. Data, plugins and logs live in
C:\ProgramData\Leylaand are kept when you uninstall.
Mac Early
For Apple silicon and Intel Macs. The installer packages are on Download, under “Mac”: pick the one for your Mac’s chip (Apple menu › About This Mac). Leyla runs in the background from startup, before anyone logs in, as its own hidden user.
Important The beta’s Mac packages are not signed yet, so macOS refuses to open one at first. Check the file against the SHA-256 on the download page, then Control-click it and choose Open, then Open again (or System Settings › Privacy & Security › Open Anyway).
Run
leyla-<version>-macos-<chip>.pkgIt installs the server to
/usr/local/libexec/leylaand starts it at every boot. The library, database, settings and log live in/Library/Application Support/Leylaand are kept when you uninstall.Give it access to your media
A folder like
/Users/Shared/Filmsonly needs to be readable by everyone. A folder in someone’s home folder (Movies, Desktop, Documents) or on an external or network disk needs Full Disk Access for the server: System Settings › Privacy & Security › Full Disk Access, the + button, then/usr/local/libexec/leyla/leyla-server(⇧⌘G lets you type the path).Open the setup
Open http://localhost:10001 and continue with the setup. The server updates itself like on any other system.
To remove it, run sudo /usr/local/share/doc/leyla/uninstall.sh in Terminal.
What every install needs
Whatever the box, Leyla is given the same five things.
- Data
- A folder mounted at
/app/data, for the database, artwork and downloads. Put it on an SSD if the box has one. - Plugins
- A writable folder at
/app/plugins, for plugins installed from Leyla’s store. - Media
- Your films and shows at
/media, read-only. Mount several folders under it if they live on different shares, such as/media/filmsand/media/tv. - An account
PUIDandPGID: the user and group that own your media. Leyla runs as that account and makes the data folder its own on the first start.- A port
10001. Openhttp://<the box>:10001and follow the setup.
Ports
| Port | What for | When |
|---|---|---|
10001/tcp | The web app, the apps and every stream | Always |
5353/udp | mDNS, so the apps find the server at home | On by default |
1900/udp | DLNA, so TVs and speakers find the server | On by default |
8443/tcp | Leyla’s own HTTPS, for direct access from outside | Only if you turn it on |
The Linux packages’ firewall profiles open the first three. The Windows installer allows the program on home and work networks. In Docker, mDNS and DLNA only reach the home network with the host’s network; see TVs and the home network.
Another PostgreSQL server
Leyla comes with its own PostgreSQL, inside its data folder and in its backups. Most homes should keep it. If you already run PostgreSQL, Leyla can use that instead. Choose it in the setup, or later under Administration › Settings › Database.
The server must run PostgreSQL 18, have the citext, pg_trgm, pgcrypto and unaccent extensions, and give Leyla an empty database and a user that may create databases:
CREATE ROLE leyla LOGIN PASSWORD '…' CREATEDB;
CREATE DATABASE leyla OWNER leyla;Enter the server, port, database, user and password, and test the connection. Leyla then copies everything across, checks every table, and restarts onto it. You can move back the same way. Updating that PostgreSQL is up to you, and if it stops answering, Leyla stops too; it never falls back to its own.
Uninstall
Removing Leyla keeps your library, database and settings, so a reinstall picks up where you left off. Your media is never touched.
| Install | Remove the program | Also delete the data |
|---|---|---|
| Docker or a NAS | docker compose down in Leyla’s folder | Delete the data and plugins folders |
| Debian, Ubuntu | sudo apt remove leyla | sudo rm -rf /var/lib/leyla /etc/leyla && sudo userdel leyla |
| Fedora, RHEL | sudo dnf remove leyla | The same as above |
| Windows | Settings › Apps, then Leyla, then Uninstall | Delete C:\ProgramData\Leyla |
The compose file
One file for every box. It is also at leyla.media/compose.yaml. Change the lines marked CHANGE. Your box’s section says what goes there.
# Leyla on a NAS, a Raspberry Pi or any Docker host, from the published
# image. One file for every box: Synology Container Manager, QNAP Container
# Station, TerraMaster Docker Manager, OpenMediaVault's compose plugin and
# TrueNAS Scale's "Install via YAML" all take it as it is. Change the lines
# marked CHANGE; leyla.media/install says what to put on each box.
services:
leyla:
image: tropicalthink/leyla:latest
container_name: leyla
restart: unless-stopped
# The grace period is Leyla's drain plus the database's shutdown
# checkpoint.
stop_grace_period: 2m
environment:
# CHANGE: the user and group that own your media: what `id` prints
# on the box (a desktop Linux account is usually 1000 and 1000; a
# Synology one 1026 and group 100). Leyla runs as this account.
PUID: "1000"
PGID: "1000"
LEYLA__PLAYBACK__DEMAND_SCRATCH_DIR: /run/leyla-playback
ports:
- "10001:10001"
volumes:
# Leyla's database, artwork and downloads, beside this file (on a NAS
# project, in the project's folder). An SSD volume if the box has one.
- ./data:/app/data
# Plugins installed from Leyla's store.
- ./plugins:/app/plugins
# CHANGE: your films and shows, read-only (on a Synology,
# /volume1/video). Mount several folders under /media if they live on
# different shares (/media/films, /media/tv).
- ./media:/media:ro
# Playback scratch: in memory, bounded at 1 GB.
tmpfs:
- /run/leyla-playback:rw,nosuid,nodev,noexec,size=1g,mode=0700
# No memory ceiling. On a box shared with other things, uncomment
# this to cap Leyla (a ceiling, not a reservation).
# mem_limit: 4g
# Hardware transcoding with Intel Quick Sync or AMD (VAAPI), on boxes
# that have /dev/dri (most Intel Synology "+" models, QNAP, TerraMaster,
# unRAID, an Intel mini PC). Uncomment it on such a box; Leyla joins the
# device's group itself. Leave it out on a box without /dev/dri, or the
# container will not start.
# devices:
# - /dev/dri:/dev/dri
After installing
The server is running and people at home can watch. These are the things an operator usually sets up next.
- Watch away from homeA VPN, your own domain or a port on your router. Also how TVs find Leyla on the home network.
- HardwareHardware transcoding on Intel, AMD and NVIDIA.
- Disk healthGive the container the disks, and Leyla reads each drive’s own SMART counters.
- Backups and recoveryMake a recovery code and keep a sealed copy off the machine.
Something missing or wrong here? Tell us.