# Automatically start mopidy on Raspbian Jessie

**URL:** <https://discourse.mopidy.com/t/automatically-start-mopidy-on-raspbian-jessie/1056>\
**Category:** Misc\
**Created:** [January 12, 2016, 12:51am UTC](https://discourse.mopidy.com/t/automatically-start-mopidy-on-raspbian-jessie/1056 "2016-01-12T00:51:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![szuniverse](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@szuniverse](https://discourse.mopidy.com/u/szuniverse)\
**Post date:** [January 12, 2016, 12:51am UTC](https://discourse.mopidy.com/t/automatically-start-mopidy-on-raspbian-jessie/1056/1 "2016-01-12T00:51:12Z")

</div>

Hi

I already install the latest mopidy 1.1.1. And I would like to run mopidy when system starts.  
what I should modify in the

> sudo vi /etc/init.d/mopidy

file?

after that If I run this command

> sudo update-rc.d mopidy defaults

I get this warning:

> insserv: warning: current start runlevel(s) (empty) of script `mopidy' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mopidy’ overrides LSB defaults (0 1 6).

How to run mopidy automatically when system starts?

Here is my /etc/init.d/mopidy file:

`http://pastebin.com/c3NQt14G`

---

<div class="post-metadata">

**Author:** ![jodal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/jodal/32/2564_2.png) [@jodal](https://discourse.mopidy.com/u/jodal)\
**Post date:** [January 13, 2016, 11:29am UTC](https://discourse.mopidy.com/t/automatically-start-mopidy-on-raspbian-jessie/1056/2 "2016-01-13T11:29:02Z")

</div>

You shouldn’t edit `/etc/init.d/mopidy` at all. Please read [https://docs.mopidy.com/en/latest/debian/#running-as-a-system-service](https://docs.mopidy.com/en/latest/debian/#running-as-a-system-service) from the “Running as a system service” header to the end of the page. That should get you going 🙂

---

<div class="post-metadata">

**Author:** ![luslom](https://avatars.discourse-cdn.com/v4/letter/l/aca169/32.png) [@luslom](https://discourse.mopidy.com/u/luslom)\
**Post date:** [January 17, 2016, 12:00am UTC](https://discourse.mopidy.com/t/automatically-start-mopidy-on-raspbian-jessie/1056/3 "2016-01-17T00:00:55Z")

</div>

Hello,

I was getting same errors both during installation of deb package and while playing with

> sudo dpkg-reconfigure mopidy

This is probably caused by Jessies new way of loading services, so

> sudo systemctl enable mopidy

should do the trick - it worked for me.

---

<div class="post-metadata">

**Author:** ![jodal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/jodal/32/2564_2.png) [@jodal](https://discourse.mopidy.com/u/jodal)\
**Post date:** [January 17, 2016, 6:52am UTC](https://discourse.mopidy.com/t/automatically-start-mopidy-on-raspbian-jessie/1056/4 "2016-01-17T06:52:17Z")

</div>

It’s just a warning which shouldn’t have any effect on this. `dpkg-reconfigure mopidy` should work on systems with either SysV, upstart or systemd as the init system.

---

<div class="post-metadata">

**Author:** ![luslom](https://avatars.discourse-cdn.com/v4/letter/l/aca169/32.png) [@luslom](https://discourse.mopidy.com/u/luslom)\
**Post date:** [January 17, 2016, 12:59pm UTC](https://discourse.mopidy.com/t/automatically-start-mopidy-on-raspbian-jessie/1056/5 "2016-01-17T12:59:33Z")

</div>

Hello,

Mopidy was not starting on boot so I guess it was something more than a warning in this case 😉

---

<div class="post-metadata">

**Author:** ![jodal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/jodal/32/2564_2.png) [@jodal](https://discourse.mopidy.com/u/jodal)\
**Post date:** [January 20, 2016, 10:18pm UTC](https://discourse.mopidy.com/t/automatically-start-mopidy-on-raspbian-jessie/1056/6 "2016-01-20T22:18:54Z")

</div>

The default behavior of the Mopidy Debian package is to not start Mopidy at boot.

The Debian package is able to ask you if you want to run it as a service, but since it has the reasonable default of not doing so, you’re usually not presented with the question when installing the package. This of course depends on the debconf configuration on your system.

After you have installed the package, you can run `dpkg-reconfigure mopidy` to enable or disable the service. This will work both with SysV, upstart and systemd as init system, as Debian tools bridge the differences for you.

If you’re running systemd, you might also enable the service by simply running `systemctl enable mopidy`.

As to the insserv warnings: They simply mean that Mopidy’s SysV init script (that is, `/etc/init.d/mopidy`) is currently started at no ("(empty)") runlevels and are stopped at all ("(0 1 2 3 4 5 6)") runlevels. This is insserv’s backwards way of warning you that the init script is disabled. Thus, this is normal and not an error. I agree that the warning may be confusing, but there’s not much I can do about it.

Lastly, with the 1.1.2 release a couple of days ago we updated the docs to include a bit more straight forward information about running Mopidy as a service. Please see [https://docs.mopidy.com/en/latest/service/](https://docs.mopidy.com/en/latest/service/) for more information.

---

<div class="post-metadata">

**Author:** ![kraigompls69](https://avatars.discourse-cdn.com/v4/letter/k/8e8cbc/32.png) [@kraigompls69](https://discourse.mopidy.com/u/kraigompls69)\
**Post date:** [November 13, 2016, 3:39am UTC](https://discourse.mopidy.com/t/automatically-start-mopidy-on-raspbian-jessie/1056/7 "2016-11-13T03:39:23Z")

</div>

That was also good for me. Thanks.

Added: sudo systemctl enable mopidy
