#
Zurg Configuration Guide
This guide provides a comprehensive explanation of all configuration options available in Zurg, along with their use cases and examples. Zurg offers extensive configurability through its config.yml file, allowing you to tailor its behavior to your specific needs.
#
Core Configuration
#
Basic Settings
#
Network & Server Configuration
#
Authentication
#
Performance & Rate Limits
#
File & Content Management
#
File Naming & Structure
#
Scheduling & Updates
#
Media Analysis & Library Integration
Example for on_library_update:
on_library_update: |
for arg in "$@"
do
echo "detected update on: $arg"
curl -s "http://plex:32400/library/sections/1/refresh?path=$arg&X-Plex-Token=YOUR_TOKEN"
done
#
Media Server Integration
#
Plex, Jellyfin, and Emby Integration
#
Advanced Features
#
Directory Configuration
Zurg allows you to define custom directories with filtering rules. This powerful feature lets you organize your content based on various criteria.
#
Basic Directory Structure
directories:
my_directory_name:
group: media # Directories group
group_order: 10 # Priority within the group
only_show_the_biggest_file: true # Optional: show only largest file
only_show_files_with_size_lte: 10000000000 # Optional: max file size (10GB)
only_show_files_with_size_gte: 1000000000 # Optional: min file size (1GB)
filters:
- filter_type: value # Filters determine which torrents appear here
#
Filter Types
Zurg supports a wide range of filters for directory configuration:
#
Basic Filters
#
File Inside Torrent Filters
#
Content Type Filters
#
Tag Filters
#
Complex Filter Examples
You can combine filters using logical operators:
directories:
anime:
group: media
group_order: 10
filters:
- and: # All conditions must match
- has_episodes: true
- any_file_inside_regex: /^\[/
- any_file_inside_not_regex: /s\d\de\d\d/i
quality_movies:
group: media
group_order: 20
filters:
- or: # Any condition can match
- and:
- size_gte: 5000000000
- any_file_inside_regex: /\.mkv$/
- tags_match_all: ["bluray", "x265"]
#
Using Tags for Organization
Tags are especially powerful when combined with media analysis. Zurg can apply tags automatically after analyzing your media files. For example, you can organize content by:
- Audio language:
zurg_aud_eng,zurg_aud_ger, etc. - Subtitle availability:
zurg_sub_eng, etc. - Resolution:
zurg_4k,zurg_1080p, etc.
This allows for sophisticated filtering like:
"4k english shows":
group: tags1
group_order: 10
filters:
- and:
- tags_match_all: ["zurg_4k", "zurg_aud_eng"]
- has_episodes: true
"foreign films with english subtitles":
group: tags2
group_order: 10
filters:
- and:
- tags_match_all: ["zurg_sub_eng"]
- tags_not_match_all: ["zurg_aud_eng"]
Note that tags like zurg_4k, zurg_aud_eng, etc. are applied only after media analysis is performed on the torrents.
#
Real-World Configuration Examples
#
Basic Media Server Setup
zurg: v1
token: YOUR_RD_API_TOKEN
port: 9999
enable_repair: true
rar_action: extract
cache_network_test_results: true
plex_server_url: http://localhost:32400
plex_token: YOUR_PLEX_TOKEN
mount_path: /mnt/zurg
directories:
shows:
group: media
group_order: 10
filters:
- has_episodes: true
movies:
group: media
group_order: 20
only_show_the_biggest_file: true
filters:
- regex: /.*/
#
Advanced Configuration with Tag-Based Organization
zurg: v1
token: YOUR_RD_API_TOKEN
port: 9999
enable_repair: true
restrict_repair_to_cached: true
addl_playable_extensions:
- m4b
- cbz
rar_action: extract
cache_network_test_results: true
get_downloads_limit: 0
plex_server_url: http://localhost:32400
plex_token: YOUR_PLEX_TOKEN
mount_path: /mnt/zurg
base_url: http://fun:9999
directories:
# Specific content directories
"fishman":
group_order: 1
group: media
filters:
- contains: fish-man
"One_Piece":
group_order: 2
group: media
filters:
- contains: One Piece
# Content type directories
music:
group_order: 5
group: media
filters:
- is_music: true
"One Pace":
group_order: 10
group: media
filters:
- contains: One Pace
"solo_leveling":
group_order: 11
group: media
filters:
- contains: Solo Leveling
# General content organization
anime:
group_order: 15
group: media
filters:
- regex: /\b[a-fA-F0-9]{8}\b/
- any_file_inside_regex: /\b[a-fA-F0-9]{8}\b/
shows:
group_order: 20
group: media
filters:
- has_episodes: true
movies:
group_order: 30
group: media
only_show_the_biggest_file: true
filters:
- regex: /.*/
# Tag-based organization
"german shows":
group: tags0
group_order: 10
filters:
- and:
- tags_match_all: ["zurg_aud_ger"]
- has_episodes: true
"german movies":
group: tags0
group_order: 20
filters:
- tags_match_all: ["zurg_aud_ger"]
"4k english shows":
group: tags1
group_order: 10
filters:
- and:
- tags_match_all: ["zurg_4k", "zurg_aud_eng"]
- has_episodes: true
"4k english movies":
group: tags1
group_order: 20
filters:
- tags_match_all: ["zurg_4k", "zurg_aud_eng"]
"4k foreign shows":
group: tags2
group_order: 10
filters:
- and:
- tags_match_all: ["zurg_4k", "zurg_sub_eng"]
- tags_not_match_all: ["zurg_aud_eng"]
- has_episodes: true
"4k foreign movies":
group: tags2
group_order: 20
filters:
- and:
- tags_match_all: ["zurg_4k", "zurg_sub_eng"]
- tags_not_match_all: ["zurg_aud_eng"]
"how can i understand these shows":
group: tags3
group_order: 10
filters:
- and:
- tags_missing_all: ["zurg_aud_eng", "zurg_sub_eng", "zurg_aud_und"]
- has_episodes: true
"how can i understand these movies":
group: tags3
group_order: 20
filters:
- tags_missing_all: ["zurg_aud_eng", "zurg_sub_eng", "zurg_aud_und"]
"1080p shows":
group: tags4
group_order: 10
filters:
- and:
- tags_match_all: ["zurg_1080p"]
- has_episodes: true
"1080p movies":
group: tags4
group_order: 20
filters:
- tags_match_all: ["zurg_1080p"]
"low quality shows":
group: tags5
group_order: 10
filters:
- and:
- tags_missing_all: ["zurg_4k", "zurg_1080p"]
- has_episodes: true
"low quality movies":
group: tags5
group_order: 20
filters:
- tags_missing_all: ["zurg_4k", "zurg_1080p"]
"audiobooks":
filters:
- and:
- any_file_inside_regex: /\.(mp3|m4b)$/
#
Best Practices
- Start Simple: Begin with core settings and gradually add more complex configurations as needed.
- Directory Organization: Create a logical directory structure that mirrors your media organization.
- Group Strategy: Use the group and group_order parameters to prioritize which directories "claim" content first.
- Tag-Based Organization: Leverage tags for advanced filtering, especially after media analysis.
- Performance Tuning: Adjust timeouts and rate limits based on your network conditions and Real-Debrid account limitations.
- Security: Always use authentication when exposing Zurg to the internet.
- Backup: Keep a backup of your working configuration before making significant changes.
By properly configuring Zurg, you can create a powerful, automated media server that seamlessly integrates with Real-Debrid and your preferred media management software.