Command line
The zurg binary is the server and a set of tools. Run it with no command to start the server. Every command takes --help and prints the text this page is written from.
Run commands from the instance's working directory. zurg reads ./config.yml there unless you pass --config. Its data and logs folders resolve against that directory too.
zurg [flags]
zurg [command]
Flags every command takes
Setting up
zurg setup
Writes a config and downloads rclone and ffprobe. Then it registers zurg to start on its own. It asks for anything it is missing. --dry-run prints the plan and changes nothing.
Keys and passwords are read from files. That keeps them out of your shell history.
Each platform has its own walkthrough.
zurg doctor
Checks what setup put in place. It reads the config and looks for rclone and ffprobe. Then it checks the service and the HTTP endpoint and the mount. Run it first when something is not working.
zurg service
Installs and controls auto-start without running the rest of setup.
Every one of them takes the same flags.
zurg download-requirements
Downloads rclone and ffprobe into a folder and writes their paths into the config. Setup does this for you unless you pass --skip-downloads.
zurg update
Replaces the binary with the newest sponsor nightly. Inside a container it refuses because the next recreate would throw the new binary away. Pull a new image there instead. --force updates anyway.
It signs in to GitHub through the GitHub CLI. That is the one on your PATH or the one the installers keep in bin beside zurg. A sign-in the GitHub CLI saved without a keyring works even when the CLI itself is gone. GITHUB_TOKEN works too. When it finds none it prints the installer command that puts the GitHub CLI back.
zurg version
Prints the build. zurg --version prints the same thing.
Backups
zurg backup
Writes a .zurgbackup file holding what nothing else can rebuild. That is the config with its tokens and every data/*.zurgtorrent with its tags and account links. It also holds the __magic__ store under data/local/ and the source NZBs under nzbs/. Caches and Plex snapshots and logs are left out so the backup stays the size of what it protects.
The instance does not need to be running. That makes it safe to schedule. The file is a gzip tar with your tokens inside. Store it like a password.
zurg restore-backup
Unpacks a .zurgbackup into the current directory. Every file goes back to the path it came from. Stop zurg first. The restore writes files a running instance is writing too.
zurg restore-backup my-backup.zurgbackup
A config already in the directory is left alone. That file carries the tokens the whole library hangs on. Pass --force-config to overwrite it.
Measuring
zurg benchmark-my-setup
Reads real bytes the way a player would and reports the spread rather than one figure. It runs in three phases. First each account on its own. That is the number to hold against what the service promises. Then every account at once. Accounts that each do 70 MiB/s alone and 25 MiB/s together share one saturated uplink. Last it reads through the rclone mount. The gap to the first phase is what FUSE and the VFS cost.
Samples land at random offsets. Every layer underneath caches and rereading one offset would measure the cache instead of the link.
It adds and deletes nothing. It does spend your bandwidth. Each account reads the sample size times the iteration count twice. The mount phase comes on top.
zurg network-test
Measures how quickly this host reaches each Real-Debrid download server over IPv4 and over IPv6. The results go to logs/network-test.log and into data/ where the server reads them to pick its hosts. Set PROXY in the environment to test through a proxy.
Plex
These three work against the Plex server on this host. Configure Plex first. See Plex Integration.
zurg plex-settings
Reports the Plex settings that matter for a mount and fixes what the policy allows. Plex's defaults assume local disks. One of them deletes the library when a scan meets a blip. Others make Plex decode every file it has. plex.md explains each one.
zurg plex-drift
Reads Plex's database without writing to it and checks every file it points to under the mount. It reports the ones that are gone. Run it before a library scan. A scan that meets those files turns them into deletions. Knowing the count first makes the scan a decision and not a gamble.
It needs plex_database_path and Plex on the same host.
zurg plex-backups
Lists the Plex database snapshots zurg holds with the newest first. Each row shows when it was taken and its size and how many items each library held at that moment. The counts come out of the snapshots themselves. So the list shows what each one can actually restore. Plex Library Maintenance covers when zurg takes them.
Sharing
zurg export-torrents
Writes portable .zurgtorrent files that describe your releases without your account in them. No credentials go in. No torrent ids and no repair state and no CDN links either. No provider is contacted.
It reads data/*.zurgtorrent or an old dump file. Pass a file or folder to export only those. The recipient puts the files in torrents/<their-account>/ and sets that account to library.source: local. portable-libraries.md covers the receiving side.
zurg nzb-share
Builds a share of your NZBs that you can publish. The result is a folder with a manifest.json and one .nzb.gz per release named by content hash. Every NZB is cleaned first. Comments and DOCTYPEs and watermark metadata go. So do the original file names. Posters and dates go too, and every file gets the same fixed newsgroup, because some indexers change all three on every download. Account stamps an indexer hides in a subject, a title or a password are cut. What you publish names the release and never the account that downloaded it. Real archive passwords stay because recipients need them to read the release.
Publish the folder anywhere static. A git repository works. So does a Pages site or rclone serve. The audit of what was stripped stays on your machine and prints here. It holds the very identifiers the clean exists to remove.
The dashboard can serve a share too. See Public NZB sharing.
zurg nzb-sync
Pulls a shared library into your watch folder. It follows a share's manifest.json from a URL or a local path. Each NZB is checked against the hash in the manifest before it is written. Your own news accounts fetch the bytes.
zurg nzb-sync https://example.com/share/manifest.json
It only adds. Entries you already have are skipped and a share never deletes anything. Two shares of the same releases dedupe by content hash.
Clearing a Real-Debrid account
These two delete everything of one kind from a Real-Debrid account. They cannot be undone. They work on Real-Debrid only.
Both ask for the auth cookie of a logged-in Real-Debrid browser session rather than your API token. They print a line of JavaScript that shows it. Run that in the browser console on real-debrid.com and paste the result.
Shell completion
zurg completion bash prints a completion script for bash. The same works for zsh and fish and powershell. zurg completion <shell> --help says where to put it.