zurg Documentation

repository·main·Indexed 21 days ago

https://github.com/debridmediamanager/zurg-testing

A high-performance, self-hosted WebDAV server designed to interface with Real-Debrid. zurg allows users to mount torrent libraries as local file systems using tools like rclone, making them compatible with media servers such as Plex and Infuse. Available in stable (v0.9.3-final) and latest (v0.10.0-rc.4-1) versions via binary or Docker.

Tokens
1.8K
Snippets
5
Records
6
Agent score
25%

What's inside zurg

  1. What is zurg?

    main

    zurg is a self-hosted Real-Debrid WebDAV server. It is designed to work with tools like rclone to mount your Real-Debrid torrent library directly into your file system (similar to Dropbox).

    Common use cases include:

    • Infuse: Using the WebDAV server directly.
    • Plex: Mounting the zurg WebDAV via rclone to make torrents appear as local files.
  2. Download zurg

    main

    You can download zurg as a binary or run it via Docker. There are two main tracks:

    Latest version (v0.10.0-rc.4-1)

    Note: This version is for Sponsors only.

    • Pull the private Docker image using the instructions provided on Patreon.
    • Refer to the Config guide for v0.10 for configuration changes.

    Stable version (v0.9.3-final)

    This version is Public.

    • Available via binary download or public Docker images.
    # Pull Latest (Sponsors only)
    docker pull ghcr.io/debridmediamanager/zurg:latest
    docker pull ghcr.io/debridmediamanager/zurg:v0.10.0-rc.4-1
    
    # Pull Stable (Public)
    docker pull ghcr.io/debridmediamanager/zurg-testing:latest
    docker pull ghcr.io/debridmediamanager/zurg-testing:v0.9.3-final
  3. Run zurg for Plex with Docker

    main

    Follow these 5 steps to set up zurg for a Plex environment using Docker:

    1. Clone the repository: git clone https://github.com/debridmediamanager/zurg-testing.git (or use the zurg repo).
    2. Configure: Add your Real-Debrid token to the config.yml file.
    3. Prepare Mount Point: Create the directory where you want to mount the files: sudo mkdir -p /mnt/zurg.
    4. Start: Run docker compose up -d.
    5. Verify: Run time ls -1R /mnt/zurg to check if files are appearing.

    Important Notes:

    • Once running, a web server is accessible at localhost:9999.
    • If you modify config.yml, restart the service with docker compose restart zurg.
    • Remote Server Warning: If running zurg on a server outside your home network, you must uncheck "Use my Remote Traffic automatically when needed" on your Real-Debrid Account page.
    # 1. Clone
    git clone https://github.com/debridmediamanager/zurg-testing.git
    
    # 2. (Edit config.yml with your token)
    
    # 3. Create mount point
    sudo mkdir -p /mnt/zurg
    
    # 4. Start
    docker compose up -d
    
    # 5. Verify
    time ls -1R /mnt/zurg
  4. Mount Zurg filesystem using Rclone

    main

    To expose the Zurg files as a local filesystem, use the rclone service. The service executes a mount command that connects to the zurg: remote.

    Important Configuration Notes:

    • Mount Path: You must change the host path (e.g., /mnt/zurg) in the volumes section to your preferred mount location.
    • Mount Flags: The command uses --allow-other, --allow-non-empty, --dir-cache-time 10s, and --vfs-cache-mode full to ensure compatibility and performance.
    • Permissions: Ensure PUID and PGID environment variables are set to match your host user to avoid permission issues with the mounted files.
    # The command executed by the rclone container
    mount zurg: /data --allow-other --allow-non-empty --dir-cache-time 10s --vfs-cache-mode full
  5. Configure Zurg via Docker Compose

    main

    Zurg can be deployed using Docker Compose. The setup typically involves two services: zurg (the core application) and rclone (used to mount the Zurg filesystem).

    Key configuration requirements:

    • Zurg Service: Requires a config.yml file mounted to /app/config.yml and a data volume for /app/data.
    • Rclone Service: Used to mount the Zurg filesystem to a local path. It requires SYS_ADMIN capabilities, apparmor:unconfined security options, and access to /dev/fuse to perform the mount.
    services:
      zurg:
        image: ghcr.io/debridmediamanager/zurg-testing:latest    
        container_name: zurg
        restart: unless-stopped
        ports:
          - 9999:9999
        volumes:
          - ./scripts/plex_update.sh:/app/plex_update.sh
          - ./config.yml:/app/config.yml
          - zurgdata:/app/data
    
      rclone:
        image: rclone/rclone:latest
        container_name: rclone
        restart: unless-stopped
        environment:
          TZ: Europe/Berlin
          PUID: 1000
          PGID: 1000
        volumes:
          - /mnt/zurg:/data:rshared
          - ./rclone.conf:/config/rclone/rclone.conf
        cap_add:
          - SYS_ADMIN
        security_opt:
          - apparmor:unconfined
        devices:
          - /dev/fuse:/dev/fuse:rwm
        depends_on:
          - zurg
        command: "mount zurg: /data --allow-other --allow-non-empty --dir-cache-time 10s --vfs-cache-mode full"
    
    volumes:
      zurgdata:
  6. zurg CLI Reference

    main

    The zurg command-line utility allows for managing your account and testing the environment. Use zurg [command] --help for detailed information on specific commands.

    Usage:
      zurg [flags]
      zurg [command]
    
    Available Commands:
      clear-downloads Clear all downloads (unrestricted links) in your account
      clear-torrents  Clear all torrents in your account
      completion      Generate the autocompletion script for the specified shell
      help            Help about any command
      network-test    Run a network test
      version         Prints zurg's current version
    
    Flags:
      -c, --config string   config file path (default "./config.yml")
      -h, --help            help for zurg