Pirate Audio/Mopidy setup issues

I am having a couple of problems with setting up Mopidy.

When I first tried to edit /etc/mopidy/mopidy.conf, there was no [local] section in the existing file, so I added one to the end of the file. Under that section, as per the instructions, I added a line which read:

media_dir = /home/pi/Media

I then saved the configuration file.

The changes, however, do not seem to be loading properly. I’ve tried restarting the Mopidy server, as well as the Pi itself, yet every time I try to Browse the music files using the Iris Web Interface, it wants to look in var/lib/Mopidy.

I have checked to ensure the changes to the mopidy.conf file are being saved (they are). I have tried removing and re-entering them. Still, no joy.

Any help would be truly appreciated.


Same problem here. Guessing the directions are outdated?

Have you tried scanning for local music? To do so run the following at the command line:

sudo mopidyctl local scan

That should at least get the files showing in iris (assuming you’re using that as the frontend).

Matt, I’ve tried that several times. Every time I receive the following response:

unrecognized command: local

What now?



I came here to ask the same question.

As reported above, the mopidy.conf file is a very bare bones affair after following the automated setup instructions, and even adding the [local] and media_dir settings (and restarting) does not pick up the settings.

I used a fresh Buster Lite image on a Pi Zero with Pirate Audio. Tried it a few days ago, had the above problem. Tried again yesterday with a freshly downloaded Buster Lite image, same problem.

[Following these instructions](https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-pirate-audio) [Whilst also referring to these](https://github.com/pimoroni/pirate-audio/tree/master/mopidy) to do an automated setup as I'm a noob to mopidy.

Possibly of interest, the automated install had some errors near the end :

All done!
Mopidy configuration has changed, see summary below and make sure to update /etc/mopidy/mopidy.conf!
Your previous configuration was backed up to /etc/mopidy/mopidy.conf.backup-2020-03-06-17-16-57
diff: /etc/mopidy/mopidy.conf.backup-2020-03-06-17-16-57: No such file or directory

Also, following the auto install and a reboot as per instructions, /etc/mopidy does not exist! Only after a 2nd reboot does this appear, but in the bare bones format noted above - there’s no [local] part in it.

And attempting to run sudo mopidyctl local scan gives this output :

Running “/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf local scan” as user mopidy
usage: mopidy [-h] [–version] [-q] [-v] [–config FILES] [-o OPTIONS]

unrecognized command: local

Hope this info is useful and a fix can be looked into


OK, I had another attempt to install Mopidy via the automated script, and once more I was unable to see or scan my local files, despite following the instructions.

I’ve had more of a play around with it now, and I’ve found a way to get it to work.

Follow the instructions for the automated install here https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-pirate-audio

Work down to the section headed “Scanning Local Media”

sudo nano /etc/mopidy/mopidy.conf

The instructions tell you to go to the [local] section and edit media_dir= to point to your local files. But [local] does not exist.

Instead, paste this into your mopidy.conf file :

enabled = true
media_dirs = /home/pi/Music
show_dotfiles = false
excluded_file_extensions =
follow_symlinks = false
metadata_timeout = 1000

You can change the media_dirs = to point to wherever you are storing your local files.

I then restarted the server from the web interface (click “settings” on the left, then scroll down towards the bottom under “advanced”) , and then “run local scan” (same location on the menu)

So it seems that the instructions are wrong in what to add to mopidy.conf to access local files, and also the command given to scan local files - “sudo mopidyctrl local scan” does not work. Maybe these instructions refer to an older version of mopidy?

Info on what to add to mopidy.conf came from this page : https://docs.mopidy.com/en/latest/ext/file/

Hope this helps get people up and running


OK, ignore my last message - it lets you browse the folders but doesn’t add albums etc to the database from local files.

I think I’ve found the cause of the problem now, and why the sudo mopidyctl local scan command doesn’t work.

After running the Pimoroni automatic installer script, it doesn’t seem to install Mopidy-Local.

I ran

sudo python3 -m pip install Mopidy-Local

then I was able to add

media_dir = /home/pi/Media

to mopidy.conf, restart the server, rescan and lo - the music appears in the database

The command

sudo mopidyctl local scan

also now works!


That did it, Ian. Thank you so much!