Portainer Templates logo

Portainer Templates

Jellyfin-Accounts Jellyfin-Accounts

Container

VideoMusicPhotosManagement

jfa-go is a user management app for Jellyfin (and now Emby) that provides invite-based account creation as well as other features that make one's instance much easier to manage.

Image details

Pulls: 1.5M
Architecture: amd64, arm64, arm/v7
Image size: 26 MB
User: hrfee
Created: Aug 03, 2020
Updated: 2 months ago
Status: active

Source details

Stars: 1k
Forks: 70
Language: Go
Updated: 2 months ago
Website: jfa-go.com/

Configuration

Type
Container
Platform
linux
Image
hrfee/jfa-go:latest
Ports
8056:8056/tcp
Volumes
/jf : /portainer/Files/AppData/Config/Jelllyfin/data : /portainer/Files/AppData/Config/jfago/etc/localtime : /etc/localtime
Restart
unless-stopped

Template by novaspirit

Notes

Template created by Pi-Hosted Series
Check our Github page: https://github.com/pi-hosted/pi-hosted

Official Webpage: https://jfa-go.com/
Official Docker Documentation: https://wiki.jfa-go.com/


This system is setup to work with either Emby or Jellyfin out of the box. During the initial setup the user will have the option of which server they will be administering.

Standalone Install

Select an install method, to see config/commands for deploying Jellyfin-Accounts

Installation method

Install on Portainer

Import all app templates into your Portainer instance, for easy 1-click deploys

  1. Ensure both Docker and Portainer are installed, and up-to-date
  2. Log into your Portainer web UI
  3. Under Settings → App Templates, paste the below URL
  4. Head to Home → App Templates, and the list of apps will show up
  5. Select Jellyfin-Accounts, fill in any config options, and hit Deploy

Template Import URL

https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me demo

More install options in our documentation, or see hrfee/jfa-go for app-specific guidance.

jfa-go Build Status Docker Hub

Translation status

jfa-go is a user management app for Jellyfin (and now Emby) that provides invite-based account creation as well as other features that make one's instance much easier to manage.
I chose to rewrite the python jellyfin-accounts in Go mainly as a learning experience, but also to slightly improve speeds and efficiency.

Features

  • 🧑 Invite based account creation: Sends invites to your friends or family, and let them choose their own username and password without relying on you.
* Send invites via a link and/or email
* Granular control over invites: Validity period as well as number of uses can be specified.
* Account profiles: Assign settings profiles to invites so new users have your predefined permissions, homescreen layout, etc. applied to their account on creation.
* Password validation: Ensure users choose a strong password.
  • 🔗 Ombi Integration: Automatically creates Ombi accounts for new users using their email address and login details, and your own defined set of permissions.
  • Account management: Apply settings to your users individually or en masse, and delete users, optionally sending them an email notification with a reason.
  • 📨 Email storage: Add your existing users email addresses through the UI, and jfa-go will ask new users for them on account creation.
* Email addresses can optionally be used instead of usernames
  • 🔑 Password resets: When user's forget their passwords and request a change in Jellyfin, jfa-go reads the PIN from the created file and sends it straight to the user via email.
  • Notifications: Get notified when someone creates an account, or an invite expires.
  • Authentication via Jellyfin: Instead of using separate credentials for jfa-go and Jellyfin, jfa-go can use it as the authentication provider.
* Enables the usage of jfa-go by multiple people
  • 🌓 Customizable look
* Specify contact and help messages to appear in emails and pages
* Light and dark themes available

Interface

<img src="images/demo.gif" width="100%"></img>


<img src="images/invites.png" width="48%" style="margin-left: 1.5%;" alt="Invites tab"></img>
<img src="images/accounts.png" width="48%" style="margin-right: 1.5%;" alt="Accounts tab"></img> 

Install

Available on the AUR as jfa-go or jfa-go-git.
For other platforms, grab an archive from the release section for your platform (or nightly builds here), and extract jfa-go and data to the same directory.
  • For linux users, you can place them inside /opt/jfa-go and then run
sudo ln -s /opt/jfa-go/jfa-go /usr/bin/jfa-go to place it in your PATH.
Run the executable to start.
For docker, run:
docker create \
             --name "jfa-go" \ # Whatever you want to name it
             -p 8056:8056 \
            # -p 8057:8057 if using tls
             -v /path/to/.config/jfa-go:/data \ # Path to wherever you want to store the config file and other data
             -v /path/to/jellyfin:/jf \ # Path to jellyfin config directory
             -v /etc/localtime:/etc/localtime:ro \ # Makes sure time is correct
             hrfee/jfa-go # hrfee/jfa-go:unstable for latest build from git

Build from source

If you're using docker, a Dockerfile is provided that builds from source.
Otherwise, full build instructions can be found here.

Usage

Simply run jfa-go to start the application. A setup wizard will start on localhost:8056 (or your own specified address). Upon completion, refresh the page.
Note: jfa-go does not run as a daemon by default. You'll need to figure this out yourself.
Usage of ./jfa-go:
  -config string
    	alternate path to config file. (default "~/.config/jfa-go/config.ini")
  -data string
    	alternate path to data directory. (default "~/.config/jfa-go")
  -debug
    	Enables debug logging and exposes pprof.
  -host string
    	alternate address to host web ui on.
  -port int
    	alternate port to host web ui on.
  -swagger
    	Enable swagger at /swagger/index.html

If you're switching from jellyfin-accounts, copy your existing ~/.jf-accounts to:
  • XDG_CONFIG_DIR/jfa-go (usually ~/.config/jfa-go) on \*nix systems,
  • %AppData%/jfa-go on Windows,
  • ~/Library/Application Support/jfa-go on macOS.

(or specify config/data path with -config/-data respectively.)

Contributing

See CONTRIBUTING.md.
Translation
Translation status
For translations, use the weblate instance here. You can login with github.

Serve Jellyfin-Accounts on your own domain behind Caddy, Nginx or Traefik. Fill in your domain and copy the result. It's a starting point, some apps need their own base URL or extra headers set too.

Proxying jellyfin-accounts.example.com to http://jfa-go:8056

Add this to your Caddyfile

jellyfin-accounts.example.com {
	reverse_proxy http://jfa-go:8056
}

Check the logs first

Nine times out of ten the logs tell you exactly what went wrong.

  • In Portainer, go to Containers, click the container, then Logs. Or run docker logs jfa-go
  • Exit codes help too: 137 means killed, usually out of memory. 126 or 127 means the command inside the image is broken.

Port already in use

If deployment fails with "Bind for 0.0.0.0:8056 failed: port is already allocated", something else on your server is using that port.

  • Find what's using it: sudo ss -tlnp | grep :8056
  • Stop the other service, or pick a different host port. In 8056:8056 only the left number is yours to change, the right one belongs to the app.

Running but the page won't load

The container is up but nothing appears in your browser.

  • Use your server's real IP: http://your-server-ip:8056. The 0.0.0.0 link Portainer shows isn't a real address.
  • Give it a minute after first deploy, jfa-go can take a while to initialise.
  • Make sure your firewall allows the port, e.g. sudo ufw allow 8056

Permission denied on volumes

If the logs show "permission denied", the app can't write to its data folder on the host.

  • Fix the ownership: sudo chown -R 1000:1000 /portainer/Files/AppData/Config/Jelllyfin (and the same for the other mapped folders)
  • Seeing "read-only file system"? /etc/localtime is mounted read-only on purpose, the app isn't meant to write there.

Image won't pull

Test the pull directly on the host: docker pull hrfee/jfa-go:latest

  • "manifest unknown" means the tag no longer exists. This template uses latest, so try pinning a specific version instead.
  • "toomanyrequests" is the Docker Hub rate limit. Log in with docker login to raise it.
  • "no space left on device" means a full disk. Reclaim space with docker system prune

"exec format error"

This means the image was built for a different CPU architecture than your server.

  • This image supports: amd64, arm64, arm/v7
  • Check yours with uname -m: x86_64 is amd64, aarch64 is arm64. Raspberry Pi and other ARM boards are the usual culprits.

Container keeps restarting

The unless-stopped restart policy relaunches the app after every crash, so the real error can scroll past.

  • Check the logs right after a restart, the last few lines before it died are the useful ones.
  • Get the exit code with docker inspect jfa-go --format '{{.State.ExitCode}}'
  • Still stuck? Redeploy once with the restart policy set to no so the failure stays visible.

Raise an issue

Found something which isn't working as it should? Here's how to report it.

A single container

Jellyfin-Accounts runs as one container, the simplest kind of app here. Just the one image to pull and nothing else wired up alongside it.

The app image

An image is the app packed up ready to go, everything Jellyfin-Accounts needs bundled into one download. This template pulls hrfee/jfa-go:latest, which Docker fetches once (about 26 MB) and then starts your own copy from.

Where the image comes from

Docker pulls its images from registries, public libraries of ready-built apps. Jellyfin-Accounts's comes from Docker Hub, published by hrfee.

Version tags

The bit after the colon in the image name is the version tag. Here it's latest, which always points at the newest build, so a redeploy can bump you to a newer release without you asking. Pin a specific tag if you would rather stay on one version.

Which machines it runs on

Every image is built for particular CPU types. This one ships for amd64, arm64, arm/v7, so it runs on both regular x86 servers and ARM boards like a Raspberry Pi.

Ports

A port is the door the app answers on. A mapping like 8056:8056 means it's reachable on port 8056 of your server, where the left number is yours to change and the right one belongs to the app. It opens:

  • 8056:8056

Volumes

A volume is where Jellyfin-Accounts keeps its files so they survive an update or a restart. Without one, anything it saves would sit inside the container and vanish the moment it's recreated. This template mounts:

  • /jf from /portainer/Files/AppData/Config/Jelllyfin on the host
  • /data from /portainer/Files/AppData/Config/jfago on the host
  • /etc/localtime from /etc/localtime on the host, read-only

Restart policy

The restart policy here is unless-stopped, so Docker restarts Jellyfin-Accounts after a crash or reboot, but leaves it off when you stop it on purpose. You can change this on the deploy screen. The choices are no (never restart), on-failure (only after a crash), unless-stopped (restart unless you stop it), and always (bring it back no matter what).

Networking

Nothing custom is set, so Jellyfin-Accounts sits on Docker's default bridge network: its own private space that reaches the outside world only through the ports it publishes.

Container name

Once it's deployed, Portainer names the container jfa-go. That's what you'll spot in the containers list and use in commands like docker logs jfa-go.

Platform

The platform is linux, the kind of system the container is built to run on. Docker and Portainer handle this on a normal Linux server.

Portainer app templates

Zooming out, this whole page comes from a Portainer app template: a short recipe telling Portainer how to set Jellyfin-Accounts up. Add the template list to Portainer once, then deploying Jellyfin-Accounts is a click rather than a wall of config.