# MusicBox-Webclient is not running in Mopidy Service

**URL:** <https://discourse.mopidy.com/t/musicbox-webclient-is-not-running-in-mopidy-service/3624>\
**Category:** Misc\
**Created:** [December 11, 2019, 11:19pm UTC](https://discourse.mopidy.com/t/musicbox-webclient-is-not-running-in-mopidy-service/3624 "2019-12-11T23:19:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jan\_welker](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/jan_welker/32/1362_2.png) [@jan\_welker](https://discourse.mopidy.com/u/jan_welker)\
**Post date:** [December 11, 2019, 11:19pm UTC](https://discourse.mopidy.com/t/musicbox-webclient-is-not-running-in-mopidy-service/3624/1 "2019-12-11T23:19:11Z")

</div>

Hello,

when I start Mopidy by typing: `mopidy`, Mopidy starts and I can use the musicbox\_webclient without any problems:

```
INFO Starting Mopidy 2.3.1
INFO Loading config from builtin defaults
INFO Loading config from /home/pi/.config/mopidy/mopidy.conf
INFO Loading config from command line options
INFO Enabled extensions: mpd, http, stream, m3u, softwaremixer, file, musicbox_webclient, local
INFO Disabled extensions: none
INFO Starting Mopidy mixer: SoftwareMixer
INFO Mixer volume set to 90
INFO Starting Mopidy audio
INFO Starting Mopidy backends: StreamBackend, M3UBackend, FileBackend, LocalBackend
INFO Audio output set to "alsasink"
INFO Loaded 0 local tracks using json
INFO Starting Mopidy core
INFO Starting Mopidy frontends: MpdFrontend, HttpFrontend
INFO MPD server running at [::ffff:127.0.0.1]:6600
INFO HTTP server running at [::ffff:0.0.0.0]:6680
INFO Starting GLib mainloop

```

When I use Mopidy as a service by typing: `sudo service mopidy start`  
I can open the website http ://127.0.0.1:6680/mopidy/. This site shows:

## Web clients

- [musicbox\_webclient](http ://127.0.0.1:6680/musicbox\_webclient/)  
Web clients which are installed as Mopidy extensions will automatically appear here.

When I click to musicbox\_webclient the site opens but the are a lot of connection issues, e.g.:

mopidy.min.js:5 WebSocket connection to ‘ws: [//127.0.0.1:6680/mopidy/ws](https://127.0.0.1:6680/mopidy/ws)’ failed: Error in connection establishment: net::ERR\_CONNECTION\_REFUSED

**This is my service status:**  
pi@music:~ $ sudo service mopidy status  
● mopidy.service - Mopidy music server  
Loaded: loaded (/lib/systemd/system/mopidy.service; disabled; vendor preset: enabled)  
Active: active (running) since Thu 2019-12-12 00:15:19 CET; 16s ago  
Process: 1600 ExecStartPre=/bin/mkdir -p /var/cache/mopidy (code=exited, status=0/SUCCESS)  
Process: 1601 ExecStartPre=/bin/chown mopidy:audio /var/cache/mopidy (code=exited, status=0/SUCCESS)  
Main PID: 1602 (mopidy)  
Tasks: 12 (limit: 2200)  
Memory: 25.2M  
CGroup: /system.slice/mopidy.service  
└─1602 /usr/bin/python2 /usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf

```
Dez 12 00:15:21 music mopidy[1602]: INFO Starting Mopidy audio
Dez 12 00:15:21 music mopidy[1602]: INFO Starting Mopidy backends: StreamBackend, M3UBackend, FileBackend, LocalBackend
    Dez 12 00:15:21 music mopidy[1602]: INFO Audio output set to "autoaudiosink"
    Dez 12 00:15:21 music mopidy[1602]: INFO No local library metadata cache found at /var/lib/mopidy/local/library.json.gz. Please run `mopidy local scan` to index your local music library. If you do not have
    Dez 12 00:15:21 music mopidy[1602]: INFO Loaded 0 local tracks using json
    Dez 12 00:15:21 music mopidy[1602]: INFO Starting Mopidy core
    Dez 12 00:15:21 music mopidy[1602]: INFO Starting Mopidy frontends: MpdFrontend, HttpFrontend
    Dez 12 00:15:21 music mopidy[1602]: INFO MPD server running at [::ffff:127.0.0.1]:6600
    Dez 12 00:15:21 music mopidy[1602]: INFO HTTP server running at [::ffff:127.0.0.1]:6680
    Dez 12 00:15:21 music mopidy[1602]: INFO Starting GLib mainloop

```

**It seems that musicbox\_webclient is not running when I Start mopedy as a service. Right?**

**This is my config:**

```
# For further information about options in this file see:
# http://docs.mopidy.com/
#
# The initial commented out values reflect the defaults as of:
# Mopidy 2.2.2
# Mopidy-File 2.2.2
# Mopidy-HTTP 2.2.2
# Mopidy-Local 2.2.2
# Mopidy-M3U 2.2.2
# Mopidy-MPD 2.2.2
# Mopidy-SoftwareMixer 2.2.2
# Mopidy-Stream 2.2.2
#
# Available options and defaults might have changed since then,
# run `mopidy config` to see the current effective config and
# `mopidy --version` to check the current version.

[core]
cache_dir = $XDG_CACHE_DIR/mopidy
config_dir = $XDG_CONFIG_DIR/mopidy
data_dir = $XDG_DATA_DIR/mopidy
max_tracklist_length = 10000
restore_state = false

[logging]
color = true
console_format = %(levelname)-8s %(message)s
debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s
debug_file = mopidy.log
#config_file =

[audio]
mixer = software
mixer_volume = 90
output = alsasink
buffer_time = 1000

[proxy]
#scheme = 
#hostname = 
#port = 
#username = 
#password = 

[mpd]
#enabled = true
#hostname = ::
#port = 6600
#password = 
#max_connections = 20
#connection_timeout = 60
#zeroconf = Mopidy MPD server on $hostname
#command_blacklist = 
# listall
# listallinfo
#default_playlist_scheme = m3u

[http]
enabled = true
hostname = 0.0.0.0
port = 6680
static_dir =
zeroconf = Mopidy HTTP server on $hostname
#allowed_origins = 
csrf_protection = true

[stream]
#enabled = true
#protocols = 
# http
# https
# mms
# rtmp
# rtmps
# rtsp
#metadata_blacklist = 
#timeout = 5000

[m3u]
enabled = true
base_dir = $XDG_MUSIC_DIR
default_encoding = latin-1
default_extension = .m3u8
#playlists_dir =

[softwaremixer]
enabled = true

[file]
enabled = true
media_dirs = 
  $XDG_MUSIC_DIR|Music
  ~/|Home
excluded_file_extensions = 
  .jpg
  .jpeg
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

[local]
enabled = true
library = json
media_dir = $XDG_MUSIC_DIR
scan_timeout = 1000
scan_flush_threshold = 100
scan_follow_symlinks = false
#excluded_file_extensions = 
# .directory
# .html
# .jpeg
# .jpg
# .log
# .nfo
# .png
# .txt

[musicbox_webclient]
enabled = true
musicbox = false
websocket_host =
websocket_port =
on_track_click = PLAY_ALL
```

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [December 11, 2019, 11:51pm UTC](https://discourse.mopidy.com/t/musicbox-webclient-is-not-running-in-mopidy-service/3624/2 "2019-12-11T23:51:23Z")

</div>

[https://docs.mopidy.com/en/latest/service/](https://docs.mopidy.com/en/latest/service/) for help when running as a service.

`sudo mopidyctl deps` shows the extensions Mopidy has found; is musicbox-webclient found?

`sudo mopidyctl config` shows the config being used.

If you want to use an extension installed from PyPi _with the service_ then the extension must be installed with `sudo pip install MOPIDY-EXTENSION`.

---

<div class="post-metadata">

**Author:** ![jan\_welker](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/jan_welker/32/1362_2.png) [@jan\_welker](https://discourse.mopidy.com/u/jan_welker)\
**Post date:** [December 12, 2019, 8:52pm UTC](https://discourse.mopidy.com/t/musicbox-webclient-is-not-running-in-mopidy-service/3624/3 "2019-12-12T20:52:57Z")

</div>

Hello kingosticks,

thanks for your fast resonse!  
The mistake was: the /home/pi/.config/mopidy/mopidy.conf was configured correctly, but the /etc/mopidy/mopidy.conf was empty 😃

You helped me a lot to find the mistake. Thank you

Best,  
Jan
