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 https://github.com/jacobwgillespie/plex-sync
- 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.
[myfirstuser] HOST1=dynamicDNSHost1.domain.com PORT1=33400 TOKEN1=XXXXXXXXXXXXXXXXXXXX HOST2=dynamicDNSHost2.domain.com PORT2=33400 TOKEN2=XXXXXXXXXXXXXXXXXXXX SECTIONS=1:3|2:1 [myseconduser] HOST1=dynamicDNSHost1.domain.com PORT1=33400 TOKEN1=XXXXXXXXXXXXXXXXXXXX HOST2=dynamicDNSHost2.domain.com PORT2=33400 TOKEN2=XXXXXXXXXXXXXXXXXXXX SECTIONS=1:3|2:1
This would synchronize
1 for both
The following example is for docker-compose.
version: '2' services: plex-sync: image: nowsci/plex-sync container_name: plex-sync volumes: - ./plex-sync/config:/config environment: - INITIAL_RUN=1 - DRY_RUN=1 - CRON_SCHEDULE=*/30 * * * * restart: always
||Set this to 1 to run plex-sync as soon as the container starts before executing cron.|
||The default is every hour, however a custom schedule can be used with this variable.|
||Set this environment variable to 1 make
||Can be either
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:
wget https://raw.githubusercontent.com/Fmstrat/plex-sync/master/parsetokens.sh chmod 755 parsetokens.sh ./parsetokens.sh "/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.