Skip to main content

A simple account management system for Jellyfin

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jellyfin-accounts-0.3.9.tar.gz (203.8 kB view details)

Uploaded Source

Built Distribution

jellyfin_accounts-0.3.9-py3-none-any.whl (217.5 kB view details)

Uploaded Python 3

File details

Details for the file jellyfin-accounts-0.3.9.tar.gz.

File metadata

  • Download URL: jellyfin-accounts-0.3.9.tar.gz
  • Upload date:
  • Size: 203.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.9 CPython/3.8.3 Linux/5.7.9-arch1-1

File hashes

Hashes for jellyfin-accounts-0.3.9.tar.gz
Algorithm Hash digest
SHA256 457c71d45ffa98d1024e84fe7d0954308b2722b039feea9dec62cbc8e9261c5f
MD5 a68e411149761581402b67407052321b
BLAKE2b-256 7e69411c28332bd64438d6d075df9d6d312e96f03d7f60b6d38f0cc12c556b14

See more details on using hashes here.

File details

Details for the file jellyfin_accounts-0.3.9-py3-none-any.whl.

File metadata

  • Download URL: jellyfin_accounts-0.3.9-py3-none-any.whl
  • Upload date:
  • Size: 217.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.9 CPython/3.8.3 Linux/5.7.9-arch1-1

File hashes

Hashes for jellyfin_accounts-0.3.9-py3-none-any.whl
Algorithm Hash digest
SHA256 e4f96045ddd6cf113dcadc09ac68e6fdb4aac2eef7fbfab8f66ab1b2ef13820c
MD5 fa8065a7ef9886ead4072af1dff9b359
BLAKE2b-256 6162c940d20cc1da79073bd83909cb44bb8d6dd51deb53b7ce59a869989f6696

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page