docker.recipes

Navidrome Music Server

beginner

Navidrome music server with Subsonic API compatibility.

Overview

Navidrome is a modern, self-hosted music streaming server that provides a web-based interface and Subsonic API compatibility for accessing your personal music collection from anywhere. Originally developed as a lightweight alternative to more resource-intensive music servers, Navidrome focuses on simplicity, performance, and cross-platform compatibility while supporting a wide ecosystem of mobile and desktop music clients through its Subsonic API implementation. This Docker deployment creates a complete personal music streaming solution that automatically scans and indexes your music library, generates album artwork, and provides both a responsive web interface and API endpoints for third-party applications. The container runs with proper user permissions to access your music files safely while maintaining persistent configuration and database storage separate from your media files. This setup is ideal for music enthusiasts who want to stream their personal collection across devices, families sharing a music library, or anyone seeking to reduce dependence on commercial streaming services. The Subsonic API compatibility means you can use dozens of existing mobile apps and desktop clients, making Navidrome a drop-in replacement for commercial services while keeping full control over your music data and streaming quality.

Key Features

  • Subsonic and OpenSubsonic API compatibility for use with dozens of existing mobile and desktop music clients
  • Automatic music library scanning with configurable intervals and real-time file system watching
  • Built-in audio transcoding with support for multiple codecs and bitrate conversion on-the-fly
  • Smart playlists and favorites with support for importing existing M3U playlists
  • Multi-user support with individual libraries, playlists, and listening statistics
  • Last.fm scrobbling integration for tracking listening habits across platforms
  • Responsive web interface with support for offline playback and queue management
  • ReplayGain support for consistent volume levels across tracks and albums

Common Use Cases

  • 1Personal music streaming server for accessing large FLAC collections from mobile devices
  • 2Family music sharing with separate user accounts and parental controls
  • 3Audiophile setups requiring lossless streaming with on-demand transcoding for mobile
  • 4Home lab environments consolidating media services with existing NAS storage
  • 5Small office background music systems with centralized library management
  • 6Travel and remote access to personal music collections via VPN or reverse proxy
  • 7Migration path from commercial streaming services while maintaining mobile app compatibility

Prerequisites

  • Docker and Docker Compose installed with at least 512MB available RAM
  • Music library organized in a directory structure accessible to Docker containers
  • Port 4533 available for the Navidrome web interface and API access
  • Basic understanding of file permissions and user/group IDs for media access
  • Network access configuration if planning to use external Subsonic clients
  • Sufficient disk space for transcoding cache and database storage

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 navidrome:
3 image: deluan/navidrome:latest
4 container_name: navidrome
5 restart: unless-stopped
6 user: "${PUID:-1000}:${PGID:-1000}"
7 ports:
8 - "${NAVIDROME_PORT:-4533}:4533"
9 environment:
10 ND_SCANSCHEDULE: ${SCAN_SCHEDULE:-1h}
11 ND_LOGLEVEL: info
12 ND_SESSIONTIMEOUT: 24h
13 ND_BASEURL: ""
14 volumes:
15 - navidrome_data:/data
16 - ${MUSIC_PATH:-./music}:/music:ro
17 networks:
18 - media-network
19
20volumes:
21 navidrome_data:
22
23networks:
24 media-network:
25 driver: bridge

.env Template

.env
1# Navidrome Music Server
2NAVIDROME_PORT=4533
3PUID=1000
4PGID=1000
5MUSIC_PATH=./music
6SCAN_SCHEDULE=1h

Usage Notes

  1. 1Navidrome at http://localhost:4533
  2. 2Create admin account on first run
  3. 3Use any Subsonic-compatible client
  4. 4Supports transcoding on the fly

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 navidrome:
5 image: deluan/navidrome:latest
6 container_name: navidrome
7 restart: unless-stopped
8 user: "${PUID:-1000}:${PGID:-1000}"
9 ports:
10 - "${NAVIDROME_PORT:-4533}:4533"
11 environment:
12 ND_SCANSCHEDULE: ${SCAN_SCHEDULE:-1h}
13 ND_LOGLEVEL: info
14 ND_SESSIONTIMEOUT: 24h
15 ND_BASEURL: ""
16 volumes:
17 - navidrome_data:/data
18 - ${MUSIC_PATH:-./music}:/music:ro
19 networks:
20 - media-network
21
22volumes:
23 navidrome_data:
24
25networks:
26 media-network:
27 driver: bridge
28EOF
29
30# 2. Create the .env file
31cat > .env << 'EOF'
32# Navidrome Music Server
33NAVIDROME_PORT=4533
34PUID=1000
35PGID=1000
36MUSIC_PATH=./music
37SCAN_SCHEDULE=1h
38EOF
39
40# 3. Start the services
41docker compose up -d
42
43# 4. View logs
44docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/navidrome-music-server/run | bash

Troubleshooting

  • Music files not appearing in library: Check PUID/PGID environment variables match your music directory ownership and verify the music path mount is correct
  • Transcoding failures or poor audio quality: Ensure the container has sufficient CPU resources and check ND_LOGLEVEL for FFmpeg errors in container logs
  • Subsonic client connection errors: Verify the client is using the correct server URL format (http://server:4533) and that API compatibility is enabled in Navidrome settings
  • Slow library scanning on large collections: Adjust ND_SCANSCHEDULE to a longer interval and consider using SSD storage for the database volume
  • Web interface not accessible: Check that NAVIDROME_PORT environment variable matches your desired port and verify firewall rules allow access to port 4533
  • Database corruption after container restart: Ensure navidrome_data volume has proper write permissions and avoid force-stopping the container during scan operations

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space