Raspotify is a Debian package and associated repository for Debian Stable (Currently Debian 13 "Trixie") and other Debian Stable based/compatible OS's (your mileage may vary) which thinly wraps the awesome librespot library by Paul Lietar and others as a systemd daemon.
Raspotify is intended to be used in a headless enviroment. For desktop OS's spotifyd offers similar functionality and is a better choice. If you're looking for a turnkey audio solution for Raspberry Pi's with Spotify Connect support we recommend moOde™ audio player.
Librespot, and therefore Raspotify, requires a premium account.
There are various "guides" floating around online. Most if not all of them are outdated and/or present incorrect information. Don't follow them.
sudo apt-get -y install curl && curl -sL https://dtcooper.github.io/raspotify/install.sh | shOr you can just download the latest .deb package and install it manually from here:
raspotify-latest_armhf.debraspotify-latest_arm64.debraspotify-latest_amd64.debraspotify-latest_riscv64.deb
Raspotify .deb packages are built inside Docker, which cross-compiles librespot for Linux. This works on macOS with Docker Desktop or Colima.
Initialize submodules, then build for the desired architecture:
git submodule update --init --recursive
make arm64 # or: armhf, amd64, riscv64, allThe resulting packages are written to the repository root, for example:
raspotify_<version>_arm64.debasound-conf-wizard_<version>_arm64.deb
The librespot commit hash in the package filename comes from whatever commit is checked out in librespot/ at build time. build.sh runs git submodule update librespot, which resets the submodule to the commit recorded in this repository. To build against a different librespot commit, use the following approach.
Bump the submodule pointer (recommended if you intend to keep that librespot revision):
git -C librespot checkout <commit>
git add librespot
git commit -m "Bump librespot to <commit>"
make arm64Replace arm64 with armhf, amd64, or riscv64 as needed. The riscv64 target uses a separate Docker image: make builder_riscv64 before make riscv64.
To remove build artifacts and Docker images:
make clean # remove .deb files and build outputs
make distclean # clean + remove Docker imagesThe wiki is full of useful information. The Basic Setup Guide is a good place to start.
Please read the Troubleshooting Guide, the Basic Setup Guide, and search though open and closed issues and discussions before opening an issue or asking a question.
Per librespot's disclaimer, using librespot — the underlying library behind raspotify — to connect to Spotify's API "is probably forbidden by them." We've not received word about that, however use at your own risk.
Raspotify and librespot are intended for personal private use. Please DO NOT use Raspotify or librespot in any sort of commercial and/or public presentation. Doing so is a flagrant violation of Spotify's terms of service and could potentially lead to them blocking all Raspotify and librespot users.
This project is licensed under the MIT License - see the LICENSE file for details.
Special thanks to Paul Lietar, librespot org and its many contributors for librespot, which Raspotify packages (a slightly modded version of). Without librespot, Raspotify would simply not exist.
Raspotify's author David Cooper has abandoned being a software engineer to pursue a career as a radio personality. If you find Raspotify useful, you can support him by checking out his radio work here or give him a follow on Twitter.
On a related note, Kim Tore Jensen has stepped up and is maintaining the project.
Special thanks to @JasonLG1979, a former maintainer of the project.
...and remember kids, have fun!