Raspberry Pi as a music server

apt install mopidy

Installing more

Install from apt.mopidy.com

  • Add the archive‚Äôs GPG key:

wget -q -O - https://apt.mopidy.com/mopidy.gpg | sudo apt-key add -

Add the APT repo to your package sources:

sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/buster.list

Install Mopidy and all dependencies:

sudo apt update

sudo apt install mopidy

Run

mopidy

Stop

ctrl-c command line or pkill mopidy

Config more

mopidyctl config

override settings /etc/mopidy/mopidy.conf or /root/.config/mopidy/mopidy.conf

Uncomment

[http] enabled = true hostname = 192.168.178.46 port = 6680 zeroconf = Mopidy HTTP server on $hostname allowed_origins = csrf_protection = true default_app = mopidy

data directory

/var/lib/mopidy

Local data dir

Install more more

sudo python3 -m pip install Mopidy-Local [local] media_dir = /root/mopidy

Check firewall

Enable port in firewall ufw allow 6680/tcp

Web client

python3 -m pip install Mopidy-Iris

Enable in config

sudo vi /root/.config/mopidy/mopidy.conf


[iris]
enabled = true
country = GB
locale = en_GB
#spotify_authorization_url = https://jamesbarnsley.co.nz/iris/auth_spotify.php
#lastfm_authorization_url = https://jamesbarnsley.co.nz/iris/auth_lastfm.php
#genius_authorization_url = https://jamesbarnsley.co.nz/iris/auth_genius.php
data_dir = $XDG_DATA_DIR/iris```