Public | Automated Build

Last pushed: 15 days ago
Short Description
Plex-sync docker container that allows you to sync remote servers via SSL with dynamic hostnames.
Full Description


Docker container for plex-sync that allows you to synchronize remote servers across the internet via SSL with dynamic DNS hostnames.

Based on plex-sync from


  • You will need dynamic DNS hostnames (or static) for each of your Plex servers
  • SSL must be enabled in Plex
  • You must have tokens for each user (pull from logs)


You will need a servers.cfg file that maps to /config/servers.cfg in the container. The format is as follows, no spaces are allowed.




This would synchronize dynamicDNSHost1 section 1 with dynamicDNSHost2 section 3 and dynamicDNSHost1 section 2 with dynamicDNSHost2 section 1 for both myfirstuser and myseconduser.


The following example is for docker-compose.

version: '2'


    image: nowsci/plex-sync
    container_name: plex-sync
      - ./plex-sync/config:/config
      - INITIAL_RUN=1
      - DRY_RUN=1
      - CRON_SCHEDULE=*/30 * * * *
    restart: always
Variable Description
INITIAL_RUN Set this to 1 to run plex-sync as soon as the container starts before executing cron.
CRON_SCHEDULE The default is every hour, however a custom schedule can be used with this variable.
DRY_RUN Set this environment variable to 1 make plex-sync print out what it was planning to do rather than actually perform the synchronization.
MATCH_TYPE Can be either fuzzy (default) or precise. When the matching is fuzzy, the script will match items by their year and title. When the matching is precise, the script matches items by their internal Plex GUID, which is usually the IMDb or TMDb ID. This requires an individual API request to be performed for each item (each movie, each TV episode, etc.) and thus is very slow and can potentially overwhelm and crash the Plex server. Use at your own risk.
RATE_LIMIT Default 5. If the MATCH_TYPE is set to precise, this is the maximum number of concurrent API requests plex-sync will make to your server to fetch GUIDs. Use this to (potentially) alleviate performance issues with precise matching.

Getting tokens

There are many ways to find tokens for users on your Plex server, but the easiest way is to use the included script. On your Plex host, be sure that the following two options are checked:

  • Settings -> Server -> General -> Enable Plex Media Server verbose logging
  • Settings -> Server -> General -> Allow Plex Media Server tokens in logs

If not, check them and restart Plex. You will need to then wait a while for users to connect to the server before their tokens will show up in the log. Then, simply run the following on the host:

chmod 755
./ "/path/to/plex/Library/Application Support/Plex Media Server/Logs"

This will parse the log files and provide you a list of users and their tokens.

Docker Pull Command
Source Repository