A standalone monitoring tool for throttling download speed based on Plex Media Player streams
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
systemd Added service file for running as daemon Aug 12, 2018
.gitignore Added git ignore Aug 9, 2018
Dockerfile Updated Dockerfil Nov 20, 2018
README.md Updated README Sep 4, 2018
config_example.json Updated example config Sep 5, 2018
nzb.py Added functionality to have a user-defined max instead of completely … Sep 4, 2018
plex.py Count streams that are buffering as active streams Sep 4, 2018
throttle.py Initially, set speed to either unthrottled or user defined max_speed … Sep 4, 2018




Nzbthrottle was designed in order to dynamically control the bandwidth allocation when users are actively streaming from Plex to avoid unnecessary buffering while still allowing the user to download at the fastest rate possible.


Note: Must have Python 3.5 or higher

  1. Run pip install -r requirements.txt from within the project root
  2. Copy config_example.json and name the new file config.json
  3. Edit the config with all of your appropriate credentials

Sample Config:

    "token": "daf32j3ik3l2k"


url - URL of your Plex Server

interval - Interval with which to check for active streams (seconds)

token - Your X-Plex-Token


username - Username for Nzbget

password - Password for Nzbget

url - URL of your NZBGet Client

speeds - Define speed to throttle to (in kB/s) based on number of active streams

max_speed - Define maximum speed when the throttle is lifted (in kB/s). Set to 0 if you wish to not use a limit


Running script manually

python throttle.py [-h] [--log-level=['DEBUG','INFO','WARN']]

Running script as service

If you do not wish to run the script manually, the module can be daemonized by copying the service file and running the script as a service. May need to modify location of script based on your preference by changing the following line in 'nzbthrottle.service'

ExecStart=/usr/bin/python3 /opt/nzbthrottle/throttle.py

Running script in a Docker Container

docker run --name nzbthrottle -d -v /PATH/TO/CONFIG.json:/nzbthrottle/config.json daghaian/nzbthrottle