A client for MPD using CGI-BIN and BASH

Project maintained by uriel1998 Hosted on GitHub Pages — Theme by mattgraham

web-based mpd utilities

(officially cgimpd )

Using BASH to create a quick web based lyrics/art view of a playing MPD instance, and using BASH and CGI to implement a web-based remote control for MPD.

cgimpd logo


  1. About
  2. License
  3. Prerequisites
  4. Installation
  5. Attribution

1. About

Originally, this repository just had the CGI implementation (cgimpd) of a remote control. Currently, it holds both that and a small script ( that creates a lightweight web page that has information about what’s playing.


There’s a lot - a lot - of different web UIs for MPD. However, they often rely on PHP, databases, don’t have a feature I need (such as cover art), or have features I didn’t need (a separate webserver). So I decided to make this for a fast, basic, but featureful remote control/status implementation.

cgimpd can be installed on a remote webserver from the MPD instance.



While I love ompd and rompr, I wanted something I could easily pull up and show folks when they asked what song was playing - or even leave up in the background without worrying that someone would accidentally click a button or press a key. mpdview does not require cgi; it runs separately on the server machine.

mpdview can also be installed on a remote webserver from the MPD instance.


2. License

This project is licensed under the MIT License. For the full license, see LICENSE.

3. Prerequisites

4. Installation

  1. Download or clone the repository, and put the uncompressed files in a location of your choice. Change into that directory.

  2. Configure cgimpd.rc

1485 < - mpd port
5 < - refresh in seconds
  1. I utilize my WebServer Covers script so that my whole music collection doesn’t have to be inside of webroot. You can, of course, symlink your music collection inside of webroot, but that just makes me uneasy.

  2. mpdview only:
    • create the directory out below the script directory
    • symlink the files in out to somewhere in your webroot
    • launch &
    • optionally run as a systemd unit
    • defaults already exist in images if fanart, artist art, or album art is not found
    • Lyrics are fetched from the music directory as [song filename].txt.
    • Fanart is simply Band Name.jpg.
  3. cgimpd only:

Format of .htaccess

#Alternate default index page
DirectoryIndex mpd.cgi

AddHandler cgi-script .cgi
Options +ExecCGI 

<Files "cgimpd.rc">
        Order Deny,Allow
        Deny from all

5. Attribution

Steven Saus injects people with radioactivity for his day job, but only to serve the forces of good.