Documentation Getting started
Installation
Install Rainy with Docker Compose, or run it directly with Python on Linux, macOS or Windows.
You can run Rainy in two ways. Docker Compose is the recommended path: the stack brings its own MySQL 8.4 database, ffmpeg, the fpcalc fingerprint tool and the Deno JavaScript runtime, so you install nothing else. The Python path needs Python 3.11 or newer and stores everything in a single SQLite file, which suits a personal machine.
Both paths start the server on port 6969 and need a music folder on the machine that runs Rainy.
Option A: Docker Compose
-
Clone the repository and enter the folder. Git and the Docker Compose plugin must be installed.
git clone https://github.com/Rainer-Technologies/Rainy.git cd Rainy cp .env.example .env -
Open
.envand set these four values before you start:Setting What to put there FLASK_SECRET_KEYA random key of at least 32 characters. Rainy refuses to start without one. MYSQL_PASSWORDA strong password for Rainy's database user. MYSQL_ROOT_PASSWORDA different strong password for the MySQL root user. MUSIC_LIBRARY_PATHAn absolute path to your music folder, or ./musicfor an empty library.To generate a session key, run
python3 -c "import secrets; print(secrets.token_hex(32))"and paste the output afterFLASK_SECRET_KEY=. -
If the host has no NVIDIA GPU, remove the whole
deploy:block under theappservice incompose.yaml. It requests NVIDIA devices by default, and Compose will not start without the NVIDIA Container Toolkit. Rainy analyses light shows on the CPU without it. For GPU setup, see GPU acceleration. -
Build and start the stack:
docker compose up --build -d -
Open
http://localhost:6969. If you changedRAINY_PORT, use that port instead. Complete the setup form to create the administrator account, and enter/musicas the library path. This is where yourMUSIC_LIBRARY_PATHfolder appears inside the container. -
Go to Settings > Maintenance and run Quick Scan to index the files already in the folder.
The app container waits for the database to be healthy, initialises the schema, and then starts Gunicorn. Your music stays in the folder on the host; the database lives in the mysql_data Docker volume.
Compose passes only the variables listed underapp.environmentinto the container. To set any otherRAINY_*option with Docker, add it to that list incompose.yamland rundocker compose up -dagain. See configuration.
Option B: Python with SQLite
Install these first:
- Python 3.11 or newer.
- ffmpeg on your
PATH. Rainy uses it to process audio. - A JavaScript runtime for YouTube imports: Deno, Node.js or Bun. Without one, most YouTube formats fail with HTTP 403.
- fpcalc (Chromaprint), optional. Rainy uses it to recognise the same song from a different source. Put it on your
PATH, or in the project'sbinfolder. Without it, only byte-identical files count as duplicates.
Linux and macOS
- Clone the repository and enter the folder.
-
Create
.envand set the database backend. Copy the template, then open.env:cp .env.example .envUncomment
RAINY_DB=sqlite. Without it, the activeMYSQL_*lines in the template select MySQL instead, and Rainy tries to connect to a database server. -
Start Rainy with the launcher. It creates
.venv, installs the requirements, and writes a secureFLASK_SECRET_KEYinto.envif the value is missing or weak:./start.shTo use a specific interpreter, set
PYTHON=python3.12 ./start.sh. -
Open
http://localhost:6969, create the administrator account, and enter the absolute path to your music folder. The folder must already exist. Then run Settings > Maintenance > Quick Scan.
For a persistent server, run ./start.sh --gunicorn instead. The --gunicorn option is supported by the Linux and macOS launcher only.
Windows
- Clone the repository and open the folder in File Explorer.
- Create
.envby copying.env.example, then uncommentRAINY_DB=sqliteand setFLASK_SECRET_KEYyourself. Unlikestart.sh,start.batdoes not generate the key. Use a 32-character or longer random value. - Double-click
start.bat, or run it from a Command Prompt. It creates.venv, installs the requirements and startsapp.py. - Open
http://localhost:6969, complete setup and run a Quick Scan as above.
Running from a virtual environment
If you prefer to manage the environment yourself, the launchers do the same steps:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
python app.py
On Windows, use py -m venv .venv and .venv\Scripts\activate.
Using MySQL instead
If you already run MySQL 8, set RAINY_DB=mysql in .env and fill in MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD and MYSQL_DATABASE. The database user must be able to create and change tables in that database.
Updating
With Docker, back up the mysql_data volume, your .env and your music folder, then run:
git pull
docker compose up --build -d
Avoid docker compose down -v, which deletes the database volume. With the Python install, run git pull and then ./start.sh again. The launcher reinstalls any changed requirements.
Troubleshooting
| Problem | What to check |
|---|---|
Rainy will not start, mentioning FLASK_SECRET_KEY |
The key is missing, still a placeholder, or shorter than 32 characters. |
| Local start tries to connect to MySQL | Set RAINY_DB=sqlite in .env. |
| Setup rejects the music path | Use /music in Docker. Locally, use an existing absolute path. |
| YouTube imports fail | Check that ffmpeg and a JavaScript runtime are installed. In Docker both are already included. |
| Compose cannot select an NVIDIA driver | Remove the deploy: block from compose.yaml on a CPU-only host. |
For every setting Rainy reads, see configuration. Once the server responds, continue with first run.