This project can run as a normal web app on your Linux server.
The app will:
- serve the web UI on port
3001 - store the database and uploaded MIDI files in
/media/storage/pianohero - work behind your existing Cloudflare Tunnel
- Docker
- Docker Compose
- Cloudflare Tunnel
Dockerfiledocker-compose.yml.dockerignore
Make sure these are installed on your server:
- Docker
- Docker Compose plugin
- Cloudflared
Also make sure port 3001 is free on your server.
Example:
cd /media/storage
git clone <your-repo-url> pianohero-app
cd pianohero-appIf you already copied the project there manually, just cd into the project folder.
This is where PianoHero will store its database and uploaded MIDI files.
mkdir -p /media/storage/pianoheroFrom inside the project folder:
docker compose up -d --buildTo check logs:
docker compose logs -f pianoheroBefore adding Cloudflare, make sure it works on your LAN:
curl http://127.0.0.1:3001Or open:
http://YOUR_SERVER_IP:3001
If it is working, you should see the PianoHero web app.
Edit your Cloudflare Tunnel config:
sudo nano /etc/cloudflared/config.ymlAdd a new ingress rule for PianoHero.
Example:
tunnel: YOUR_TUNNEL_ID
credentials-file: /etc/cloudflared/YOUR_TUNNEL_ID.json
ingress:
- hostname: piano.a173d20e27.com
service: http://localhost:3001
- service: http_status:404If you already have other ingress entries, add the new piano hostname above the final http_status:404 rule.
Then restart Cloudflare:
sudo systemctl restart cloudflaredAfter DNS and tunnel routing are active, open:
https://piano.a173d20e27.com
Start:
docker compose up -dStop:
docker compose downRebuild after code changes:
docker compose up -d --buildView logs:
docker compose logs -f pianoheroCheck running containers:
docker psAll persistent app data is stored here on the host:
/media/storage/pianohero
Inside the container that path is mounted as:
/data
That folder contains:
- the SQLite database
- uploaded MIDI files
- This is the web version of PianoHero, not the full Electron desktop version.
- Browser upload of MIDI files works.
- Some desktop-only actions are not available in web mode, such as native file picker features and some export/save helpers.
- Cloudflare Tunnel gives you HTTPS, which is useful for browser device APIs.
- Current web deployment is single-user only. The SQLite database and uploaded MIDI files are shared by anyone who can reach the site, so add auth before exposing it to multiple users.
Just change this line in /etc/cloudflared/config.yml:
- hostname: piano.a173d20e27.comFor example:
- hostname: piano.yourdomain.comUpdate both places:
- In
docker-compose.yml - In
/etc/cloudflared/config.yml
Current default port:
3001
Check logs:
docker compose logs -f pianoheroCheck that:
- the container is running
- port
3001is listening - the tunnel points to
http://localhost:3001 - the new ingress rule is above the catch-all
http_status:404
Rebuild the container:
docker compose up -d --buildChange this line in docker-compose.yml:
- /media/storage/pianohero:/dataFor example:
- /some/other/path/pianohero:/data