myMPD WEB Client


# STEP15

# install myMPD WEB Client
# use a simple Internet browser with your desktop PC, tablet or phone to play and browse your music library

# install dependencies, compile and install myMPD

  1. cd ~/Downloads/

# install git if the command is not found

  1. sudo apt install git
  1. $ sudo git clone https://github.com/jcorporation/myMPD.git
  2. $ cd myMPD
  3. $ sudo ./build.sh installdeps
  4. $ sudo ./build.sh release

# install

  1. $ sudo ./build.sh install

# configure mympd or update config (new version)
# /etc/mympd.conf is no longer used in recent version, check this link for more info:
# https://jcorporation.github.io/myMPD/configuration/

# to create initial configuration with new version using systemd:

  1. $ sudo systemd-run -t -p DynamicUser=yes -p StateDirectory=mympd -p CacheDirectory=mympd /usr/bin/mympd -c

# to create initial configuration with OLD version of myMPD:

  1. $ sudo mympd -c

# configure http port to 8080
# edit and replace 80 to 8080 and CTRL+X to save

  1. $  sudo nano /var/lib/mympd/config/http_port

# deactivate SSL
# replace true to false and CTRL+X to save

  1. $ sudo nano /var/lib/mympd/config/ssl

# almost all other configuration like deactivate home page
# or auto-generated playlist (AKA myMPD smart playlist)
# are available from mympd web client directly

# ==========================================================
# configure mympd (old version)
# ==========================================================

  1. $ sudo nano /etc/mympd.conf

# change httpport = 80 to

httpport = 8080

# deactivate SSL

ssl = false

# if you want to deactivate home page and auto-generated playlist (AKA myMPD smart playlist)
# add the following in the mympd section

smartpls = false
home = false

# CTRL+O to save
# CTRL+X to exit

# ==========================================================

# activate myMPD service

  1. $ sudo systemctl enable mympd
  2. $ sudo systemctl start mympd

# OPTIONAL reboot

  1. $ sudo reboot

# check the status

  1. $ sudo systemctl status mympd

# open your internet browser firefox or chromium or safari or other
# we already configure the web server nginx (see the corresponding page for more info)

# the ssl certificate is outdated and automatically generated by myMPD, nothing to worry about

# enter the IP of your audio server
http://192.168.XXX.XXX:8080

# Enjoy your music library from any remote device

# visit myMPD repository for more info:
https://github.com/jcorporation/myMPD

# ==========================================================

TROUBLESHOOTING

# if for some reason myMPD fails at startup, it’s almost certainly a permission issue
# due to an upgrade from old version to the recent version of myMPD

mympd.service: Failed to set up special execution directory in /var/cache: File exists


# the new version of myMPD no longer uses a static ‘mympd’ group/user but the
# DynamicUser feature of systemd which automatically attributes the correct user and group
# to all myMPD directories at startup

# to cleanup your installation do the following
# (all cache and configuration files will be deleted)

  1. $ sudo systemctl stop mympd
  2. $ sudo rm -Rf /var/lib/mympd
  3. $ sudo rm -Rf /var/lib/private/mympd
  4. $ sudo rm -Rf /var/cache/private/mympd
  5. $ sudo rm -Rf /var/cache/mympd
  6. $ sudo userdel mympd
  7. $ sudo groupdel mympd

# to create initial configuration with the new version using systemd:

  1. $ sudosystemd-run -t -p DynamicUser=yes -p StateDirectory=mympd -p CacheDirectory=mympd /usr/bin/mympd -c

# now the directories are re-created by myMPD and user/group assigned by systemd,
# configure http port to 8080
# edit and replace 80 to 8080 and CTRL+X to save

  1. $  sudo nano /var/lib/mympd/config/http_port

# deactivate SSL
# replace true to false and CTRL+X to save

  1. $ sudo nano /var/lib/mympd/config/ssl

# reboot

  1. $ sudo reboot

# start myMPD with the correct config and check the status.

  1. $ sudo systemctl start mympd

# if the album cover are not visible in database view, you may try to change the music directory to NONE

# Everything should be okay.