Mopidy Discourse

Mopidy_local question


I’m playing around with a Pi that I’ve just bought (complete Noob) and have set up Mopidy to run as a music server. All seems fine, but am trying to get it connected to an external Hdd (ntfs) that has copies of all our old CDs on and having trouble. Am currently testing with one album and getting some results I don’t understand.

Have changed mopidy.conf to point media_dir at the folder with the music in and run sudo mopidyctl local scan. It runs fine with no warnings/errors, but then when I access Mopidy via the Musicbox Web Client, there’s no ‘local media’ folder under browse.

If I move the album off the Hdd (e.g. home/ and change mopidy.conf, all works fine and the album appears in musicbox under ‘local media’.

Both set ups produce near identical local scans results (have run
sudo mopidyctl -o logging/verbosity=4 local scan --force
and been through both outputs line-by-line to compare). The only difference that I’ve noticed is the order the files are processed in. Both return:
INFO [MainThread] mopidy_local.commands Scanned 12 of 12 files in 0.784s.
(although the scan on the hdd is slightly slower).

When I query /var/lib/mopidy/local/library.db from either set up it show that the album has been put in there. I removed the album from the folder and re-ran the scan between set ups (and queried it) to check it had been removed, so it looks like the local scan is working when I’m pointing media_dir at the Hdd.

Have tried this using Iris to access Mopidy too and had the same results.

I’m expecting that it’s something really basic that I’m missing, or something I don’t understand about where the library.db is stored and why musicbox can’t see it when I’m using the Hdd, but don’t have the knowledge to work out what - hopefully someone can point me in the right direction. Have read through pages and pages of questions / answers that have got me to this point (for which I’m incredibly grateful!), but have hit a bit of a brick wall!

Many thanks!

Even if there were no files found you should still have a Local media entry when browsing with a webclient, it would just be empty. This suggests the Local backend isn’t running. Can you provide the usual sudo mopidyctl config output? And also log output from when you restart the Mopidy service to the point you try to browse?

Thanks so much for the reply and it looks like you’re right - the backend is erroring with a permissions error (line 46 of linked log file). I’ve had a look, but can’t work out why or what I need to change.
Link to two log files:
File one: media_dirs pointing at hdd (as in the mopidy.conf below) logs from a restart, then running local scan and finally opening web client.
File two: media_dirs pointing at home/pi/music - logs coering same events, but everything works.

Have also changed DAEMON_USER to root in usr/sbin/mopidyctl as I read somewhere that might help with permissions.

Thanks again for looking - much appreciated.


hostname =

output =alsasink

media_dir = //media/pi/Music_and_Pics/Music_Test

verbosity = 4
format = %(levelname)-8s [%(threadName)s] %(name)s %(message)s
color = false
config_file =

OK, right, so that would explain the confusing fact that scanning works but using service doesn’t. Please revert that change so you run everything as the mopidy user. Running as root is never the correct answer.

If sounds like this is another permissions problem. The Mopidy service (and mopidyctl) run as user mopidy and must be able to access the files on the mounted filesystem. I would guess the mount options need changing.

1 Like

Have reverted back to mopidy user and found out how to mount the drive correctly and all works perfectly now.

Really appreciate the help and pointing me in the right direction.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.