Deployment Guide
Deploy QQ-Music-Player to Cloudflare Pages.
Prerequisites
- GitHub account
- Cloudflare account
- QQ Music credentials
Deployment Steps
1. Fork Repository
Fork QQ-Music-Player
2. Create D1 Database
- Login to Cloudflare Dashboard
- Go to Workers & Pages → D1
- Click Create database
- Name:
qqmusic-credentials - Note the Database ID
3. Create Pages Project
- Go to Workers & Pages → Create → Pages
- Select Connect to Git
- Authorize GitHub
- Select your forked repo
- Build settings: leave empty
- Click Save and Deploy
4. Bind D1 Database
- Go to Pages project → Settings → Functions
- Find D1 database bindings
- Add binding:
- Variable name:
DB - D1 database:
qqmusic-credentials
- Variable name:
5. Configure Credentials
- Go to Settings → Environment variables
- Add
INITIAL_CREDENTIALwith your credential JSON - Select Encrypt
- Save
6. Redeploy
Trigger redeployment to apply settings.
7. Verify
Visit your Pages URL. First visit will:
- Initialize D1 database
- Import credentials from environment variable
Custom Domain
- Go to Pages project → Custom domains
- Click Set up a custom domain
- Enter your domain
- Configure DNS CNAME record
Troubleshooting
Blank page?
Check browser console for errors.
Songs won't play?
- Check credential validity
- Verify D1 binding
- Check Functions logs