Skip to main content
Add TrackersList trackers directly to .torrent files before adding them to your client using the bittorrent-tracker-editor tool or online editors.

Overview

Modifying .torrent files directly allows you to embed TrackersList trackers into the torrent metadata. This is useful when:
  • Sharing torrents with others who want pre-configured trackers
  • Working with clients that don’t support automated tracker scripts
  • Archiving torrents with optimal tracker lists
  • Batch-processing multiple torrent files

Prerequisites

You’ll need:
  • .torrent files you want to modify
  • The bittorrent-tracker-editor tool or access to an online editor
  • A TrackersList URL or downloaded tracker list

Using bittorrent-tracker-editor

The bittorrent-tracker-editor is a command-line tool for batch editing torrent files.

bittorrent-tracker-editor

Official repository by GerryFerdinandus - Add trackers to .torrent files

Installation

1

Install Node.js

The tool requires Node.js. Verify installation:
node --version
npm --version
If not installed, download from nodejs.org.
2

Install bittorrent-tracker-editor

Install globally via npm:
npm install -g bittorrent-tracker-editor
Or using npx (no installation required):
npx bittorrent-tracker-editor --help
3

Verify installation

bittorrent-tracker-editor --version

Basic Usage

Add trackers to a single torrent file:
1

Download tracker list

curl -o trackers.txt https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt
2

Add trackers to torrent

bittorrent-tracker-editor --input my-torrent.torrent --trackers trackers.txt --output my-torrent-updated.torrent
3

Verify the changes

Check that trackers were added:
bittorrent-tracker-editor --info my-torrent-updated.torrent

Batch Processing

Process multiple torrent files at once:
1

Organize torrent files

Place all .torrent files in a directory:
mkdir -p ~/torrents/original
mkdir -p ~/torrents/updated
# Copy your .torrent files to ~/torrents/original/
2

Download tracker list

curl -o ~/trackers.txt https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt
3

Process all torrents

for file in ~/torrents/original/*.torrent; do
  filename=$(basename "$file")
  bittorrent-tracker-editor \
    --input "$file" \
    --trackers ~/trackers.txt \
    --output "~/torrents/updated/$filename"
done
4

Verify results

Check that all files were processed:
ls -lh ~/torrents/updated/
Create a script to periodically update your torrent files with the latest TrackersList trackers.

Command-Line Options

Key options for bittorrent-tracker-editor:

Online Torrent Editors

For quick edits without installing software, use web-based torrent editors.

TorrentEditor.com

TorrentEditor

Web-based torrent editor - no installation required
1

Open the website

Navigate to torrenteditor.com in your browser.
2

Upload torrent file

Click Choose File and select your .torrent file.
3

Add trackers

In the Trackers section:
  1. Copy trackers from trackers_best.txt
  2. Paste them into the tracker field (one per line)
  3. Click Add or Update
4

Download modified torrent

Click Save or Download to get your updated .torrent file.
Be cautious when uploading private or sensitive torrent files to online services. Use local tools for private torrents.

Automated Script

Create a script to automatically fetch TrackersList and update torrent files:
#!/bin/bash

# update-torrent-trackers.sh
# Automatically add TrackersList to torrent files

TRACKER_URL="https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt"
TRACKERS_FILE="/tmp/trackers.txt"
INPUT_DIR="$1"
OUTPUT_DIR="$2"

if [ -z "$INPUT_DIR" ] || [ -z "$OUTPUT_DIR" ]; then
  echo "Usage: $0 <input-directory> <output-directory>"
  exit 1
fi

# Download latest trackers
echo "Downloading latest tracker list..."
curl -s "$TRACKER_URL" -o "$TRACKERS_FILE"

if [ ! -s "$TRACKERS_FILE" ]; then
  echo "Error: Failed to download tracker list"
  exit 1
fi

# Create output directory
mkdir -p "$OUTPUT_DIR"

# Process each torrent file
count=0
for file in "$INPUT_DIR"/*.torrent; do
  if [ -f "$file" ]; then
    filename=$(basename "$file")
    echo "Processing: $filename"
    
    bittorrent-tracker-editor \
      --input "$file" \
      --trackers "$TRACKERS_FILE" \
      --output "$OUTPUT_DIR/$filename"
    
    ((count++))
  fi
done

echo "Processed $count torrent files"
echo "Updated torrents saved to: $OUTPUT_DIR"

# Cleanup
rm "$TRACKERS_FILE"

Usage

# Make script executable
chmod +x update-torrent-trackers.sh

# Run the script
./update-torrent-trackers.sh ~/torrents/original ~/torrents/updated
Schedule this script with cron to automatically process new torrent files in a watch folder.

Tracker List Selection

Choose the appropriate TrackersList for your torrent files:
Best for general use
https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt
  • 20 top-performing trackers
  • Optimal balance of performance and file size
  • Updated daily
For magnet links instead of torrent files, use an online magnet link editor:

Magnets Editor

Add trackers to magnet links online
1

Copy your magnet link

Copy the complete magnet URI starting with magnet:?
2

Open magnets editor

Navigate to magnets editor
3

Add trackers

  1. Paste your magnet link
  2. Add tracker URLs from TrackersList
  3. Click Update or Generate
4

Use updated magnet

Copy the new magnet link with added trackers and use it in your torrent client.

Troubleshooting

  • Verify Node.js and npm are installed: node --version && npm --version
  • Reinstall globally: npm install -g bittorrent-tracker-editor
  • Use npx instead: npx bittorrent-tracker-editor
  • Check npm global bin path: npm config get prefix
  • Always keep a backup of original torrent files
  • Verify the tracker list file is properly formatted (one URL per line)
  • Check for special characters or encoding issues in tracker URLs
  • Use the --info flag to validate the torrent before and after editing
  • Verify the updated torrent was added to the client
  • Check that the client supports the tracker protocols used
  • Some clients cache torrent metadata; try removing and re-adding the torrent
  • Use --replace flag if you want to completely replace existing trackers
  • Check file permissions: ls -la ~/torrents/
  • Ensure write permissions on output directory: chmod 755 ~/torrents/updated
  • Run script with appropriate user permissions
  • Avoid processing system or protected directories

Best Practices

Recommendations for torrent file modification:
  • Always keep backups of original .torrent files
  • Use trackers_best.txt for most cases to balance performance and file size
  • Update torrent files periodically (monthly or quarterly) to maintain fresh tracker lists
  • Test modified torrents before distributing to others
  • Document which tracker list was used for future reference
  • Avoid adding too many trackers (more isn’t always better)

Advanced Usage

Custom Tracker Lists

Create your own curated tracker list:
# Combine multiple TrackersList sources
curl https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt > my-trackers.txt
curl https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all_udp.txt >> my-trackers.txt

# Add custom trackers
echo "udp://my-tracker.example.com:80/announce" >> my-trackers.txt

# Remove duplicates and sort
sort -u my-trackers.txt -o my-trackers.txt

# Use in bittorrent-tracker-editor
bittorrent-tracker-editor --input file.torrent --trackers my-trackers.txt --output file-updated.torrent

Filtering Trackers

Filter trackers by criteria before adding:
# Only HTTPS trackers
curl https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt | grep '^https://' > https-only.txt

# Only UDP trackers
curl https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt | grep '^udp://' > udp-only.txt

# Exclude specific domains
curl https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt | grep -v 'excluded-domain.com' > filtered.txt

Additional Resources

bittorrent-tracker-editor

Official repository and documentation

TorrentEditor.com

Online torrent file editor

Magnets Editor

Add trackers to magnet links

TrackersList Repository

View all available tracker lists

Build docs developers (and LLMs) love