Skip to main content

jellyfin-accounts

A basic account management system for Jellyfin.

  • Provides a web interface for creating/sending invites
  • Sends out emails when a user requests a password reset
  • Uses a basic python jellyfin API client for communication with the server.
  • Uses Flask, HTTPAuth, itsdangerous, and Waitress
  • Frontend uses Bootstrap
  • Password resets are handled using smtplib, requests, and jinja

Interface

Admin page Account creation page

Get it

Requirements

  • This should work anywhere Python does, i've tried to not use anything OS-specific. Drop an issue if there's a problem, of course.
* python >= 3.6
* flask
* flask_httpauth
* jinja2
* requests
* itsdangerous
* passlib
* pyOpenSSL
* waitress
* pytz
* python-dateutil
* watchdog
* packaging

Install

Usually as simple as:

pip install jellyfin-accounts

If not, or if you want to use docker, see install.

Usage

  • Passing no arguments will run the server
usage: jf-accounts [-h] [-c CONFIG] [-d DATA] [--host HOST] [-p PORT] [-g]

jellyfin-accounts

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        specifies path to configuration file.
  -d DATA, --data DATA  specifies directory to store data in. defaults to
                        ~/.jf-accounts.
  --host HOST           address to host web ui on.
  -p PORT, --port PORT  port to host web ui on.
  -g, --get_defaults    tool to grab a JF users policy (access, perms, etc.)
                        and homescreen layout and output it as json to be used
                        as a user template.

Setup

New user template

  • You may want to restrict a user from accessing certain libraries (e.g 4K Movies), display their account on the login screen by default, or set a default homecrseen layout. Jellyfin stores these settings in the user's policy, configuration and displayPreferences.
  • Make a temporary account and configure it, then in the web UI, go into "Settings => Set new account defaults". Choose the account, and its configuration will be stored for future use.

Emails/Password Resets

  • When someone initiates forget password on Jellyfin, a file named passwordreset*.json is created in its configuration directory. This directory is monitored and when created, the program reads the username, expiry time and PIN, puts it into a template and sends it to whatever address is specified in emails.json.
  • The default forget password popup references the passwordreset*.json file created. This is confusing for users, so a quick fix is to edit the MessageForgotPasswordFileCreated string in Jellyfin's language folder.
  • Currently, jellyfin-accounts supports generic SSL/TLS or STARTTLS secured SMTP, and the mailgun REST API.
  • Email html is created using mjml, and jinja templating is used. If you wish to create your own, ensure you use the same jinja expressions ({{ pin }}, etc.) as used in data/email.mjml or invite-email.mjml, and also create plain text versions for legacy email clients.

Configuration

  • Note: Make sure to put this behind a reverse proxy with HTTPS.

On first run, access the setup wizard at 0.0.0.0:8056. When finished, restart the program.

The configuration is stored at ~/.jf-accounts/config.ini. Settings can be changed through the web UI, or by manually editing the file.

For detailed descriptions of each setting, see setup.

Donations

I strongly suggest you send your money to Jellyfin or a good charity, but for those who want to help me out, a Paypal link is below.

Donate

Metadata

Release files for jellyfin-accounts 0.3.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jellyfin-accounts 0.3.9
File Size Uploaded
jellyfin-accounts-0.3.9.tar.gz 203.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jellyfin-accounts 0.3.9
File Interpreter ABI Platform
jellyfin_accounts-0.3.9-py3-none-any.whl Python 3 none any Details

Total release size: 421.3 kB

Release files / jellyfin-accounts-0.3.9.tar.gz

Download URL jellyfin-accounts-0.3.9.tar.gz
Size 203.8 kB
Tags Source
SHA-256 checksum
How to use checksums
457c71d45ffa98d1024e84fe7d0954308b2722b039feea9dec62cbc8e9261c5f
BLAKE2b-256 checksum
How to use checksums
7e69411c28332bd64438d6d075df9d6d312e96f03d7f60b6d38f0cc12c556b14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.9 CPython/3.8.3 Linux/5.7.9-arch1-1

Release files / jellyfin_accounts-0.3.9-py3-none-any.whl

Download URL jellyfin_accounts-0.3.9-py3-none-any.whl
Size 217.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4f96045ddd6cf113dcadc09ac68e6fdb4aac2eef7fbfab8f66ab1b2ef13820c
BLAKE2b-256 checksum
How to use checksums
6162c940d20cc1da79073bd83909cb44bb8d6dd51deb53b7ce59a869989f6696
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.9 CPython/3.8.3 Linux/5.7.9-arch1-1

Release history Release notifications | RSS feed

This release

0.3.9 This release

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page