Jellystat
Build and run Jellystat, statistics for Jellyfin, with a local PostgreSQL database.
jellystat.sh builds CyferShepard/Jellystat from its release source, creates
a PostgreSQL database for it and runs it as a systemd service.
| Run it | On any system that can reach your Jellyfin server. The script has no Proxmox VE host check |
| Supported OS | Debian or Ubuntu (require_debian_like: Alpine and systems without apt-get exit with code 238) |
| Port | 3000 |
| Source | tools/addon/jellystat.sh |
Run
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/jellystat.sh)"Prompts
| Prompt | Answer |
|---|---|
Install Jellystat? (y/N): | y installs. Anything else exits |
Enter existing database password for 'jellystat': | Only when a database named jellystat already exists. Hidden input; the database is reused with this password |
When /opt/jellystat/package.json already exists:
| Prompt | Answer |
|---|---|
Uninstall Jellystat? (y/N): | y removes it |
Also remove PostgreSQL database 'jellystat'? (y/N): | During uninstall. y drops the database and the user. Anything else keeps them and prints the two DROP commands |
Update Jellystat? (y/N): | y updates. Anything else exits with No action selected |
What it creates
| Item | Value |
|---|---|
| Node.js | Version 22 through setup_nodejs, only if no node command exists |
| PostgreSQL | Version 17 through setup_postgresql, only if no psql command exists |
| Database | jellystat, owned by the user jellystat with a random 16-character password |
pg_hba.conf | Two scram-sha-256 lines for jellystat on 127.0.0.1/32 and ::1/128, followed by a PostgreSQL reload |
| Application | /opt/jellystat, built with npm install and npm run build |
| Configuration | /opt/jellystat/.env (mode 600): database settings, a random 32-character JWT_SECRET, JS_LISTEN_IP=0.0.0.0, JS_BASE_URL=/, TZ from /etc/timezone or UTC, REJECT_SELF_SIGNED_CERTIFICATES=true |
| Service | jellystat (/etc/systemd/system/jellystat.service), runs as root |
| Update helper | /usr/local/bin/update_jellystat |
| Credentials | /root/jellystat.creds (mode 600): database user, password, name and the JWT secret |
| Address | http://<ip>:3000 |
The script creates no Jellystat login. On first access you configure the connection to your Jellyfin server in the web interface.
Update
Run update_jellystat, answer y to Update Jellystat?, or let the
container's update command offer it (see
how update finds add-ons).
If a newer release exists, the service is stopped, .env is backed up to
/opt/jellystat_backup, the installation directory is replaced and rebuilt,
.env is restored and the service is started. The database is not touched.
Remove
Uninstall Jellystat? stops and disables the service and deletes the service
file, /opt/jellystat and the update helper. Then it asks about the database
(see above). PostgreSQL, Node.js, the pg_hba.conf lines and
/root/jellystat.creds stay.
Limits
- An existing Node.js or PostgreSQL installation is used as it is, whatever its version.
- If the
jellystatdatabase exists, the script cannot check the password you type. A wrong one is written to.envand the service will not connect.