Self-hosted web GUI for spotdl. Spotify URL MP3 downloader
This web application allows users to download Spotify tracks, albums, and playlists as MP3 files through a browser interface. It uses Flask as the web server, connects to Spotify's API for metadata, and uses yt-dlp to download audio.
# Create directory for the application
mkdir -p /volume/spotdl
cd /volume/spotdl
# Create virtual environment
python3 -m venv venv
# Activate virtual environment
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Create .env file
cat > .env << EOF
SPOTIPY_CLIENT_ID=your_spotify_client_id
SPOTIPY_CLIENT_SECRET=your_spotify_client_secret
SPOTIPY_REDIRECT_URI=http://your_server_ip:7667/callback
FLASK_APP_SECRET=your_random_secret_key
EOF
Copy the provided files to their proper locations:
spotdl.py
→/volume/spotdl/spotdl.py
spotdl.html
→/volume/spotdl/spotdl.html
spotdl.sh
→/volume/spotdl/spotdl.sh
spotdl-service.sh
→/usr/local/etc/rc.d/spotdl-service.sh
# Make the shell scripts executable
chmod +x /volume/spotdl/spotdl.sh
chmod +x /usr/local/etc/rc.d/spotdl-service.sh
# Create downloads directory
mkdir -p /volume/spotdl/downloads
Edit /usr/local/etc/rc.d/spotdl-service.sh
to set the correct username:
# Replace "user" with your actual username
USER="your_username"
cd /volume/spotdl
./spotdl.sh
# Start the service
sudo /usr/local/etc/rc.d/spotdl-service.sh start
# Stop the service
sudo /usr/local/etc/rc.d/spotdl-service.sh stop
# Check status
sudo /usr/local/etc/rc.d/spotdl-service.sh status
#Check service logging
sudo tail -f /var/log/spotdl.log
Open a browser and navigate to:
http://your_server_ip:7667
- Make sure port 7667 is open in your firewall
- The application logs are stored in
/var/log/spotdl.log
- Downloaded files are stored in
/volume/spotdl/downloads
- You need a valid Spotify developer account to get API credentials
- FFmpeg must be installed for audio conversion
This project is licensed under the MIT License.It utilizes spotipy, which is also licensed under the MIT License.For more details, please refer to the LICENSE.txt file.