Navidrome is an open-source music server that lets you stream your personal audio collection anywhere. It gives you freedom to listen to your music collection from any browser or mobile device. It’s like your personal Spotify!
In this guide, we will explore how to get Navidrome up and running securely using Podman on Fedora Linux. Best of all, because Navidrome builds official multi-architecture container images including, linux/amd64, linux/arm64, and linux/arm/v6/v7, this setup is highly portable. Whether your hardware is a standard x86 PC server or a low-powered ARM-based Raspberry Pi, this walk-through has you covered.
For the official image for Navidrome Music Server go to:
Using the official container images with Podman and Podman Compose
Container images are available for the linux/amd64, linux/arm/v6, linux/arm/v7 and linux/arm64 platforms. They include everything needed to run Navidrome
If you have SELinux enabled on your Fedora Linux server, then add the container_file_t SELinux context to the Data and Music directories and its contents.
[nico@stamfordbridge navidrome]$ sudo semanage fcontext -a -t container_file_t '/home/nico/navidrome/Data(/.\*)?'
[nico@stamfordbridge navidrome]$ sudo semanage fcontext -a -t container_file_t '/home/nico/navidrome/Music(/.\*)?'
Apply the SELinux policy to the Data and Music directories.
Create a podman-compose.yml file with the following content (or add the navidrome service below to your existing file):
[nico@stamfordbridge navidrome]$ cat podman-compose.yml
version: "3"
services:
navidrome:
image: deluan/navidrome:latest
user: 1000:1000 # should be owner of volumes
ports:
- "4533:4533"
restart: unless-stopped
environment:
# Optional: put your config options customization here. Examples:
ND_SCANSCHEDULE: 1h
ND_LOGLEVEL: info
ND_SESSIONTIMEOUT: 24h
ND_BASEURL: ""
volumes:
- "/home/nico/navidrome/Data:/data"
- "/home/nico/navidrome/Music:/music:ro"
Start the navidrome container with podman-compose up -d.
[nico@stamfordbridge navidrome]$ podman-compose up -d
Note that the environment variables above are just an example and are not required. The values in the example are already the defaults
Using podman command line tool:
[nico@stamfordbridge navidrome]$ podman run -d - name navidrome - restart=unless-stopped - user $(id -u):$(id -g) -v /home/ec2-user/navidrome/Music:/music -v /home/ec2-user/navidrome/Data:/data -p 4533:4533 -e ND_LOGLEVEL=info deluan/navidrome:latest
c00c31d49ec5e0f0a0141aef9e2b69abf6a1b5f0604515bc7111f3e0ef398237
[nico@stamfordbridge navidrome]$ podman ps -a
CONTAINERIDIMAGECOMMANDCREATEDSTATUSPORTSNAMES
c00c31d49ec5 docker.io/deluan/navidrome:latest 9 seconds ago Up 9 seconds 0.0.0.0:4533->4533/tcp navidrome
Customization
The user argument should ideally reflect the UID:GID of the owner of the music library to avoid permission issues. For testing purposes you could omit this directive, but as a rule of thumb you should not run a production container as root.
Remember to change the volumes paths to point to your local paths. /data is where Navidrome will store its DB and cache, /music is where your music files are stored.
Configuration options can be customized with environment variables as needed. For podman-compose just add them to the environment section or the yml file. For podman CLI use the -e parameter. e.g.: -e ND_SESSIONTIMEOUT=24h.
If you want to use a configuration file with Navidrome running in Podman, you can create a navidrome.toml config file in the /data folder and set the option ND_CONFIGFILE=/data/navidrome.toml.