
🌟 A modern private music management and playback system, supporting playlists, lyrics synchronization, and multi-device access. (A private music client that supports one-click import of NetEase Cloud Music metadata and batch scraping.)
🚀 One-Click Deploy • 🚀 Quick Start • ✨ Features • 🛠️ Tech Stack • 🤝 Contributing
Self Music is a music management and playback system for individuals and small teams. It provides an elegant UI and a smooth playback experience, supports playlist management, lyrics synchronization, artist/album data browsing, and has a built-in admin backend (JWT authentication), ready to use out of the box.
We offer three convenient deployment methods: Docker Run, Docker Compose, and BT Panel Deployment.
This is the easiest and fastest way to get started. You can run the entire application with just one command. (Note that due to data persistence requirements, the directory in which the command is started must be the same each time it is executed. It is recommended to execute it in the ~ directory).
Recommended for servers in China (using accelerated mirror):
docker run -d \
--name self-music-app \
--restart unless-stopped \
-p 6230:80 \
-v "$(pwd)/music_data":/data \
docker.cnb.cool/onmicrosoft/self-music:latest
For overseas servers or local development (using official Docker Hub image):
docker run -d \
--name self-music-app \
--restart unless-stopped \
-p 6230:80 \
-v "$(pwd)/music_data":/data \
zkeq/self-music:latest
http://localhost:6230.music_data folder in the current directory (restart the project after changing the password to update it automatically).admin / admin123.If you need more flexible configuration or want to do secondary development, you can use docker-compose.
Clone this project
git clone https://github.com/zkeq/Self-music.git
cd Self-music
Start the service
docker-compose up -d
http://localhost:8080.If you need to do secondary development, please set up your local environment as follows.
Prerequisites
Clone the project
git clone https://github.com/zkeq/Self-music.git
cd Self-music
Start the backend
cd backend
pip install -r requirements.txt
uvicorn main:app --reload --host 0.0.0.0 --port 8000
http://localhost:8000Start the frontend
cd ../frontend
pnpm install
pnpm dev
http://localhost:3000admin / admin123backend folder to the /root directory on your server.
jwt_secret and the password of the admin administrator in backend/config.yaml.
Open Pagoda Panel -> Websites -> Python Project -> Add Site.
Create a new virtual environment.

Fill out the form as shown below.

After clicking confirm, the project will create the virtual environment and install dependencies. Wait for the installation to complete.
Click on settings to view the project log.

If you get an error that a dependency is not found, click on Terminal in the Actions column and manually enter pip install xxx (package name). If it says the port is occupied, change to an unused port in main.py.

Request the service port to check the running status. (If you see this string, the service is running normally).

The backend deployment is complete. You can now set up a reverse proxy with a domain on your CDN to go live.
Self-Music/ ├── backend/ # FastAPI + SQLite │ ├── main.py # API entrypoint (includes admin routes) │ ├── user.py # Public-facing user APIs │ ├── music.db # SQLite database │ └── requirements.txt # Python dependencies ├── frontend/ # Next.js + TypeScript + Tailwind CSS 4 │ ├── src/ │ │ ├── app/ # App routes (/play, /artists, /admin, etc.) │ │ ├── components/ # UI components, player, lyrics, panels │ │ ├── lib/ # API client, store, utils │ │ └── styles/ # Global styles and themes │ └── package.json # Frontend dependencies and scripts ├── AGENTS.md # Repository contribution and development guidelines (Chinese) ├── README.md # Chinese README (this file) └── README.en.md # English README
Public APIs (no login required)
GET /api/songs: Get songs with paginationGET /api/songs/{id}: Song detailsGET /api/songs/{id}/stream: Audio streamGET /api/artists, /api/artists/{id}, /api/artists/{id}/songs, /api/artists/{id}/albumsGET /api/albums, /api/albums/{id}, /api/albums/{id}/songsGET /api/playlists, /api/playlists/{id}Admin APIs (requires Bearer Token)
POST /api/auth/login: Admin loginGET/POST/PUT/DELETE /api/admin/{artists|albums|songs|moods|playlists}PUT /api/admin/playlists/{id}/reorder: Reorder playlistPOST /api/admin/upload: Upload audio filePOST /api/admin/import/*: Batch import and duplicate checkSee the Swagger docs at
/docsafter running the backend for details.
pnpm lint passes, API runs locallyAGENTS.md)This project is licensed under the MIT License.
Thanks to @haorwen for providing the NetEase Cloud Music metadata API service for this project.
⭐ If this project helps you, please give it a star! ⭐
Made with ❤️ for music lovers.