# Self-host Jellystat

> A statistics and history dashboard for Jellyfin with watch time, library and user insights, backed by Postgres. MIT licensed. Create the admin user on first open, then add your Jellyfin URL and an API key.

- Page: https://levelrail.com/templates/jellystat/
- JSON: https://levelrail.com/templates/jellystat.json
- Category: Monitoring
- Licence: MIT (Permissive license)
- Source: https://github.com/CyferShepard/Jellystat
- Upstream docs: https://github.com/CyferShepard/Jellystat

## Requirements
- Memory: about 384 MiB
- amd64: published, arm64: published
- Needs configuration before start: no
- Pinned image tag: 16-alpine

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| db | postgres | 16-alpine | none | pgdata -> /var/lib/postgresql/data |
| jellystat | cyfershepard/jellystat | 1.1.12 | 3000 | backup -> /app/backend/backup-data |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| db | POSTGRES_DB | preset |
| db | POSTGRES_PASSWORD | generated |
| db | POSTGRES_USER | preset |
| jellystat | JWT_SECRET | generated |
| jellystat | POSTGRES_DB | preset |
| jellystat | POSTGRES_IP | preset |
| jellystat | POSTGRES_PASSWORD | generated |
| jellystat | POSTGRES_PORT | preset |
| jellystat | POSTGRES_USER | preset |
| jellystat | TZ | preset |

## Deploy

### CLI

```bash
levelrail-cli templates install jellystat --name my-jellystat
```

Add --domain SERVICE=HOST to serve a service on your own domain, for example --domain db=app.example.com.

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  https://levelrail.example.com/api/v1/service-templates/jellystat/install \
  -d '{
    "name": "my-jellystat"
  }'
```

Create a token in the dashboard first. Name, env and domains are the request fields.

## Questions

### Can I deploy Jellystat on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Jellystat, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image postgres:16-alpine, cyfershepard/jellystat:1.1.12 is what you deploy there.

Self-host Jellystat, Jellystat docker compose file, deploy Jellystat on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
