Created Setup (markdown)

Harvey Tindall 2020-04-13 15:02:54 +01:00
parent 1f66d214b0
commit 9c70fbdb1b

35
Setup.md Normal file

@ -0,0 +1,35 @@
Run the program once to generate a template config.
```
hrfee@lab:~$ jf-accounts
Config dir not found, so created at /home/hrfee/.jf-accounts
Edit the configuration and restart.
```
Now, open the config at the path specified and get to configuring.
* **jellyfin**
* Best practice is to create a separate admin account (I named mine 'accounts') without normal privileges (accessing media, etc.). Its credentials can then be entered.
* The server address specified here will be reused in the invite form, so make sure its the publicly accessible address, rather than the local network one.
* The rest of the fields under this section can be whatever you want, so you may as well leave them as they are.
* **ui**
* The host and port are where the web interface will be hosted. The server runs insecurely, so you should put it behind a reverse proxy with HTTPS.
* The username and password here are for the admin page.
* **email**
* Enabling this will store the emails that new users enter in the creation form and store them. When the user triggers a 'reset password' on the Jellyfin login page, the PIN required will be sent to the email address corresponding to the user. For pre-existing users, simply add them to the `emails.json` file.
* `watch_directory` is the folder to watch for password reset files. To figure out where this should be, load up Jellyfin and press the 'Forgot password' button. Enter your username, and a popup will appear telling you the path of the created password reset file. Put that directory here.
* `use_24h` is pretty self-explanatory. It specifies whether to use '5:00 PM' or '17:00' in the emails sent out.
* `date_format` Allows you to choose how dates are displayed in emails. The default, for example, would print out the 1st of February 2020 as '01/02/20' To change this, make sure to use the `datetime.strftime` style. A cheatsheet for this can be found [here](https://strftime.org/).
* Unless you want to use a custom format for your emails, leave `email_template` and `email_plaintext` blank. If you want to customize them, look [here](https://github.com/hrfee/jellyfin-accounts#emailspassword-resets).
* `message` specifies a small message to show at the bottom of each email.
* `subject` is the subject of the email.
* Currently, jellyfin-accounts support SMTP and mailgun for sending emails. The former will work with almost any email provider. Search up how to connect to your providers SMTP server if you don't know how to already.
* `address` is the address emails will be sent from. If using SMTP, make sure this matches up with the password later on.
* `from` is the name of who you want the email sent from.
* **smtp**
* Currently, jellyfin-accounts only supports SSL/TLS SMTP. This shouldn't matter if you're using a major provider, so leave `ssl` as it is.
* Fill in your providers web address as `server`.
* For `port`, your provider will likely have many choices. Make sure you choose the one used for SSL/TLS, and not one for semi-secure START_TLS.
* Enter the password corresponding to the `address` you entered in the `[email]` section.
* **mailgun**
* This section only needs to be modified if you've chosen it as the method up above.
* It works with their REST API. Upon creating an account and setting up your domain, you should be displayed the API url and key. put these respectively as `api_url` and `api_key`.
* **files**
* These can be left blank, unless you want anything stored outside of `~/.jf-accounts/`.