Overview
Discover what makes Supysonic powerful
Supysonic is a **Python‑based** implementation of the Subsonic media server API, designed to expose a rich set of audio streaming features while remaining lightweight enough for self‑hosting. At its core, Supysonic parses a user‑defined music library, builds an SQLite metadata store, and serves HTTP endpoints that mirror the Subsonic API specification (currently v1.12.0). The application handles file discovery, media transcoding on demand, and offers a variety of playback conveniences such as playlists, cover art retrieval, star/ratings management, and integration with external scrobbling services (Last.fm, ListenBrainz). A dedicated daemon can monitor the library for changes and trigger background tasks like jukebox mode, making it suitable for both static and dynamic collections.
Library Browsing
Streaming & Transcoding
Playlist Management
Cover Art & Metadata
Overview
Supysonic is a Python‑based implementation of the Subsonic media server API, designed to expose a rich set of audio streaming features while remaining lightweight enough for self‑hosting. At its core, Supysonic parses a user‑defined music library, builds an SQLite metadata store, and serves HTTP endpoints that mirror the Subsonic API specification (currently v1.12.0). The application handles file discovery, media transcoding on demand, and offers a variety of playback conveniences such as playlists, cover art retrieval, star/ratings management, and integration with external scrobbling services (Last.fm, ListenBrainz). A dedicated daemon can monitor the library for changes and trigger background tasks like jukebox mode, making it suitable for both static and dynamic collections.
Architecture
| Layer | Technology | Notes |
|---|---|---|
| Web Framework | Flask | Provides the RESTful endpoints; leverages Flask’s routing, request parsing, and built‑in development server. |
| API Layer | Custom Subsonic API wrapper | Implements all required Subsonic endpoints, with optional extensions for Jukebox and scrobbling. |
| Data Persistence | SQLite (via SQLAlchemy or raw DB‑API) | Stores user accounts, library metadata, ratings, and play history. The default configuration uses a temporary directory; production setups point to a persistent location. |
| Media Handling | FFmpeg (via subprocess or ffmpeg-python) | Performs on‑the‑fly transcoding to supported formats; also extracts cover art and metadata. |
| Background Tasks | Optional daemon (supysonic-daemon) | Watches the filesystem for changes, rebuilds indexes, and runs jukebox logic. |
| Deployment | Gunicorn (WSGI) | Recommended for production; supports multiple workers and async I/O. Docker images are available, simplifying containerized deployments. |
The codebase is organized around the supysonic.web package, which exposes a factory function (create_application()) that returns a Flask app. This pattern allows developers to embed Supysonic into larger Python services or to mount it behind reverse proxies like Nginx.
Core Capabilities
- Library Browsing – Exposes folder and tag‑based navigation; clients can request album/artist listings via standard Subsonic URLs.
- Streaming & Transcoding – Supports MP3, FLAC, OGG, AAC, and more; transcoding is performed lazily per request, ensuring low memory overhead.
- Playlist Management – Users can create static or random playlists; APIs expose CRUD operations for playlist metadata.
- Cover Art & Metadata – Extracts embedded images or fetches from external sources; exposes a dedicated endpoint for album art.
- Scrobbling Hooks – Implements Last.fm and ListenBrainz scrobbles via HTTP callbacks; developers can customize the payload or add new services.
- Jukebox Mode – A stateful mode that plays tracks in a random queue, optionally honoring user preferences; controlled via the daemon and exposed API endpoints.
Deployment & Infrastructure
Supysonic is intentionally minimalistic, making it ideal for single‑node deployments on Raspberry Pi, Docker hosts, or cloud VMs. Key deployment considerations include:
- Python ≥ 3.7 – All dependencies are available on PyPI; no native extensions beyond FFmpeg.
- FFmpeg – Must be installed system‑wide; Supysonic invokes it via the command line.
- Gunicorn – Recommended for production; supports multiple workers and can be configured with systemd or Docker Compose.
- SQLite – Suitable for small to medium libraries; for larger catalogs, consider migrating the metadata store to PostgreSQL or MySQL and adjusting the ORM layer.
- Containerization – A Dockerfile is included; images can be built locally or pulled from Docker Hub. The container exposes port 5722 by default and mounts a volume for the music library and database.
Integration & Extensibility
Supysonic’s API surface mirrors Subsonic, so any existing client (e.g., VLC, Plex clients) can consume it without modification. For developers wanting to extend functionality:
- Plugin Hooks – The application exposes a simple plugin registry where custom request handlers can be registered; useful for adding new scrobbling targets or analytics.
- Webhooks – Clients can subscribe to events such as “track started” or “playlist created” via HTTP callbacks, enabling real‑time integrations.
- Configuration – YAML/JSON config files allow fine‑grained control over transcoding presets, caching, and authentication backends (basic auth or OAuth via Flask extensions).
- Testing – The test suite uses
unittestand can be extended with pytest for integration tests; third‑party services are mocked to avoid external calls.
Developer Experience
- Documentation – Comprehensive docs on ReadTheDocs cover API reference, setup guides, and developer notes. The API docs include full endpoint signatures and example payloads.
- Community – Active issue tracker on GitHub; contributors are welcomed via pull requests. The codebase is modular, with clear separation between API routes and business logic.
- Extensibility – The Flask application factory pattern makes it trivial to embed Supysonic into larger projects or to replace components (e.g., swap SQLite for PostgreSQL).
- Testing – Unit tests cover core logic, while integration tests hit real services (Last.fm, ListenBrainz). Developers can run these locally to validate changes.
Use Cases
- Home Media Server – Run on a NAS or
Open SourceReady to get started?
Join the community and start self-hosting Supysonic today
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Explore More Apps
Simple NixOS Mailserver
Self-hosted apis-services
Manifest
One-file backend for fast prototypes
Countly Community Edition
Open‑source product analytics for mobile, web, and desktop
Wakupator
Wake LAN machines on demand with IP spoofing
not3
Fast, self-hosted paste sharing for developers and teams
ntfy
Send push notifications via HTTP scripts