PlexTraktSync - slunat/Proxmox-Guides GitHub Wiki

Installation

You will not require a powerful container for this as its only going to be executing a script. I would recommend setting up a minimum of the following.

Unpriviliged Container Template: Debian 12 (Bookworm) CPU: 1 CPU Memory: 512MB Storage: 2GB

Preperation

Create a container with minimum storage size of 2GB Run the below commands to get the system updated and dependencies installed

  1. apt-get update && apt-get upgrade -y
  2. apt install python3-pip
  3. cd /usr/lib/python3.11
  4. rm EXTERNALLY-MANAGED(If the file does not exist, you can skip this step)
  5. cd
  6. apt install pipx
  7. pipx ensurepath
  8. Reboot the container for the PATH variable change to apply

Setup

Run the below command to install PlexTraktSync

  1. To install PlexTraktSync, run pipx install PlexTraktSync
  2. Next get the path for the config folder by running plextraktsync info
  3. Make note of the "config file" value shown.
  4. Edit the config file by entering nano followed by the file path of the config file. For example, nano /root/.config/PlexTraktSync/config.yml. You can edit this file at any point if you wish to come back to it later.
  5. Enter the config you required. You can find more information about the available settings at the PlexTraktSync docs.
  6. Press ctrl + x, then y to save the changes to the file.

First Run

  1. Run the command plextraktsync sync. You will be asked to sign into your Plex and to authorise Trakt on order to link them both up to PlexTraktSync. Follow the instructions presented to you in the terminal.
  2. Once you have gone through the steps, your sync will begin. The initial sync will take a very long time as PlexTraktSync will need to cache data about your library items. You can run a sync manually at any time using the plextraktsync sync command, but we will be automating this procedure in the next step.

Setting up Automatic Syncing

  1. Enter the command crontab -e to open the crrontab file. Enter 1 if prompted for an editor.
  2. Add the following 0 */1 * * * /root/.local/bin/plextraktsync sync to the bottom of the file. This will cause the script to execute every hour, on the hour. You can change the values in the command depending on your requirement if you wish for it to sync more frequently or less frequently.
  3. Press ctrl + x, then y to save the changes to the file.

Updating Components

PlexTraktSync

Run the command plextraktsync self-update to allow PlexTraktSync to automatically update itself.

If you would prefer to manually update, you can do so at any time by entering pipx upgrade PlexTraktSync