Add possibility to start multiple instances of mopidy on the same computer #329

SoundTentacle opened this Issue Feb 7, 2013 · 5 comments


None yet
4 participants

It would be nice to be able to start multiple instances of mopidy.
Every instance get its own which you has to specify as start parameter


jodal commented Feb 7, 2013

I agree.

Being able to specify the config file is a part of #280.

For everyone who need this at the moment:
I've made a "quick and dirty" hack to use mopidy multiple times (this have to be done on every update of mopidy).
a first quick test was successful ...

OS: Linux Mint 14

edit "/usr/lib/pymodules/python2.7/mopidy/utils/"

insert into the "import ..." - Section:
import optparse

insert before the line:

logger = logging.getLogger('mopidy.utils.path')

the following:

def is_gst_arg(argument):
    return argument.startswith('--gst') or argument == '--help-gst'

gstreamer_args = [arg for arg in sys.argv[1:] if is_gst_arg(arg)]
mopidy_args = [arg for arg in sys.argv[1:] if not is_gst_arg(arg)]
sys.argv[1:] = gstreamer_args

parser = optparse.OptionParser()
        '-c', '--config',
        help='path of the file')
options = parser.parse_args(args=mopidy_args)[0]

replace the line

XDG_CONFIG_DIR = glib.get_user_config_dir().decode('utf-8')


if options.config_file:
        XDG_CONFIG_DIR = options.config_file.decode('utf-8')
        XDG_CONFIG_DIR = glib.get_user_config_dir().decode('utf-8')

Now you can start mopidy with "-c PATH/TO/CONFIG/"
For every new mopidy instance you have to create a new directory and place your there.
In this case: "PATH/TO/CONFIG/mopidy/"
The port-configs have to be different


adamcik commented Apr 3, 2013

Develop now supports --config=/etc/mopidy/mopidy.conf:$XDG_CONFIG_DIF/mopidy/mopidy.conf as of PR #385.

adamcik closed this Apr 3, 2013


jodal commented Apr 3, 2013

Changed milestone from v1.0 to v0.14.

how do we launch multiple instances? it looks like you're saying i should do something on the command line. looking at it doesn't look like there's a relevant setting (e.g. port)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment