docker.recipes

Airsonic-Advanced

intermediate

Free music streaming server based on Subsonic.

Overview

Airsonic-Advanced is a modern, feature-rich fork of the original Airsonic music streaming server, which itself was born from the open-source community after Subsonic became proprietary. This self-hosted music streaming solution transforms your personal music library into a powerful streaming service accessible from anywhere, supporting web browsers, mobile apps, and desktop clients. Airsonic-Advanced adds significant improvements over the original including better performance, enhanced security, modern UI elements, and expanded format support for contemporary audio files. This containerized deployment leverages the LinuxServer.io image which provides excellent user permissions management, automatic updates, and optimized configuration for home server environments. The stack creates a complete personal music ecosystem that rivals commercial streaming services while maintaining full control over your music collection. Homelab enthusiasts, music collectors, and privacy-conscious users will find this solution ideal for creating their own Spotify-like experience without subscription fees or data tracking. The Subsonic API compatibility ensures access to a vast ecosystem of third-party clients, making it suitable for families, small businesses, or anyone wanting to stream their music collection across multiple devices and platforms.

Key Features

  • Native support for high-quality audio formats including FLAC, OGG, MP3, AAC, and WMA with customizable transcoding profiles
  • Comprehensive podcast management with automatic episode downloading and subscription management
  • Advanced playlist creation and sharing capabilities with smart playlist generation based on genres, artists, and ratings
  • Multi-user support with individual user libraries, permissions, and personalized recommendations
  • Real-time transcoding engine that adapts audio quality based on client capabilities and bandwidth
  • Internet radio streaming integration allowing users to add and organize online radio stations
  • Scrobbling support for Last.fm integration to track listening habits and discover new music
  • Mobile-optimized web interface with offline caching capabilities for supported clients

Common Use Cases

  • 1Home music server for families wanting to share and stream personal music collections across multiple devices
  • 2Small business background music system with centralized control and multi-location streaming
  • 3Digital music preservation for audiophiles with large FLAC collections requiring high-quality streaming
  • 4Remote access music library for frequent travelers needing access to personal music anywhere
  • 5Podcast distribution server for content creators wanting to self-host their podcast feeds
  • 6Music sharing solution for bands or musicians collaborating on projects across different locations
  • 7Privacy-focused streaming alternative for users wanting to avoid commercial streaming service data collection

Prerequisites

  • Minimum 2GB RAM recommended for transcoding operations and concurrent user support
  • Docker and Docker Compose installed with user namespace remapping configured for security
  • Organized music library with proper ID3 tags and folder structure for optimal scanning performance
  • Port 4040 available and properly forwarded if external access is required
  • Sufficient storage space for transcoding cache and thumbnail generation (additional 10-20% of music library size)
  • Understanding of media folder permissions and Linux user/group ID management for volume mounting

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 airsonic:
3 image: lscr.io/linuxserver/airsonic-advanced:latest
4 container_name: airsonic
5 restart: unless-stopped
6 environment:
7 PUID: 1000
8 PGID: 1000
9 TZ: UTC
10 volumes:
11 - airsonic_config:/config
12 - /path/to/music:/music
13 - /path/to/playlists:/playlists
14 - /path/to/podcasts:/podcasts
15 ports:
16 - "4040:4040"
17
18volumes:
19 airsonic_config:

.env Template

.env
1# Configure media paths

Usage Notes

  1. 1Docs: https://airsonic.github.io/docs/
  2. 2Access at http://localhost:4040 - default login: admin/admin
  3. 3Change admin password immediately after first login
  4. 4Configure media folders: Settings > Media Folders
  5. 5Compatible with all Subsonic clients (DSub, Ultrasonic, etc.)
  6. 6Supports transcoding, playlists, podcasts, and internet radio

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 airsonic:
5 image: lscr.io/linuxserver/airsonic-advanced:latest
6 container_name: airsonic
7 restart: unless-stopped
8 environment:
9 PUID: 1000
10 PGID: 1000
11 TZ: UTC
12 volumes:
13 - airsonic_config:/config
14 - /path/to/music:/music
15 - /path/to/playlists:/playlists
16 - /path/to/podcasts:/podcasts
17 ports:
18 - "4040:4040"
19
20volumes:
21 airsonic_config:
22EOF
23
24# 2. Create the .env file
25cat > .env << 'EOF'
26# Configure media paths
27EOF
28
29# 3. Start the services
30docker compose up -d
31
32# 4. View logs
33docker 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/airsonic-advanced/run | bash

Troubleshooting

  • Music files not appearing after scan: Verify PUID/PGID environment variables match the owner of mounted music directories and check file permissions are readable by the container user
  • Transcoding fails with format errors: Install additional codecs by modifying the container or use pre-transcoded files, and verify ffmpeg has proper permissions for the transcoding directory
  • External clients cannot connect: Check firewall rules for port 4040, verify the server URL is correctly configured in Airsonic settings, and ensure reverse proxy configurations include proper headers if applicable
  • High CPU usage during music scanning: Limit concurrent scanning threads in advanced settings, exclude unnecessary file types from scanning, and schedule scans during off-peak hours
  • Database corruption after unexpected shutdown: Enable database backups in settings and consider mounting the database directory to a reliable storage volume with proper shutdown procedures
  • Podcast downloads failing: Verify internet connectivity from container, check podcast feed URLs are accessible, and ensure sufficient disk space in the podcasts volume mount

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