About this project

Audioserve is a personal audio server written in Rust that serves audio files directly from directory structures. It is intended primarily for audiobooks, though any well-organized folder collection works. The design emphasizes simplicity and a minimalist approach. Media library: Audioserve browses the file system rather than relying on audio tags, so the folder structure you create is what you see. Recommended layouts include author/book or author/series/book. Files can be ordered naturally, so numeric padding is optional. Cover images and description files placed in folders are used for display, and search covers folder names. Multiple collections can be passed as separate command-line arguments. Caching: Collection data is cached in an embedded key-value database (sled), which speeds up search and loading of folders with many files. The first scan can take time for large collections. Changes are watched via inotify by default, and a full rescan can be forced with a signal or the --force-cache-update argument. Individual collections can opt out with :no-cache, at the cost of slower search and no position sharing. Single-file audiobooks: .m4b and similar files with chapter metadata are presented as folders containing virtual chapter files. Chapters can also be generated from duration or supplied via a .chapters CSV file. CD subfolders can optionally be collapsed into the parent folder. Playback positions: Clients in the same device group can share playback positions over a WebSocket connection, allowing continuation on another device. Positions can be backed up to JSON and restored. Finished folders are marked based on the last listening position. Security: Access is controlled by a shared secret; there are no named users. The secret is sent as a salted hash, and the server issues tokens for subsequent requests. TLS is supported directly or via a reverse proxy, and rate limiting is available. Hidden files are blocked in the API. Transcoding and performance: Audioserve can transcode audio to lower bitrates, with an optional transcoding cache. It supports response compression and HTTP/2. Clients and API: A modern PWA web client (TypeScript/Svelte) is included, along with an older web client and an Android client. A documented HTTP API allows custom clients. Installation: Options include Docker images, static Linux builds, local builds, and compilation with optional features such as collation, tags-encoding, shared-positions, transcoding-cache, and behind-proxy.