ā Spotarr - Spotify Playlist Downloader
Spotarr is a modern, web-based Spotify playlist downloader with a sleek dark interface inspired by the *arr family of applications (Sonarr, Radarr, Lidarr). It automatically monitors your Spotify playlists and downloads new tracks as they're added, perfect for building your personal music library while maintaining your existing Spotify workflow.
šÆ Perfect for: Home media servers, music collectors, Plex users, and anyone wanting to own their music while keeping the convenience of Spotify playlists.
ā ⨠Key Features
šµ Automatic Playlist Monitoring - Continuously monitors your Spotify playlists for new tracks
š Modern Web Interface - Dark theme UI inspired by Sonarr/Radarr with real-time updates
š Rich Discord Webhooks - Beautiful embed notifications with album art and metadata
šÆ Smart Downloads - Only downloads new tracks, skips existing files
š Runtime Configuration - Update settings without container restart
š Download Statistics - Track success rates, file sizes, and download history
šļø Quality Control - Choose from Normal, High, or Very High audio quality
š Intelligent Error Detection - Distinguishes between region blocks, premium requirements, and technical issues
š± Mobile Responsive - Works perfectly on desktop and mobile devices
ā š How to Use Spotarr
ā Step 1: Get Your Spotify Playlist URLs
Open Spotify and navigate to your playlist
Click the three dots (āÆ) ā Share ā Copy link to playlist
Your URL will look like: https://open.spotify.com/playlist/37i9dQZF1DX0XUsuxWHRQd
Repeat for all playlists you want to monitor
ā Step 2: Set Up Discord Webhooks (Optional)
In Discord, go to Server Settings ā Integrations ā Webhooks
Click "New Webhook" and choose your channel
Copy the webhook URL (looks like: https://discord.com/api/webhooks/...)
You'll get beautiful notifications with album art for every download
ā Step 3: Configure Your Container
Use the docker-compose example below, replacing:
YOUR_PLAYLIST_ID with your actual playlist URLs
your_spotify_username with your Spotify username
your_spotify_password with your Spotify password
YOUR_WEBHOOK_URL with your Discord webhook (optional)
ā Step 4: Access the Web Interface
Open http://your-server-ip:8080 in your browser
Check the Dashboard for download statistics
Go to Configuration to update settings without restarting
Monitor real-time logs to see what's happening
ā Step 5: Understanding the Process
First Run : Spotarr scans your playlists and downloads all tracks
Ongoing : Every hour (configurable), it checks for new tracks
Smart Detection : Only downloads tracks that aren't already in your library
Quality Fallback : If high quality fails, automatically tries lower quality
Error Handling : Clear notifications about premium requirements or region blocks
ā š Quick Start
ā Docker Compose (Recommended)
version: "3.8"
services:
spotarr:
image: linanail/spotarr:latest
container_name: spotarr
environment:
- PLAYLIST_URLS=https://open.spotify.com/playlist/YOUR_PLAYLIST_ID
- SPOTIFY_USERNAME=your_spotify_username
- SPOTIFY_PASSWORD=your_spotify_password
- DOWNLOAD_DIRECTORY=/downloads
- WEBHOOK_URLS=https://discord.com/api/webhooks/YOUR_WEBHOOK_URL
volumes:
- /path/to/music:/downloads
- /path/to/config:/app/config
ports:
- "8080:8080"
restart: unless-stopped
Copy
ā Docker Run
docker run -d \
--name spotarr \
-p 8080:8080 \
-e PLAYLIST_URLS="https://open.spotify.com/playlist/YOUR_PLAYLIST_ID" \
-e SPOTIFY_USERNAME="your_spotify_username" \
-e SPOTIFY_PASSWORD="your_spotify_password" \
-e DOWNLOAD_DIRECTORY="/downloads" \
-v /path/to/music:/downloads \
-v /path/to/config:/app/config \
linanail/spotarr:latest
Copy
ā š Environment Variables
ā Required
Variable Description Example PLAYLIST_URLSSpotify playlist URLs (one per line) https://open.spotify.com/playlist/37i9dQZF1DX0XUsuxWHRQdSPOTIFY_USERNAMEYour Spotify username your_usernameSPOTIFY_PASSWORDYour Spotify password your_password
ā Optional
ā Infrastructure Configuration (Docker/Environment Only)
Variable Default Description DOWNLOAD_DIRECTORY/downloadsWhere to save downloaded tracks DATABASE_PATH/app/config/spotarr.dbDatabase file location WEB_INTERFACE_PORT8080Web interface port DEBUG_LOGSfalseEnable debug logging LOG_LEVELINFOLog level: DEBUG, INFO, WARNING, ERROR PUID1000User ID for file permissions PGID1000Group ID for file permissions DEBUG_REGION_DETECTIONfalseExtra logging for region detection
ā User Configuration (Web Interface Only)
š All user settings are now managed through the web interface!
Access the web interface at http://localhost:8080 to configure:
Playlist URLs : Spotify playlist URLs to monitor
Webhook URLs : Discord webhook URLs for notifications
Check Intervals : How often to check for changes (60-86400 seconds / 1min-24hrs)
Scrape Intervals : Lightweight check frequency (60-3600 seconds / 1min-1hr)
Audio Quality : Download quality (NORMAL, HIGH, VERY_HIGH)
Notification Settings : Control webhook spam for common errors
Advanced Settings : Retry counts (0-10), cleanup options, etc.
Sync Button : Manually trigger playlist synchronization
ā Configuration Validation Ranges
Setting Range Description Check Interval 60-86400 seconds Full playlist check frequency (1 minute to 24 hours) Scrape Interval Min 60-3600 seconds Minimum lightweight check interval (1 minute to 1 hour) Scrape Interval Max 60-3600 seconds Maximum lightweight check interval (1 minute to 1 hour) Max Retries 0-10 Number of retry attempts for failed downloads
ā š Volume Mounts
Path Description /downloadsDownloaded music files /app/configConfiguration and database files
ā š Using the Web Interface
Access the web interface at http://your-server:8080
ā Dashboard Page
Statistics Overview : See total downloads, failed attempts, and success rate
Recent Downloads : View your last downloaded tracks with file sizes
System Status : Check if Spotarr is running and connected to Spotify
Quick Actions : Refresh data or restart monitoring
ā Configuration Page
Add Playlists : Paste Spotify playlist URLs (one per line)
Set Quality : Choose NORMAL, HIGH, or VERY_HIGH audio quality
Configure Webhooks : Add Discord webhook URLs for notifications
Adjust Timing : Set how often to check for new tracks (default: 1 hour)
Save Settings : Changes apply immediately without restart
ā Logs Page
Real-Time Logs : Watch downloads happen live
Error Tracking : See why downloads fail (premium required, region blocks, etc.)
Auto-Refresh : Logs update automatically every few seconds
Download History : Full audit trail of all download attempts
ā š Advanced Discord Integration
ā Rich Embed Notifications
Spotarr sends beautiful, information-rich Discord embeds that rival Sonarr/Radarr:
Album Artwork Thumbnails - High-quality cover art from Spotify's CDN
Comprehensive Metadata - Artist, album, track number, duration, release date
Download Progress - Real-time status updates with progress indicators
File Information - File sizes, quality levels, and download speeds
Clickable Spotify Links - Direct links to tracks and albums
Color-Coded Status - Green for success, red for failures, yellow for warnings
ā Smart Webhook Events
ā
Download Started - Track begins downloading with quality and estimated time
šµ Download Completed - Success notification with file details and download time
ā Download Failed - Detailed error analysis with suggested solutions
š Playlist Scanned - New track discovery with batch download summaries
š Quality Fallback - Automatic quality reduction notifications
ā ļø Premium Required - Clear messaging about Spotify Premium limitations
ā Advanced Webhook Features
Rate Limit Handling - Automatic Discord rate limit compliance
Batch Notifications - Combine multiple events to reduce spam
Error Categorization - Different notification styles for different error types
Retry Notifications - Updates when failed downloads are retried
Statistics Summaries - Daily/weekly download reports
ā šµ Audio Quality
Quality Bitrate Format NORMAL~96 kbps Ogg Vorbis HIGH~160 kbps Ogg Vorbis VERY_HIGH~320 kbps Ogg Vorbis
ā ļæ½ Practical Usage Examples
ā Example 1: Basic Music Collection
Monitor your main playlist and download everything in high quality:
environment:
- PLAYLIST_URLS=https://open.spotify.com/playlist/37i9dQZF1DX0XUsuxWHRQd
- AUDIO_QUALITY=HIGH
- CHECK_INTERVAL=28800 # Full cache invalidation every 8 hours
- SCRAPE_INTERVAL_MIN=180 # Lightweight checks every 3-10 minutes
- SCRAPE_INTERVAL_MAX=600
Copy
ā Example 2: Multiple Playlists with Discord
Monitor several playlists and get Discord notifications:
environment:
- PLAYLIST_URLS=|
https://open.spotify.com/playlist/37i9dQZF1DX0XUsuxWHRQd
https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M
https://open.spotify.com/playlist/37i9dQZEVXbMDoHDwVN2tF
- WEBHOOK_URLS=https://discord.com/api/webhooks/YOUR_WEBHOOK_HERE
- AUDIO_QUALITY=VERY_HIGH
Copy
ā Example 3: Plex Media Server Integration
Download directly to your Plex music library:
volumes:
- /path/to/plex/music:/downloads
environment:
- DOWNLOAD_DIRECTORY=/downloads
- CREATE_PLAYLIST_FOLDERS=true # Organize by playlist
- FILENAME_FORMAT={artist} - {album} - {track_number:02d} - {title}.ogg
Copy
ā Example 4: Low-Resource Setup
For Raspberry Pi or low-power devices:
environment:
- AUDIO_QUALITY=NORMAL # Lower quality = smaller files
- CHECK_INTERVAL=7200 # Full check every 2 hours
- SCRAPE_INTERVAL_MIN=300 # Lightweight checks (60-3600 seconds / 1min-1hr)
- SCRAPE_INTERVAL_MAX=900 # Max interval (60-3600 seconds / 1min-1hr)
- CONCURRENT_DOWNLOADS=1
- DEBUG_LOGS=false
Copy
ā Example 5: Debug Mode
Troubleshoot issues with detailed logging:
environment:
- DEBUG_LOGS=true
- LOG_LEVEL=DEBUG
- DEBUG_REGION_DETECTION=true
- NOTIFY_PREMIUM_ERRORS=true # Get Discord alerts for premium issues
Copy
ā ļæ½ Troubbleshooting Guide
ā Common Issues & Solutions
ā "Connection refused" errors
Problem : [Errno 111] Connection refused in logs
Solutions :
This is normal : Temporary Spotify server connectivity issues
Web interface works : Configuration interface remains available at :8080
Auto-retry : Spotarr automatically retries connections every 5 minutes
Check network : Ensure container has internet access
Wait it out : Usually resolves within 10-30 minutes
ā "Cannot get alternative track" errors
Problem : Tracks fail to download with this error
Solutions :
Get Spotify Premium - Most high-quality downloads require Premium
Lower quality : Set AUDIO_QUALITY=HIGH or AUDIO_QUALITY=NORMAL
Check account : Ensure you're using Premium credentials
Wait and retry : Sometimes temporary Spotify server issues
ā Web interface not accessible
Problem : Can't reach http://your-server:8080
Solutions :
Check firewall : Ensure port 8080 is open
Verify networking : Use network_mode: host or proper port mapping
Check logs : Look for "Starting React web interface" message
Try different port : Change WEB_INTERFACE_PORT=8081
ā Permission errors in downloads
Problem : "Permission denied" when saving files
Solutions :
Set PUID/PGID : Match your user ID (id command shows your IDs)
Check directory permissions : Ensure download folder is writable
Use proper paths : Avoid spaces and special characters in paths
ā No new tracks detected
Problem : Spotarr doesn't find new tracks you added
Solutions :
Check playlist URLs : Ensure they're public or you're the owner
Wait for scan : Default is 1 hour, or restart container
Check logs : Look for "Playlist scanned" messages
Verify credentials : Ensure Spotify login is working
ā Debug Mode Setup
Enable detailed logging to diagnose issues:
environment:
- DEBUG_LOGS=true
- LOG_LEVEL=DEBUG
- DEBUG_REGION_DETECTION=true
- NOTIFY_PREMIUM_ERRORS=true
Copy
ā Getting Help
Check logs first : Most issues show clear error messages
Enable debug mode : Get detailed information about what's happening
Check Discord : Error notifications often contain helpful details
Verify setup : Ensure all required environment variables are set
ā š File Organization
Downloaded files are organized as:
/downloads/
āāā Artist - Album - 01 - Track Name.ogg
āāā Artist - Album - 02 - Track Name.ogg
āāā ...
Copy
ā š Security Notes
Store Spotify credentials securely
Use Docker secrets for production deployments
Regularly update the container image
Consider using a reverse proxy with SSL
ā š Performance
Memory Usage : ~100-200MB typical
CPU Usage : Low, spikes during downloads
Storage : Depends on music library size
Network : Moderate during active downloads
ā ļæ½ Roadmap & Future Integrations
ā š¬ Media Server Integration (Coming Soon)
Plex Integration - Automatic library scanning after downloads complete and sync the playlists with Lidarr and Plex
Jellyfin Support - Native integration with Jellyfin media servers
Emby Compatibility - Direct integration with Emby libraries
ā š± Enhanced Mobile Experience
Progressive Web App (PWA) - Install Spotarr as a mobile app
Push Notifications - Mobile notifications for download completion
Offline Dashboard - View statistics and logs without internet connection
ā š§ Advanced Features
Multi-User Support - Individual user accounts with separate playlists
Playlist Synchronization - Two-way sync between Spotarr and Spotify
Smart Playlists - Auto-generated playlists based on download patterns
Metadata Enhancement - Integration with MusicBrainz and Last.fm
Duplicate Detection - Intelligent duplicate file management
ā šµ Audio Processing
Format Conversion - Convert to MP3, FLAC, AAC on-the-fly
Metadata Tagging - Enhanced ID3 tag management and artwork embedding
Audio Normalization - Consistent volume levels across tracks
Quality Analysis - Audio quality verification and reporting
ā š Analytics & Insights
Listening Analytics - Track your music discovery patterns
Genre Analysis - Automatic genre classification and statistics
Artist Discovery - Recommendations based on download history
Playlist Health - Monitor playlist changes and track availability
ā š License
This project is licensed under the MIT License - see the LICENSE file for details.
ā ļø Important Notice : This application is for personal use only. Ensure you comply with Spotify's Terms of Service and local copyright laws. Spotarr is designed to help you manage your personal music collection and does not encourage piracy or copyright infringement. Spotarr is designed to work with music you have the right to download and is intended for personal backup and offline listening purposes.