Skip to main content
Community Scripts logo
Skip to Content
Tools & Add-onsAdd-ons

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 itOn any system that can reach your Jellyfin server. The script has no Proxmox VE host check
Supported OSDebian or Ubuntu (require_debian_like: Alpine and systems without apt-get exit with code 238)
Port3000
Sourcetools/addon/jellystat.sh

Run

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/jellystat.sh)"

Prompts

PromptAnswer
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:

PromptAnswer
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

ItemValue
Node.jsVersion 22 through setup_nodejs, only if no node command exists
PostgreSQLVersion 17 through setup_postgresql, only if no psql command exists
Databasejellystat, owned by the user jellystat with a random 16-character password
pg_hba.confTwo 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
Servicejellystat (/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
Addresshttp://<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 jellystat database exists, the script cannot check the password you type. A wrong one is written to .env and the service will not connect.