A small, self-hosted cross-platform server for streaming your music collection, written in Rust. With plans to support the Open Subsonic API in the future.
- Ability to handle large music collections
- Hash-based music file ID system that prevents serving duplicate files
- Streams audio format such as: m4b, m4a, mp3, flac, wav, opus
- Multi-platform, runs on Linux and Windows
- Visit home endpoint to get served a random music file
Currently only one client is supported:
- SonicTunes - TUI based, works within Termux
To build, clone this repository and run:
cargo build --releaseLocally:
CARGO_INSTALL_ROOT=~/.local cargo install --path=.Build the binary as described in Building section and use the generated executable in target/release.
Serve your music collection with server binary:
subsonic_vault /path/to/music_collectionOr via Docker Compose:
docker-compose up -dby default it serves ~/Music. To change this adjust volume in docker-compose.yml.
Usage: subsonic_vault [OPTIONS] DIRECTORY
subsonic_vault --help
Options:
--help
--port=<u16> # default: 65421
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Serves a random audio file from the collection |
/scan |
GET | Rescans the base directory |
/files |
GET | Returns a JSON array of all indexed audio files with their IDs, paths and MIME types |
/file/{id} |
GET | Streams the audio file by the provided ID/hash |
/ping |
GET | Health-check; returns JSON {"status":"ok","version":"<ver>"} |
This project is licensed under MIT License.
