Automatically scale Tdarr workers based on Plex activity. Reduces workers when people are streaming to prioritize Plex, scales back up when idle.
- Scales workers based on active Plex streams
- Day/Night mode with different worker limits
- Auto-detects Tdarr node ID
- Works with Tautulli OR direct Plex API
- Supports GPU, CPU, or both worker types
- Tdarr
- Plex (with Tautulli recommended)
curlandjq
- Download the script
- Make executable:
chmod +x tdarr-autoscale.sh - Edit the configuration variables at the top
- Test:
./tdarr-autoscale.sh - Add to cron:
crontab -e
*/5 * * * * /path/to/tdarr-autoscale.sh >> /path/to/tdarr-autoscale.log 2>&1
- Optional - log rotation (clears log weekly):
0 0 * * 0 > /path/to/tdarr-autoscale.log
| Variable | Default | Description |
|---|---|---|
WORKER_TYPE |
GPU |
Worker type: GPU, CPU, or BOTH |
USE_TAUTULLI |
true |
Use Tautulli API (set false for direct Plex) |
WORKERS_IDLE |
3 |
Workers when no one is watching |
WORKERS_ACTIVE |
1 |
Workers when someone is streaming |
WORKERS_NIGHT |
4 |
Workers at night (idle) |
WORKERS_NIGHT_ACTIVE |
2 |
Workers at night (streaming) |
NIGHT_START |
0 |
Night mode start hour (24h) |
NIGHT_END |
5 |
Night mode end hour (24h) |
GPU only:
[2026-01-02 19:15:00] Streams: 0 | Mode: Day | GPU Workers: 3 (no change)
[2026-01-02 19:20:00] Streams: 1 | Mode: Day | GPU Workers: 1 (-2)
[2026-01-02 19:25:00] Streams: 0 | Mode: Day | GPU Workers: 3 (+2)CPU only:
[2026-01-02 19:15:00] Streams: 0 | Mode: Day | CPU Workers: 3 (no change)
[2026-01-02 19:20:00] Streams: 1 | Mode: Day | CPU Workers: 1 (-2)
[2026-01-02 19:25:00] Streams: 0 | Mode: Day | CPU Workers: 3 (+2)Both GPU and CPU:
[2026-01-02 19:15:00] Streams: 0 | Mode: Day | GPU Workers: 3 (no change) | CPU Workers: 3 (+1)
[2026-01-02 19:20:00] Streams: 1 | Mode: Day | GPU Workers: 1 (-2) | CPU Workers: 1 (-2)MIT