Skip to content

Installation on unRAID

mizz141 edited this page Feb 20, 2022 · 10 revisions

First you need to install the PlexAniSync Docker, if you have that already, you can skip this section.

This is easiest done with the Community Applications plugin. Simply search "PlexAniSync."

There are already defaults set for the Mappings, so no adjustment is needed from that side, the descriptions should also include any relevant links and tutorials.

The Anilist token can be gotten from here: https://anilist.co/api/v2/oauth/authorize?client_id=1549&response_type=token

Installation of the Mappings

There are 2 versions on how to install the mappings file into unraid

Version 1.3.17 and up

Since 1.3.17 there is the option to use remote mappings, for this navigate into your PlexAniSync Appdata folder and create a custom_mappings.yaml file and edit it.

cd /mnt/user/appdata/
cd PlexAniSync
touch custom_mappings.yaml
nano custom_mappings.yaml

Paste this:

remote-urls:
  - https://raw.githubusercontent.com/mizz141/PlexAniSync-Mappings/master/custom_mappings.yaml

and save with CTRL+S, then exit with CTRL+X, restart the container and check for errors.

Version 1.3.16 and up

You can also automate cloning the mappings with a simple script that can be run with the "User Scripts" plugin (also in the Community Applications)

In the unRAID webterminal, input the following commands to clone the git repository:

cd /mnt/user/appdata/
cd PlexAniSync
git clone https://github.com/mizz141/PlexAniSync-Mappings.git

This will move into your directory of the PlexAniSync docker and copy all files from the repository into this directory. If there isn't a directory, execute this command:

cd /mnt/user/appdata/
mkdir PlexAniSync
cd PlexAniSync
git clone https://github.com/mizz141/PlexAniSync-Mappings.git

You may need to configure default git configurations for it to pull automatically without any additional arguments on the git pull command. If you are never going to make changes with the repository and only want to grab changes, you should input the following command in your unRAID webterminal to only fast forward your repository whenever there are new changes:

git config --global pull.ff only

You can configure this configuration manually by editing the ~/.gitconfig file. If you have only ran this configuration command, then the content of your config file is:

[pull]
        ff = only

Now, to finally automate the whole process, create a script with a name (preferrably PlexAniSync) and add this:

#!/bin/bash
cd /mnt/user/appdata/PlexAniSync/PlexAniSync-Mappings
git pull origin master
docker restart PlexAniSync

The Script will cd into the appdata folder, pull the latest changes for the repository from GitHub, and restart the Docker Container.

You can set the update interval to whatever you like, best results are gained with a Daily interval. It's recommended to test-run the script for any errors, most commonly a misnamed container or wrong filepath.

Credits to Randy Chen for the Script and Installation instructions.

Clone this wiki locally