Mastodon Skip to main content

Install MusicBrainz in Docker

Getting your music collection tagged properly, and finding the album art was a tedious, manual process for many years, but also a source of pride in owning a well defined digital music collection.  Today it's been made much easier thanks to tools like MusicBrainz Picard.  This revolutionary tool can scan your music collection, match it up using the wave forms of the music, and identify it with a high degree of accuracy.  Using massive databases of music it's able to add the proper ID3 tags, and help find the right album art for the album a song came from, even if it's just 1 song.  The other benefit to albums, artists, and other data is it offers another way to easily and quickly view your music in organized groupings.

Combine this with a streaming application server like Navidrome, Ampache, AirSonic, FunkWhale, or MStream, and you have an incredible set of tools for enjoying your music on your terms.

Installation of Docker and Docker Compose via a Simple Script

You can easily install Docker-CE, Docker-Compose, Portainer-CE, and NGinX Proxy manager by using this quick install script I created and maintain on Github.  Just use the command:

wget https://gitlab.com/bmcgonag/docker_installs/-/raw/main/install_docker_nproxyman.sh

To download the script to your desired host.

Change the permissions to make the script executable:

chmod +x ./install_docker_nproxyman.sh

and then run the script with the command:

./install_docker_nproxyman.sh

When run, the script will prompt you to select your host operating system, then will ask you which bits of software you want to install.

Simply enter 'y' for each thing you want to install.

At some point, you may be asked for your super user (sudo) password as well.

Allow the script to complete installation.

At this point, you might want to log out and back in, as this will allow you to use the docker and docker-compose commands without the need of sudo in front of them.

What You'll Need

  • A Server or Machine with your Music Collection on it
  • Docker and Docker-Compose (if you want to run it via Docker like I do)
  • About 10 minutes of your time

Create our Docker Compose

First, let's create a folder for our installation:

mkdir -p docker/picard

Now, let's move into that folder, and create our docker-compose.yml file that will help us pull down the image and get everything running so we can access MusicBrainz in the browser.

cd docker/picard

nano docker-compose.yml

Now, copy the code snippet below, and paste it into your new docker-compose.yml file.

version: '3.3'
services:
    musicbrainz:
        container_name: musicbrainz
        ports:
            - '7120:5800'
        volumes:
            - './config:/config:rw'
            - '/mnt/data/media/music:/storage:rw'
        image: mikenye/picard

In the file, you'll want to change the left side of the volume mapping for '/storage' to be the path to your data location. In my case my music is stored in /mnt/data/media/music.  Your path is very likely to be different, so definitely make that change, then save and exit.

Save the file with CTRL + O, then press Enter to confirm, and exit the nano editor with CTRL + X.

Now we can run our application with the command:

docker compose up -d

If you have an older version of docker compose, you may need to add a hyphen between docker and compose to get the command to run...like this:

docker-compose up -d

Once running, you'll see the image being pulled down, the container will start, and you'll be put back at the prompt in your terminal.

Now, open your favorite modern browser, and navigate to the IP address of your host machine running docker, and the port 7120.

You should be greeted with the MusicBrainz Picard user interface. 

You may see a pop-up in the interface about a new version being available. This is ok, just click the Cancel button for now.

Make sure to check out the video to see how to select, identify, and save the new data for your music collection using MusicBrainz Picard!

Support My Channel and Content

Support my Channel and ongoing efforts through Patreon:
https://www.patreon.com/awesomeopensource