Can Mopidy Run on a Raspberry Pi?

Updated

Yes. Mopidy runs on the Raspberry Pi, and the project describes the Pi as "an approachable single-board computer to run Mopidy on." You can use Raspberry Pi OS, Ubuntu, or Arch Linux as the operating system. The main requirements are the same ones Mopidy needs anywhere: a Linux (or Mac) machine with network connectivity and audio output, since Mopidy is a Python application that runs in a terminal or in the background.

What you need before starting

  • A Raspberry Pi with network connectivity and a way to get audio out (onboard audio, USB sound card, HAT, or HDMI).
  • A supported OS: Raspberry Pi OS, Ubuntu, or Arch Linux.
  • Python, since Mopidy is a Python application.
  • A client to control it — a browser-based web client or an MPD client, both available for common operating systems.

How Mopidy behaves on the Pi

Out of the box, Mopidy is an HTTP server and plays music from local files and Internet radio. If you install the Mopidy-MPD extension, it also becomes an MPD server. Additional frontends for controlling playback are available as extensions.

Because Mopidy is "just a server," the Pi doesn't need a screen or keyboard attached. You and the people around you can connect phones, tablets, or computers running MPD or web clients to search for music and manage the playlist together.

Audio hardware: the Pirate Audio case

Pimoroni recommends Mopidy for use with their Pirate Audio audio gear for Raspberry Pi. If you're choosing a HAT or add-on board for a Pi-based Mopidy setup, that's a vendor-backed combination rather than a generic guess.

Hacking on the Pi with GPIO

Mopidy's extension support and its Python, JSON-RPC, and JavaScript APIs make the Pi a workable base for custom projects. The project's own example is a Raspberry Pi embedded in an old cassette player: the buttons and volume control are wired to the Pi's GPIO pins and used to control playback through a custom Mopidy extension, while NFC tags on the cassettes select Spotify playlists.

That example shows the pattern you'd follow for your own build:

  1. Wire physical controls (buttons, dials) to GPIO.
  2. Write or install a Mopidy extension that reads those inputs.
  3. Have the extension drive playback through Mopidy's APIs.
  4. Control the server from a separate client over the network.

Practical notes

  • Cloud sources need extensions. Spotify, SoundCloud, and similar services aren't built in; they come through extensions. Plan for that step if your Pi setup depends on a streaming service.
  • The Pi is the server, not the interface. Expect to control it from another device rather than from the Pi itself.
  • Choose your OS deliberately. Raspberry Pi OS, Ubuntu, and Arch Linux are all listed as options, so pick based on your comfort with the package management and update cycle.

To get started, install Mopidy on your chosen OS and then browse the extension list for the music sources and clients you want.