个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证🌧️ Self-hosted music server with a beat-locked, concert-grade light show. Local audio analysis, synced lyrics, personalised mixes, multi-user libraries, and an installable PWA. No subscription, no cloud, no API keys.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗Requires Git and Docker with the Compose plugin. The stack includes Rainy, MySQL, ffmpeg and Deno.
git clone https://github.com/Ferripro321/Rainy.git
cd Rainy
cp .env.example .env
Edit .env before starting:
| Setting | Value |
|---|---|
FLASK_SECRET_KEY | A random session key of at least 32 characters |
MYSQL_PASSWORD | A strong password for Rainy's database user |
MYSQL_ROOT_PASSWORD | A separate strong password for MySQL root |
MUSIC_LIBRARY_PATH | An absolute path to your music folder, or ./music for an empty library |
Generate a session key with Docker and paste the output into FLASK_SECRET_KEY:
docker run --rm python:3.12-slim python -c "import secrets; print(secrets.token_hex(32))"
CPU-only hosts: remove the entire deploy: block under app in compose.yaml before starting. It requests NVIDIA GPUs by default and prevents startup on hosts without the NVIDIA Container Toolkit. Rainy supports CPU analysis; GPU setup is optional and covered in docs/GPU.md.
docker compose up --build -d
Open http://localhost:6969 and complete the setup form to create the administrator account. Enter /music as the library path: this is the container path mapped to MUSIC_LIBRARY_PATH on your host.
Run Quick Scan under Settings → Maintenance to index existing files. You can also upload music through the player.
Requires Python 3.11+ and ffmpeg on your PATH. YouTube imports also need a JavaScript runtime: Deno, Node.js or Bun.
Clone the repository and enter Rainy as above, then create a virtual environment and install the dependencies.
Linux / macOS:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
cp .env.example .env
Windows (Command Prompt):
py -m venv .venv
.venv\Scripts\activate
python -m pip install -r requirements.txt
copy .env.example .env
In .env, uncomment RAINY_DB=sqlite and set FLASK_SECRET_KEY to the output of:
python -c "import secrets; print(secrets.token_hex(32))"
Explicitly selecting SQLite overrides the MYSQL_* values in the example file. Rainy creates data/rainy.db on first start; no database server is needed.
Start the player:
mkdir music
python app.py
Open http://localhost:6969, create the administrator account and enter the absolute path to your music folder. The folder must already exist. If you created music above, use its absolute path. Run Settings → Maintenance → Quick Scan to index it.
For an existing MySQL 8 installation, set RAINY_DB=mysql and configure MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD and MYSQL_DATABASE instead. The database user needs permission to create and migrate tables in that database; provision it beforehand if the user cannot create databases.
The launchers ./start.sh (Linux/macOS) and start.bat (Windows) handle the virtual environment and dependency installation on subsequent starts. On Linux/macOS, ./start.sh --gunicorn runs Rainy with Gunicorn for a persistent server.
Start with .env.example. These are the main settings beyond the credentials above:
| Setting | Default | Purpose |
|---|---|---|
RAINY_PORT | 6969 | Host port published by Docker Compose |
RAINY_HTTP_PORT | 6969 | Port when running python app.py |
RAINY_DB | MySQL when MYSQL_* is configured; otherwise SQLite | Database backend (mysql or sqlite) |
SQLITE_PATH | data/rainy.db | SQLite file path, relative to the project root |
RAINY_LIGHTSHOW_DEVICE | auto | Analysis device: auto, cpu, cuda or cuda:N |
RAINY_LIGHTSHOW_THREADS | CPU cores, capped at 8 | CPU threads for light show analysis |
LASTFM_API_KEY | Unset | Optional Last.fm metadata enrichment |
RAINY_DEV | Off | Local development mode; enables the debugger and allows a temporary session key |
For local runs, settings are loaded from .env. With Docker, Compose only passes the variables listed in app.environment; add any extra application settings there. The host .env is excluded from the image. Restart Rainy after changing settings; with Compose, run docker compose up -d to apply environment changes.
For access from another device on your network, use http://<server-ip>:6969 (or your configured port). Use HTTPS through a reverse proxy for remote access. Chromecast needs Chrome or another Chromium browser and a secure origin such as HTTPS or localhost; the in-app Chromecast Setup page has further instructions.
Run these commands from the repository directory:
docker compose logs -f app # Follow application logs
docker compose down # Stop the stack; keep the database and music
git pull # Get updates
docker compose up --build -d # Rebuild and start
MySQL data is stored in the mysql_data Docker volume. Music stays in the host folder selected by MUSIC_LIBRARY_PATH. For SQLite installs, preserve data/rainy.db (or your custom SQLITE_PATH). Back up the database, music folder and .env before updating. Avoid docker compose down -v unless you intend to delete the database volume.
packages/voyage. Anyone can write one: see Light show environments.| Problem | Check |
|---|---|
| Startup fails because a secret or password is missing | Set FLASK_SECRET_KEY and the database passwords in .env; the session key must be at least 32 characters. |
| Compose reports that it cannot select the NVIDIA device driver | Remove app.deploy from compose.yaml on a CPU-only host. |
| Local startup tries to connect to MySQL | Set RAINY_DB=sqlite explicitly if you want SQLite. |
| Setup rejects the music path, or scanning finds nothing | Use /music in Docker and an existing absolute path locally. Check the folder contents and permissions. |
| YouTube imports fail | Check ffmpeg and the JS runtime, then use Settings → Maintenance → Update now under YouTube Downloader. |
| GPU analysis is unavailable | Check the [lightshow-accel] analysis device: log message and GPU troubleshooting. |
The backend uses Flask with MySQL or SQLite. The frontend uses vanilla JavaScript modules and custom elements, with no build step. See AGENTS.md for component conventions.
From an activated virtual environment:
python -m pip install pytest soundfile
pytest
node --test tests/js/*.test.mjs
node --import ./tests/js/sdk-hook.mjs --test packages/*/tests/*.mjs
Backend tests import the application and require a configured session key and database. Run against a separate test database; several tests expect user and song ID 1 to exist. You can select a separate SQLite file with RAINY_DB=sqlite and SQLITE_PATH.
Rainy uses the MIT License. Dependency and model licenses are listed in THIRD_PARTY_NOTICES.md.
Only import music you own or have permission to download. Rainy is not affiliated with YouTube, Google, Spotify, Last.fm or MusicBrainz.
packages