223 words
1 minutes
Set up Navidrome with Docker for a self hosted Spotify

Set up Navidrome with Docker for a self hosted Spotify#

Learn how to deploy Navidrome in Docker, a simple self-hosted Spotify alternative for streaming your music library.

Docker Compose#

Create a new folder:

mkdir navidrome
cd navidrome

Create docker-compose.yml:

nano docker-compose.yml

Edit compose.yml:

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_LOGLEVEL: debug
    volumes:
      - "./navidrome/data:/data"
      - "./navidrome/music:/music:ro"

(Retrieved from Navidrome official website on August 16, 2025, and modified)

Start Docker:

docker compose up -d

Caddy#

Install Caddy:

apt install caddy
sudo systemctl enable caddy

Open Caddyfile:

nano /etc/caddy/Caddyfile

Add the following configuration:

music.example.com {
  reverse_proxy localhost:4533
  encode zstd gzip
}

Restart Caddy:

sudo systemctl restart caddy

Folder Permission#

Enable uploading audio files:

sudo chmod -R 777 ./navidrome

Go to Navidrome at https://music.example.com and create a new account.

Spotify Free streams at 96 kbps on mobile, so I recommend converting your audio file to MP3 format at 96 kbps to avoid using too much of your server’s bandwidth. Then, upload your MP3 file to the ./navidrome/music folder. The following command converts a song.ext file (can be FLAC, OGG, etc.) to song.mp3 at 96kbps: ffmpeg -i song.ext -b:a 96k song.mp3

If you delete everything in the ./navidrome/music folder, they might still show up in Navidrome’s interface. Navidrome does this on purpose to protect your database from being competely wiped out. (Retrieved from Navidrome GitHub Issues on August 16, 2025)

Set up Navidrome with Docker for a self hosted Spotify
https://blog.juyoun.gg/posts/en/2025/08/22/
Author
Jay
Published at
2025-08-21
License
CC BY