How to Limit aria2 Seeding Share Ratio?

This article provides a straightforward guide on how to configure the aria2 download utility to automatically stop seeding a torrent once it reaches a specific share ratio. By default, aria2 may continue seeding indefinitely, consuming valuable upload bandwidth. By utilizing specific command-line flags or configuration file settings, you can precisely control your upload limits and automate your torrent management.

The Share Ratio Configuration Flags

To limit seeding based on the share ratio, aria2 provides two primary configuration options. The share ratio is calculated as the total uploaded bytes divided by the total downloaded bytes.

Configuring via the Command Line

If you are running aria2 on an ad-hoc basis from the terminal, you can append the seed ratio flag directly to your download command.

aria2c --seed-ratio=1.0 "https://example.com/file.torrent"

In this example, aria2 will download the torrent and continue seeding until the upload-to-download ratio reaches 1.0 (100%), at which point the process will cleanly exit. If you want to completely disable seeding immediately after the download completes, you can set the ratio to 0.0.

Configuring via the aria2.conf File

For persistent settings—especially if you run aria2 as a background daemon or RPC server—it is highly recommended to add these parameters to your global configuration file (aria2.conf).

To apply this globally, open your aria2.conf file and add the following line:

seed-ratio=1.5

With this setting active, every torrent processed by aria2 will target a 150% upload ratio before halting.

Combining Ratio and Time Limits

You can combine both ratio and time constraints for tighter control over your network resources. When both options are defined, aria2 will stop seeding as soon as either condition is met.

seed-ratio=2.0
seed-time=120

Under this configuration, seeding will stop after 2 hours (120 minutes), even if the 2.0 share ratio has not yet been achieved. Conversely, if your upload speed is fast enough to hit a 2.0 ratio in 30 minutes, the torrent will stop seeding immediately.