(deprecated) A basic account management system for Jellyfin.
Go to file
Harvey Tindall 9185b59d16
Dockerfile builds from source
Uses multi-stage build, like jfa-go. I'm hoping this'll shrink the image
aswell.
2020-08-17 12:07:28 +01:00
.github/ISSUE_TEMPLATE Add bug report template 2020-07-11 16:56:21 +01:00
images update gif 2020-07-17 19:20:55 +01:00
jellyfin_accounts potential fixes for windows 2020-08-04 01:29:29 +01:00
mail add non interactive modes to build scripts 2020-08-17 11:45:42 +01:00
scss add non interactive modes to build scripts 2020-08-17 11:45:42 +01:00
.gitignore Mention that expiry time is UTC 2020-07-18 18:19:14 +01:00
config-default.ini Bump to 0.3.7 2020-07-17 17:35:24 +01:00
Dockerfile Dockerfile builds from source 2020-08-17 12:07:28 +01:00
jf-accounts.service jellyfin-lookin theme, changes from master, bump to 0.3.0 2020-07-04 22:17:49 +01:00
LICENSE first commit 2020-04-11 15:20:25 +01:00
package-lock.json Update vulnerable lodash dep per dependabot recommendation. 2020-07-15 23:37:36 +01:00
package.json Update vulnerable lodash dep per dependabot recommendation. 2020-07-15 23:37:36 +01:00
poetry.lock update readme, fix setup.js setting toggle 2020-08-02 02:33:34 +01:00
pyproject.toml Fix new user defaults and bump to 0.3.9 bcs im dumb 2020-07-24 12:04:57 +01:00
README.md update readme, fix setup.js setting toggle 2020-08-02 02:33:34 +01:00
requirements.txt Add systemd service 2020-07-02 18:44:42 +01:00

jellyfin-accounts

👀 ➡️: Have a look at jfa-go, an attempted rewrite in Go. Identical look and features but might be faster.

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