A self-hosted media server for your home, made for phones first. Point it at your films and shows and watch them in the browser, on your phone or on the TV, with subtitles that fit.
Lilin is one Node.js process with no npm dependencies. It runs on Windows, Linux, macOS and in Docker, and installs as a web app on your phone's home screen.
- Discover and search with posters and details from TMDB; titles already on the server are marked. Coming soon lists the next few months of films, new series and new seasons, closest and most talked-about first, with one-tap Save and Follow.
- More details for the curious, folded away on every title page: crew, facts, links and the soundtrack's songs.
- Documentaries: over 30 categories, from Swedish true crime to nature and history, and SVT Play's free catalogue saved to your library when you're in Sweden.
- A library that sorts itself: files are matched to TMDB's films, seasons and episodes, and new files show up on their own.
- Anime that just works: numbering from the first episode ("Black Clover - 176") and seasons TMDB merges or splits are matched to TMDB's seasons through AniList, and the English subtitles anime comes with turn on by themselves.
- Plays everywhere: automatic MP4 copies for iPhone and Apple TV, browser-safe audio for Dolby/DTS, H.264 copies of HEVC for Firefox, timeline previews, Up next with credits detection.
- Subtitles from OpenSubtitles, with their timing checked and fixed against the audio. Two languages at once, with size, style and height choices.
- Skip intro: a button during opening titles, found from chapters or the theme song episodes share; optionally skipped automatically.
- Bedtime: night mode evens out loud scenes and lifts voices; a sleep timer pauses after a set time or at the end of the episode.
- Casting to DLNA smart TVs and Apple TV, with a full-screen remote.
- TV apps for Samsung (Tizen) and Android TV / Google TV: browse and play from the sofa, with Skip intro and Up next.
- Jellyfin: the Lilin plugin shows your library in your own Jellyfin, in every Jellyfin app, with progress kept in sync.
- Watch Together rooms with synced playback.
- Live TV: always-on channels made from the library (Anime, Sitcoms, Films, Documentaries, Fresh, Drama, Sci-Fi & Fantasy, Action & Adventure, each person's picks and
channels the owner makes), with a guide on the web and the TV apps. Everyone on a channel sees the same frame; the name is
yours to pick (
LIVE_TV_NAME, default Lilin TV). Each channel has a chat beside the picture that stays with the channel, so people tuning in later see what was said; the owner can remove messages. - Notifications on phones and computers (Web Push, nothing to sign up for): new titles, new episodes and Watch Together invites, each switchable.
- Personal accounts through Cloudflare Access: everyone gets their own library, progress and settings; files exist once on disk and auto-delete when nobody keeps them.
- For the owner: Activity, a House dashboard for the server and home machines, game Clips with
share links and a lossless trimmer (
node setup.js clipperinstalls Clipper to record them), and a shared Notes inbox with image text search.
Details: docs/features.md.
- Node.js 22.16 or later (uses the built-in
node:sqlitewith FTS5) - Optional: ffmpeg (conversion, subtitle timing, previews), a TMDB token (search and posters), an OpenSubtitles API key, pyatv (Apple TV), Tesseract (Notes image search outside Windows)
Anything you don't set up is simply off, so you can start small.
git clone --branch v2.0.2 https://github.com/Tjabooo/lilin.git
cd lilin
node setup.jssetup.js detects your system, asks only what it can't work out, writes .env, checks your
integrations and can register Lilin to start at boot. Open the address it prints. It's safe to
run again at any time; node setup.js doctor checks an installation without changing anything.
On Windows, download LilinSetup.exe from the latest release instead: a setup wizard in a normal window that installs Node.js and Lilin, asks the same questions, can add Clipper for game clips and sets up start at boot (docs/install/windows.md).
Prefer an installer script? It downloads a release, verifies its checksum, and keeps updates separate from your settings and data (read it first: install.sh, install.ps1):
curl -fsSLO https://raw.githubusercontent.com/Tjabooo/lilin/v2.0.2/install.sh && sh install.shirm https://raw.githubusercontent.com/Tjabooo/lilin/v2.0.2/install.ps1 -OutFile install.ps1; powershell -ExecutionPolicy Bypass -File install.ps1curl -fsSLO https://raw.githubusercontent.com/Tjabooo/lilin/v2.0.2/docker-compose.yml
curl -fsSL https://raw.githubusercontent.com/Tjabooo/lilin/v2.0.2/.env.example -o lilin.env # add your tokens
MEDIA_PATH=/srv/media docker compose up -dImages for linux/amd64 and linux/arm64 are published as ghcr.io/tjabooo/lilin. See
docs/install/docker.md.
Settings live in .env (or the container environment). The ones most people set:
| Setting | Purpose |
|---|---|
MEDIA_DIR |
Folder with your films and shows |
TMDB_TOKEN |
Search, posters and episode details |
OPENSUBTITLES_API_KEY |
Subtitles |
ADMIN_EMAILS |
Owner accounts (with Cloudflare Access) |
PORT, HOST, DATA_DIR |
Where it listens and keeps its state |
Every setting: docs/configuration.md.
Windows 10/11, Debian/Ubuntu, Fedora, Arch, macOS (Intel and Apple silicon), Raspberry Pi 4/5 (64-bit), Docker, Unraid, Synology, TrueNAS SCALE, Proxmox LXC and WSL2. Guides: docs/install/.
CI runs the tests and a start-up check on Ubuntu, Windows and macOS with Node.js 22.16 and 24, and builds and starts the Docker image. The NAS, Raspberry Pi, Proxmox and WSL2 guides follow those platforms' standard procedures and haven't been verified on that hardware.
Lilin has its own sign-in (node setup.js user add you@example.com --owner; passwords hashed
with scrypt, server-side sessions, rate-limited) and also accepts identity from Cloudflare Access
or an authenticating proxy. On your home network everyone may share one account without signing in
(HOME_NETWORK_ACCESS=signin turns that off); visitors from the internet always have to sign in.
Requests from other websites (CSRF) and unknown host names (DNS rebinding) are refused.
Don't forward Lilin's port to the internet anyway. It's plain HTTP: use Tailscale, Cloudflare Tunnel with Access, or a reverse proxy with HTTPS: docs/remote-access.md. To report a vulnerability, see SECURITY.md.
- Installation and upgrading, backups and rollback
- Configuration reference
- Integrations: TMDB, OpenSubtitles, ffmpeg, TVs, House, Clips, Invites
- Remote access and security
- Android TV and Samsung TV apps
- Jellyfin: your library in your own Jellyfin
- Hardware acceleration
- How it works, including the HTTP API
- Troubleshooting
- Changelog
npm test # node --test, no dependencies to install
node server.js # run from the checkout
node scripts/ci/smoke.mjs # setup, start, health check and clean stop in a temp folderThe server is plain ES modules in src/, the web app plain JavaScript in public/; there is no
build step.
Lilin is a media management tool for media you have the right to use. It does not host, index or distribute content; you are responsible for how you use it.
