MPD Server Guide?

    • OMV 4.x
    • MPD Server Guide?

      Hi,
      First time poster - be gentle!

      Am looking to setup an MPD server in OMV 4.1.12 using a docker. I've found a docker vimagick/mpd but my attempts to set it up are failing with an error I think is related to Volumes and Bind paths but I don't have enough experience with docker to troubleshoot the problem :S . So I wondered if anyone has written (or would be kind enough to write) a guide or pointers for installing this correctly.

      I think these are the settings I'm trying to figure out in the run image dialog:

      mpd: image: vimagick/mpd ports: - "6600:6600" - "8800:8800" volumes: - ./mpd.conf:/etc/mpd.conf - ./music:/var/lib/mpd/music - ./playlists:/var/lib/mpd/playlists devices: - /dev/snd restart: always

      Thanks.
    • I looked the Docker over on hub.docker.com . To set up the Docker and verify that it's actually working, it's usually necessary to have at least some knowledge of how the app itself works. The "Music Player Deamon" is a true Client / Server music app (2 parts) that doesn't appear to have an easy setup on either end.


      This is the -> guides section of the forum. There are a number of popular media player Docker How-To's -> here. And a number of popular media player How-To video's -> here.

      Video Guides :!: New User Guide :!: Docker Guides :!: Pi-hole in Docker
      Good backup takes the "drama" out of computing.
      ____________________________________
      Primary: OMV 3.0.99, ThinkServer TS140, 12GB ECC, 32GB USB boot, 4TB+4TB zmirror, 3TB client backup.
      OMV 4.1.13, Intel Server SC5650HCBRP, 32GB ECC, 16GB USB boot, UnionFS+SNAPRAID
      Backup: OMV 4.1.9, Acer RC-111, 4GB, 32GB USB boot, 3TB+3TB zmirror, 4TB Rsync'ed disk
    • Thanks for the reply.

      Sounds like it's not going to be as straight forward as I'd hoped. My plan was to setup an MPD server on my OMV-NAS and use Cantata (My absolute fav music player) and MPDroid as clients. Cantata is easy to setup as a client with just the server and port to point to so shouldn't be difficult (famous last words) so that leaves the MPD server. Thought I'd cracked it when I found the vimagick/mpd server but couldn't figure out how to enter the volumes and devices in the docker dialog (assuming that there's nothing else difficult - a leap in faith I know). Anyways, it doesn't seem as easy as that so I'll have to come up with a plan B.

      I think I'll need to do more reading and maybe I can setup an MPD server directly in Debian, although I'd much rather run it as a docker but hey-ho.

      Thanks again for your reply and I'll also check the links you've given for other guides and media player how-to's.
    • I'm pretty sure the Docker itself wouldn't be too hard to set up. But again, part of knowing if the Docker is working correctly is knowing how to use the app or server the Docker is running.

      You're right, in that running any server is best done in a Docker versus a direct install.
      (With a Docker, it's dirt simple to delete everything and start over, with Zero impact to the host server.)
      ___________________________________________________________

      On Dockers, you mentioned Volumes.

      Where it comes to Volumes and Bind Points, in the Docker Plugin:
      This is the appropriate way to get data into, or out of, a Docker.

      As is indicated in the Docker plugin, the left is the host path and folder (your server). The right side is the path and folder inside the container.

      Consider the following:
      Host Path.......................................Container Path
      /srv/dev-disk-by-label-DATA1/Music......./music

      On the left side is the full path to music on one of my servers. Everything in that location would show up, inside the Docker container, at /music, to include all files and sub-directories under /srv/dev-disk-by-label-DATA1/Music on the host side.
      Since the /srv/dev-disk-by-label-DATA1/Music share is a media share, setting the permissions (on the host side) for Others to at least Read makes sense and would give your Docker server Read access to the media on the host, in that location.

      Another example:
      Host Path.......................................Container Path
      /dockerparms/MPD_server.................../etc/config

      In this example, anything the container saves to /etc/config shows up on the host at /dockerparms/MPD_server. What's good about this is, every time your start your Docker, it's as if you're starting it for the first time. However, if parameters are saved (in this case to /etc/config), they're copied to the host (at /dockerparms/MPD_server) which means those changes will survive a reboot of the container or your server. When the container starts the next time, the saved configuration is used.

      ____________________________________________________________


      The following might get you started in configuring
      vimagick/mpd in OMV's Docker plugin:

      Given what I saw on the Docker Hub, I believe this Docker would run fine in HOST mode.
      This will do a one-to-one mapping of host ports. The ports being used by this Docker are not used by OMV. (No conflicts.)

      The restart policy would be Always

      The following is how I might set Volumes and Bind points, in the container.


      Host Path.............................Container Path

      /dockerparms/mpd.conf............/etc/mpd.conf
      /path-to-your/music................/var/lib/mpd/music
      /dockerparms/mpd/playlists
      ......./var/lib/mpd/playlists

      In the above, replace /path-to-your/music with the actual path to your server's music share. Note that it's not necessary to create the folders on the host side, if they don't exist. The plugin will do that. However, the path to your music share must be accurate. (If you use the little folder icon, a popup will let you navigate to the right host location.)


      I believe the device could be handled with the following statement in the extra arguments line:

      -d /dev/snd

      Finally, from what I saw on the hub, you'd have to get on the command line, inside the container, to finish the install.
      To get an idea of how to do that, you might want to consider going through this Docker Tutorial. Since it's command line oriented, when you're finished, you'll know how to get in and complete the install on the containers command line. Also, OMV's Docker Plugin will make more sense.

      Video Guides :!: New User Guide :!: Docker Guides :!: Pi-hole in Docker
      Good backup takes the "drama" out of computing.
      ____________________________________
      Primary: OMV 3.0.99, ThinkServer TS140, 12GB ECC, 32GB USB boot, 4TB+4TB zmirror, 3TB client backup.
      OMV 4.1.13, Intel Server SC5650HCBRP, 32GB ECC, 16GB USB boot, UnionFS+SNAPRAID
      Backup: OMV 4.1.9, Acer RC-111, 4GB, 32GB USB boot, 3TB+3TB zmirror, 4TB Rsync'ed disk

      The post was edited 2 times, last by flmaxey: edit ().

    • Thanks for the very detailed reply.

      There's obviously a lot in it that I'll need to digest and much more reading to get my head around the Cli for dockers and the MPD server but you've given me a huge leg-up.

      I've setup a Virtualbox instance so I can play around with some test setups before attempting in on my proper NAS box.

      Thanks again, you've been a great help.
    • No problem. Now you might an idea why I was nudging you toward an existing media server Docker "How-To". :)

      And while it's a great idea, note that you may run into networking issues when running OMV, with Dockers, in a VM. Virtualbox uses a secondary network on the host, for guests (OMV). That works fine.
      But when setting up the Docker plugin, in the OMV guest, note that Docker applies an additional full network of it's own, for internal admin, and interfaces for it's containers. While your container might work, depending on the Docker networking mode used, I've run into problems with multiple networks and multiple interfaces running on the same physical adapter. Essentially, you'd be running a VM (Docker) in a VM (Virtualbox). Problems can result.

      To eliminate a potential issue, the best approach might be to install OMV onto a thumbdrive and use a real hardware platform. While leaving the workstation's installed boot drive alone, you can boot to and configure OMV on the USB drive, and create Docker containers in the Docker Plug in. If your Docker configuration works this way, it should work on your server.

      Video Guides :!: New User Guide :!: Docker Guides :!: Pi-hole in Docker
      Good backup takes the "drama" out of computing.
      ____________________________________
      Primary: OMV 3.0.99, ThinkServer TS140, 12GB ECC, 32GB USB boot, 4TB+4TB zmirror, 3TB client backup.
      OMV 4.1.13, Intel Server SC5650HCBRP, 32GB ECC, 16GB USB boot, UnionFS+SNAPRAID
      Backup: OMV 4.1.9, Acer RC-111, 4GB, 32GB USB boot, 3TB+3TB zmirror, 4TB Rsync'ed disk

      The post was edited 2 times, last by flmaxey: edit2 ().

    • The Docker How-to is very good. Would definitely recommend it to anyone else new to the subject, a great primer.

      Understand about the VM network potential issues. I usually run the VM with the Bridged Adaptor network setting so it appears directly on the LAN but appreciate the extra complexities of running the docker too. If I do have any issues it's good to know that I can revert to the USB thumbdrive method you suggest.

      Once again, thanks for your fantastic posts.
    • Hi flimaxy,

      Well my first attempts at running the image resulted in the following error:


      Source Code

      1. Error #0:
      2. OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; docker run -d --restart=always -v /etc/localtime:/etc/localtime:ro --net=bridge -p 0.0.0.0:6600:6600/tcp -p 0.0.0.0:8800:8800/tcp -e PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -v "/sharedfolders/Appdata/Mpd":"/etc/mpd.conf":rw -v "/sharedfolders/Media1/Music":"/var/lib/mpd/music":rw -v "/sharedfolders/Appdata/Mpd/playlists":"/var/lib/mpd/playlists":rw --name="mpd" --label omv_docker_extra_args="-d /dev/snd" -d /dev/snd "vimagick/mpd:latest" 2>&1' with exit code '125': docker: invalid reference format.
      3. See 'docker run --help'. in /usr/share/php/openmediavault/system/process.inc:182
      4. Stack trace:
      5. #0 /usr/share/openmediavault/engined/rpc/docker.inc(587): OMV\System\Process->execute()
      6. #1 [internal function]: OMVRpcServiceDocker->runContainer(Array, Array)
      7. #2 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
      8. #3 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('runContainer', Array, Array)
      9. #4 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Docker', 'runContainer', Array, Array, 1)
      10. #5 {main}
      Tried with both your suggested settings and the /sharedfolders/xxx variations above but they both failed with the same error.

      So I seem to have an error '125' to deal with. Tried setting this up on both the VM and a USB thumbdrive in the NAS server but got the same error on both (At least it's consistent). Have double-checked my settings but can't see an error at the moment.

      So I'm going to go off and do more research and reading.


      Hi TechnoDadLife. - Have you managed to setup an MPD server?

      Great tutorials by-the-way, keep them coming.
    • Hi TechnoDadLife,

      Can I ask was it the same docker image (vimagick/mpd) that you were trying to setup or another one?. And if it was the same one did you get further than me (ie did you get the container to run but failed to get it configured correctly) or did you also get the same error?
    • What might be incorrect is the extra arguments, I can understand -d and why @flmaxey has used that, but the invalid format implies that a format is not set correctly, i.e. capital letters rather than lower case. The -d makes sense, but it could be that it simply doesn't like or understand it.

      Just did a search try --device /dev/snd in the extra arguments
      Raid is not a backup! Would you go skydiving without a parachute?

      The post was edited 1 time, last by geaves ().