This comprehensive guide walks you through setting up a Plex server integrated with Real Debrid using Zurg on a Windows system. It includes streamlined steps, troubleshooting tips, and optimizations for a seamless streaming experience.
Before you begin, ensure you have the following:
- Real Debrid Account: Obtain your API token from Real Debrid.
- Windows System: Windows 10 or later (64-bit recommended).
- Administrative Privileges: Required for installing services.
- Tools:
-
Download Zurg:
- Visit the Zurg releases page.
- Download the latest release (e.g.,
zurg-vX.X.X-windows-amd64.zip). - Extract the contents to a folder, e.g.,
c:\zurg.
-
Download Configuration Files:
- From the Zurg repository, download:
config.ymlrclone.confscripts/plex_update.ps1
- Place these files in the same folder as
zurg.exe(e.g.,c:\zurg).
- From the Zurg repository, download:
-
Copy Tools:
- Copy
rclone.exe,nssm.exe, andplex_update.ps1into thec:\zurgfolder.
Your folder structure should look like this:
c:\zurg\ ├── zurg.exe ├── rclone.exe ├── nssm.exe ├── config.yml ├── rclone.conf ├── plex_update.ps1 - Copy
-
Edit
config.yml:- Open
config.ymlin a text editor (e.g., Notepad++ or VS Code). - Replace the
token: ...line with your Real Debrid API token:token: YOUR_REAL_DEBRID_TOKEN
- Save the file.
- Open
-
Edit
rclone.conf:- Open
rclone.confin a text editor. - Ensure the
urlpoints tolocalhost:[zurg] type = webdav url = http://localhost:9999/dav vendor = other pacer_min_sleep = 0 - Save the file.
- Open
Run all commands from a Command Prompt or PowerShell with administrative privileges, navigated to the Zurg folder (e.g., cd c:\zurg).
- Run:
nssm.exe install zurg
- In the NSSM GUI:
- Path: Browse and select
c:\zurg\zurg.exe. - Startup directory: Set to
c:\zurg. - Arguments: Leave blank.
- I/O Tab: Configure logging for troubleshooting:
- Output (stdout):
c:\zurg\logs\zurg.log - Error (stderr):
c:\zurg\logs\zurg_error.log - Create a
logsfolder inc:\zurgif it doesn't exist.
- Output (stdout):
- Path: Browse and select
- Click Install Service.
- Run:
nssm.exe install rclone
- In the NSSM GUI:
- Path: Browse and select
c:\zurg\rclone.exe. - Startup directory: Set to
c:\zurg. - Arguments:
mount zurg: Z: --dir-cache-time 10s --vfs-cache-mode full --vfs-read-chunk-size 1M --vfs-read-chunk-size-limit 32M --no-console
- Replace
Z:with your preferred drive letter if needed.
- Replace
- I/O Tab: Configure logging for troubleshooting:
- Output (stdout):
c:\zurg\logs\rclone.log - Error (stderr):
c:\zurg\logs\rclone_error.log - Ensure the
logsfolder exists inc:\zurg.
- Output (stdout):
- Path: Browse and select
- Click Install Service.
Note: NSSM does not create log files by default. Configuring the I/O tab ensures logs are generated for debugging service issues.
-
Option 1: Using Windows Services App:
- Press
Win + R, typeservices.msc, and press Enter. - Locate
rcloneandzurgin the list. - Right-click each service and select Start.
- start
rclonebefore you startzurg
- Press
-
Option 2: Using NSSM Commands:
- Run the following commands in a Command Prompt or PowerShell with administrative privileges:
nssm.exe start rclone
nssm.exe start zurg
- To verify the services are running, run:
nssm.exe status rclone nssm.exe status zurg
- Run the following commands in a Command Prompt or PowerShell with administrative privileges:
- By default, these services should start automatically after a system reboot.
-
Check the Mounted Drive:
- Open File Explorer and look for the new drive (
z:by default) under This PC. - You should see folders like
movies,shows,anime, etc.
- Open File Explorer and look for the new drive (
-
Test WebDAV Access:
- Open a web browser and navigate to
http://localhost:9999/. - Confirm you can access the Zurg WebDAV interface.
- Open a web browser and navigate to
-
Troubleshooting:
- If the drive doesn’t appear, ensure WinFSP is installed and both services are running.
For improved performance, modify the Rclone service arguments:
- Open the Services app, stop both the
rcloneandzurgservices. - Run:
nssm.exe edit rclone
- Update the Arguments field with:
mount zurg: Z: --attr-timeout 10y --buffer-size 128M --dir-cache-time 10s --poll-interval 60s --vfs-cache-max-age 2M --vfs-cache-max-size 50G --vfs-cache-min-free-space 2G --vfs-cache-mode full --vfs-cache-poll-interval 30s --vfs-disk-space-total-size 100G --vfs-fast-fingerprint --vfs-read-ahead 64M --vfs-read-chunk-size 1M --vfs-read-chunk-size-limit 32M --vfs-read-wait 40ms --vfs-refresh --transfers 32 --checkers 32 --multi-thread-streams 8 --fast-list --no-console
- Click Apply, then restart both the
rcloneandzurgservices.
Explanation of Key Parameters:
--vfs-cache-mode full: Ensures smooth streaming by caching files.--vfs-read-chunk-size 1Mand--vfs-read-chunk-size-limit 32M: Optimizes data transfer for streaming.--vfs-cache-max-size 50G: Limits cache size to prevent disk space issues.--transfers 32 --checkers 32: Increases parallel operations for faster access.
To use your Zurg setup with Plex:
-
Add Zurg Folders to Plex:
- Open Plex and navigate to Settings > Libraries.
- Add new libraries or edit existing ones to include paths like
z:\movies,z:\shows, etc. - Refer to Plex's guide on editing libraries.
-
Automate Library Updates:
- Edit
config.ymlto enable automatic Plex library updates:- Uncomment the
on_library_updateline for Windows:on_library_update: '& powershell -ExecutionPolicy Bypass -File .\plex_update.ps1 --% "$args"'
- Comment out the Linux/macOS line:
#on_library_update: sh plex_update.sh "$@"
- Uncomment the
- Edit
-
Configure
plex_update.ps1:- Open
plex_update.ps1in a text editor and update:# Plex server details $plexUrl = "http://YOUR_PLEX_SERVER_IP:32400" # Replace with your Plex server IP $plexToken = "YOUR_PLEX_TOKEN" # Obtain from Plex settings
# Replace with your mount $mount = "Z:" # Match your Rclone drive letter
# Log file path Start-Transcript -Path "C:\Zurg\logs\plex_update.log" -Append
# Directories to update $directoriesToUpdate = @("Z:\movies", "Z:\anime", "Z:\shows", "Z:\movies4k", "Z:\shows4k")
- Save the file.
- Open
-
Add Content to Real Debrid:
- Use tools like Debrid Media Manager or Stremio to add torrents or magnets to your Real Debrid account.
- Zurg will sync the content to your mounted drive, and Plex will detect it via auto-scans.
-
Drive Not Showing in File Explorer:
- Verify WinFSP is installed correctly.
- Ensure both
zurgandrcloneservices are running (services.msc). - Check
rclone.conffor correcturl(http://localhost:9999/dav).
-
Plex Not Detecting New Content:
- Confirm the
plex_update.ps1script has the correct$plexUrland$plexToken. - Check the log file (
c:\zurg\logs\plex_update.log) for errors. - Manually trigger a library scan in Plex to test.
- Confirm the
-
Performance Issues:
- Use the optimized Rclone arguments from Step 6.
- Ensure your system has sufficient RAM and CPU for caching and streaming.
-
Service Fails to Start:
- Check NSSM logs (
c:\zurg\logs\zurg.log,c:\zurg\logs\zurg_error.log,c:\zurg\logs\rclone.log,c:\Zurg\logs\rclone_error.log) for error details - Verify paths to
zurg.exeandrclone.exein NSSM configurations. - Use
nssm.exe status [serviceName]to check service status
- Check NSSM logs (
Your Plex server is now integrated with Real Debrid via Zurg, providing access to a vast library of content. Stream movies, shows, and more with minimal buffering and automatic library updates. For further customization, explore the Zurg repository or Rclone documentation.
Happy streaming! 🎬
I have now added an automated method to help set this all up!