lain
Local-first media server in Go with replaceable plugins over a tiny core. Fast to build (stdlib + one small dep, seconds to compile), runs locally by default with an embedded Svelte web UI, supports direct-play streaming, metadata enrichment via Kitsu/Jikan APIs, and ffmpeg thumbnails.
Ficha actualizada 23 sept 2026, 9:34 · upstream 23 sept 2026, 9:20 · release v0.2.0
Qué es lain
Descripción editorial construida a partir del repositorio, su documentación y sus señales de mantenimiento.
Lain is a local-first media server written in Go, designed as replaceable plugins over a minimal trusted core. It features fast compilation (stdlib + one small dependency), runs entirely locally by default, and allows swapping of components at runtime with generation fencing and last-good fallback. The embedded Svelte 5 SPA provides a web interface for managing libraries, scanning, playback, and metadata enrichment without requiring Node.js or any external build toolchain.
The core is file-backed and dependency-light, while the plugin registry supports dynamic composition of capabilities such as source identification, cataloging, user state management, playback, search, ingest, metadata extraction, and thumbnail generation. Plugins can be swapped at runtime with a safety mechanism that ensures only valid versions are active, preventing unexpected behavior from outdated dependencies.
Key features include direct-play streaming for formats like MKV and HEVC, honest transcoding plans rather than fake streams, per-codec quality control and hardware acceleration support, subtitle extraction without re-encoding when possible, and metadata enrichment through local NFO files plus Kitsu/AniList/Jikan integrations. Thumbnails are generated on-demand using ffmpeg with configurable cache behavior.
The architecture supports multi-user roles with separate read/watch permissions for different accounts, online backup via streaming snapshots from a single read transaction, and full restore capability that validates database structure before restoring data. The embedded web UI uses Svelte 5 with semantic color tokens that adapt to the server's live Omarchy theme palette.
- Personal media library management: organize videos, music, and images in a local-first environment without cloud dependencies
- Media streaming on home networks: serve video content directly from local storage with HLS transcoding for compatibility across devices
- Metadata enrichment workflow: collect and enrich metadata (Kitsu/Jikan) for anime series or TV shows before playback
- Offline media consumption: use the embedded web UI to browse, search, and play media without internet connectivity
- Backup and restore: create online snapshots of your media library with safe mid-operation recovery
- Replaceable plugin architecture allows swapping source formats (e.g., from MKV to MP4) at runtime without rebuilding the entire server
- Direct-play streaming for MKV and HEVC files, with honest transcoding plans rather than fake streams that consume unnecessary resources
- Embedded Svelte 5 web UI compiled into a single Go binary, eliminating Node.js dependencies and reducing attack surface
- Metadata enrichment via Kitsu/AniList/Jikan APIs provides rich metadata without requiring local NFO files for every item
- Runtime swap with generation fencing ensures only valid plugin versions are active, preventing security issues from outdated components
- Thumbnail generation requires ffmpeg to be installed on the host system; otherwise thumbnails cannot be created or served
- The embedded web UI is limited in scope and does not support advanced features like video editing or complex playlist management beyond basic playback
- Backup functionality only supports streaming snapshots from a single read transaction, which may not preserve all metadata for large libraries
- No built-in DRM protection or encryption; media files are accessible to any user with appropriate permissions
- Metadata enrichment via Kitsu/AniList/Jikan APIs requires an active internet connection and valid API keys
Perfil de infraestructura
Estimación inicial derivada del repositorio y de los servicios detectados.
Despliegue detectado
Qué señales reales de instalación hemos encontrado.
Run the server with `lain serve --port 9360` (data stored in `~/.local/share/lain`). Use Docker Compose for containerized deployment: mount your media folder as read-only (`/media/videos`) and set environment variables like `LAIN_OMARCHY_CURRENT` to enable Omarchy theme integration. The static binary can be built with `just build` or manually compiled from source using Go's standard library. For production, consider running the server in a containerized environment (Docker) with proper volume mounts for data persistence and media storage. Always use read-only media directories to prevent accidental overwrites.
Stack y dependencias
Componentes inferidos a partir de manifests, configuración y documentación.
Puede sustituir a
Relaciones detectadas por el análisis del repositorio y su categoría.
Experiencia real de la comunidad
Ayuda a contrastar la estimación automática con instalaciones reales.
Todavía no hay datos comunitarios para este proyecto.