Raiper34/spooty: Trending on GitHub
Spooty: The Self-Hosted Spotify Downloader Revolutionizing Music Streaming
In the world of music streaming, Spotify has become a household name, with millions of users worldwide. However, for those who want more control over their music library, a new tool has emerged: Spooty, a self-hosted Spotify downloader that's taking the tech community by storm. In this article, we'll delve into the world of Spooty, exploring its features, installation process, and implications for music enthusiasts.
Installation: The Easiest Way to Get Started
Recommended and the easiest way to start using Spooty is by using Docker. Docker is a containerization platform that allows you to package, ship, and run applications in containers. This makes it easy to deploy and manage Spooty on your local machine or in the cloud.
To get started with Docker, you'll need to create a new application in the Spotify Developer Dashboard. This will give you a Client ID and Client Secret, which you'll need to configure in the Docker environment.
Docker Command
To run Spooty using Docker, you can use the following command:
docker run -d -p 3000:3000 \
-v /path/to/downloads:/spooty/backend/downloads \
-e SPOTIFY_CLIENT_ID=your_client_id \
-e SPOTIFY_CLIENT_SECRET=your_client_id \
raiper34/spooty:latest
This command will start a new container, mapping port 3000 on your local machine to port 3000 in the container. The -v flag is used to mount a volume, allowing you to store downloaded files on your local machine.
Docker Compose
Alternatively, you can use Docker Compose to manage your Spooty container. Docker Compose is a tool that allows you to define and run multi-container Docker applications.
To use Docker Compose, you'll need to create a docker-compose.yml file with the following configuration:
version: '3'
services:
spooty:
image: raiper34/spooty:latest
container_name: spooty
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- /path/to/downloads:/spooty/backend/downloads
environment:
- SPOTIFY_CLIENT_ID=your_client_id
- SPOTIFY_CLIENT_SECRET=your_client_id
This configuration defines a single service, spooty, which uses the raiper34/spooty:latest image. The ports section maps port 3000 on your local machine to port 3000 in the container, and the volumes section mounts a volume to store downloaded files.
Build from Source
If you prefer to build Spooty from source, you'll need to have Node.js v18.19.1 installed on your machine. You can use the Node Version Manager (nvm) to install the correct version of Node.js.
Once you have Node.js installed, you can clone the Spooty repository and install the dependencies using npm:
git clone https://github.com/raiper34/spooty.git
cd spooty
npm install
Next, you'll need to create a .env file in the src/backend directory with your Spotify Client ID and Client Secret:
SPOTIFY_CLIENT_ID=your_client_id
SPOTIFY_CLIENT_SECRET=your_client_id
Finally, you can build the project using npm:
npm run build
This will create a dist folder containing the built project.
Environment Variables
Some behavior and settings of Spooty can be configured using environment variables and the .env file. Here are some of the available environment variables:
| Name | Default | Description |
|---|---|---|
| DB_PATH | ./config/db.sqlite | Path where Spooty database will be stored |
| FE_PATH | ../frontend/browser | Path to frontend part of application |
| DOWNLOADS_PATH | ./downloads | Path where downloaded files will be stored |
| FORMAT | mp3 | Format of downloaded files (currently fully supported only mp3) |
| PORT | 3000 | Port of Spooty server |
| REDIS_PORT | 6379 | Port of Redis server |
| REDIS_HOST | localhost | Host of Redis server |
| RUN_REDIS | false | Whether Redis server should be started from backend |
| SPOTIFY_CLIENT_ID | your_client_id | Client ID of your Spotify application |
| SPOTIFY_CLIENT_SECRET | your_client_secret | Client Secret of your Spotify application |
| YT_DOWNLOADS_PER_MINUTE | 3 | Set the maximum number of YouTube downloads started per minute |
| YT_COOKIES | Allows you to pass your YouTube cookies to bypass some download restrictions |
Implications and Future Directions
Spooty has the potential to revolutionize the way we consume music, allowing users to download and store their favorite tracks and albums on their local machines. However, it also raises important questions about copyright and intellectual property.
As Spooty continues to evolve, it will be interesting to see how it addresses these issues and how it integrates with other music streaming services. Will it become a major player in the music industry, or will it remain a niche tool for music enthusiasts?
Only time will tell, but one thing is certain: Spooty is an exciting development in the world of music streaming, and it's worth keeping an eye on.




