Swing Music is a beautiful, self-hosted music player and streaming server for your local audio files. Like a cooler Spotify ... but bring your own music.
License: MIT. Built with: Python, Dockerfile, Shell. Website: https://swingmusic.vercel.app/. Source: https://github.com/swingmx/swingmusic.
The `libev` package is needed on Linux and MacOS. You can install it on other system as shown: ```sh # Arch Linux pacman -S libev # Fedora, CentOS dnf install libev-devel # MacOS brew install libev ``` Then make the file executable first. ```bash chmod a+x ./swingmusic ./swingmusic ``` The app should start at <http://localhost:1970> by default. Open it in your browser to configure and use Swing Music. You can change the default port by using the `--port` flag. ```sh ./swingmusic --port 1980 ``` > [!IMPORTANT] > The default password for user `admin` is "admin". Please change the password via the settings after first login. To stream your music from your Android device, you can download the [Android mobile client](https://github.com/swingmx/android). ### Options Options flags can be passed when starting the app in the terminal to tweak runtime settings or perform tasks. You can use the `-h` flag to see all supported options. > [!TIP] > You can read more about options in [the docs](https://swingmusic.vercel.app/guide/getting-started.html#options). ### Docker Pull the latest Docker image and run it: ```sh docker pull ghcr.io/swingmx/swingmusic:latest ``` ```sh docker run --name swingmusic -p 1970:1970 \ -v /path/to/music:/music \ -v /path/to/config:/config \ --restart unless-stopped \ ghcr.io/swingmx/swingmusic:latest ``` Don't forget to replace `/path/to/music` and `/path/to/config` with the appropriate values. In addition, specify the the `/music` directory as the root directory. Using the `Home Directory` option won't work. > [!TIP] > For more info, see the [Docker section](https://swingmusic.vercel.app/guide/getting-started.html#docker) on the docs. #### Using Docker Compose Here's a sample Docker compose file: ```yaml services: swingmusic: image: ghcr.io/swingmx/swingmusic:latest container_name: swingmusic volumes: - /path/to/music:/music - /path/to/config:/config ports: - "1970:1970" restart: unless-stopped
Self-hosting gives you three things SaaS can’t: data ownership (the files live on disks you control), cost predictability (a one-time setup vs. recurring per-seat fees that grow with your household or team), and longevity (open-source means the app keeps working even if the maintainers move on, since you can pin a working version). The trade-off is that you take on the operational work of running a server, applying updates, and handling backups.
Most self-hosted apps run comfortably on modest hardware — a Raspberry Pi 4, a mini PC, a NAS with Docker support, or a small VPS is usually enough for personal or family use. CPU and RAM requirements scale with how many simultaneous users or how much data you push through SwingMusic. Storage requirements depend on the kind of data you keep; check the README for guidance on data retention.
Last verified: 2026-04-21