-
-
Notifications
You must be signed in to change notification settings - Fork 134
Getting started
Iris is a frontend for the Mopidy music server. The purpose of Iris is to pull together a variety of music sources and present them in an extremely functional and user-friendly experience. All of your Mopidy extensions are accessible with Iris.
- Mopidy
- Mopidy-Spotify (recommended, not required)
- Mopidy-Local (recommended, not required)
- Run
sudo python3 -m pip install Mopidy-Iris
. - Run
sudo sh -c 'echo "mopidy ALL=NOPASSWD: /usr/local/lib/python3.7/dist-packages/mopidy_iris/system.sh" >> /etc/sudoers'
to allow mopidy user sudo permission to run the Iris installer. If you've customised your install location, make sure you change the path to Iris'system.sh
file.
- Pull code base
git clone [email protected]:jaedb/Iris.git
- Install package
sudo python3 setup.py install
- Run
sudo sh -c 'echo "mopidy ALL=NOPASSWD: XXX/mopidy_iris/system.sh" >> /etc/sudoers'
to allow mopidy user sudo permission to run the Iris installer, where XXX is your path to Iris (eg/var/www/iris/
).
- Create an empty directory
iris
and refer to this repository for sample files. - Create
docker-compose.yml
(sample) and update as required. - Create file
docker/mopidy.conf
(sample) and update as required - Run
docker compose up
- If you're running Docker on a Mac using pulseaudio
- Follow these instructions to install Pulseaudio
- Edit
docker-composer.yaml
to include:
mopidy:
environment:
- PULSE_SERVER=docker.for.mac.localhost
volumes:
- ~/.config/pulse:/home/pulseaudio/.config/pulse
- Edit
mopidy.conf
to include:
[audio]
output = pulsesink server=docker.for.mac.localhost
# Or use the following for both pulseaudio AND snapcast
#output = tee name=t t. ! queue ! pulsesink server=docker.for.mac.localhost t. ! audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! wavenc ! filesink location=/tmp/snapfifo
Iris will work for most users out-of-the-box. You can customise some of the configuration settings if you wish.
These optional values are defined in your mopidy.conf
file. They can be set in the [iris]
section.
-
country
- Spotify-based country code
- Defaults to
nz
-
locale
- Spotify-based locale code
- Defaults to
en_NZ
-
spotify_authorization_url
- The URL to use as Spotify OAuth gateway. This is only used when you authenticate Iris with Spotify.
- If you wish to configure and host your own gateway script see the example
auth_spotify.php
script. - Defaults to
https://jamesbarnsley.co.nz/auth_spotify.php
-
lastfm_authorization_url
- The URL to use as LastFM OAuth gateway. This is only used when you authenticate Iris with LastFM.
- If you wish to configure and host your own gateway script see the example
auth_lastfm.php
script. - Defaults to
https://jamesbarnsley.co.nz/auth_lastfm.php
-
data_dir
- Path to Iris-specific data. Useful for Docker containers and exporting your commands.
- Defaults to
$XDG_DATA_DIR/iris
-
snapcast_enabled
- Enable Snapcast configuration section
- Defaults to
true
-
snapcast_host
- Hostname/IP of the Snapcast server
- Defaults to
localhost
-
snapcast_port
- Port of the Snapcast control interface
- Defaults to
1780
-
snapcast_stream
- Name of this Mopidy instance Snapcast stream for Iris to send track metadata to. This should match your stream definition in
snapserver.conf
(eg whereDefault
inpipe:///tmp/snapfifo?name=Default&sampleformat=48000:16:2&control_url=https://iris.local:443
) - Defaults to
Default
- Name of this Mopidy instance Snapcast stream for Iris to send track metadata to. This should match your stream definition in
Read the Mopidy documentation for more information about configuring your Mopidy setup.
- Start the Mopidy server:
service mopidy start
(ormopidy
if you are not running Mopidy as a service). - Open your browser at
http://localhost:6680/iris/
(orhttp://hostname:6680/iris/
, wherehostname
is your server's hostname or IP address).
Tip: you can build a shareable link to pre-populate the Initial Setup step by appending your host and port values to the url. For example: https://my-iris-proxy/iris/initial-setup?host=my-other-iris-proxy&port=1234
- Ensure you're running Mopidy as a service
- If you haven't already, run
sudo echo "mopidy ALL=NOPASSWD: /usr/local/lib/python3.7/dist-packages/mopidy_iris/system.sh" >> /etc/sudoers
to allow mopidy user sudo permission to run the Iris installer. If you've customised your install location, make sure you change the path to Iris'system.sh
file. - You can now upgrade using the Upgrade button under Settings. Mopidy will restart after upgrade is complete.
- Run
sudo python3 -m pip install --upgrade Mopidy-Iris
. - Restart Mopidy
If you're experiencing dependency issues, try installing without dependencies sudo python3 -m pip install --upgrade --no-deps Mopidy-Iris
.
Note: if you are not running Mopidy as a service then you can omit sudo
from python -m pip...
commands.