How to Enable or Disable IPv6 DHT in aria2?

Managing the Distributed Hash Table (DHT) for IPv6 networks in aria2 allows you to control how the download utility finds peers on modern network protocols. By default, aria2 enables DHT for IPv4, but IPv6 DHT must be configured explicitly depending on your network capabilities and privacy preferences. This guide provides the exact configuration parameters, command-line arguments, and best practices needed to successfully toggle this feature on or off.


Understanding IPv6 DHT in aria2

DHT allows bitTorrent clients to find peers without relying on a centralized tracker. While aria2 handles IPv4 DHT automatically, IPv6 DHT operates on a separate configuration flag. Enabling it can vastly improve download speeds and peer availability on IPv6-native connections, while disabling it can reduce background network overhead and conserve bandwidth.


Method 1: Using Command-Line Arguments

If you run aria2 via the terminal on a case-by-case basis, you can pass the configuration flag directly into your execution command.

aria2c --bt-enable-ipv6-dht=true "your_torrent_link_or_magnet"
aria2c --bt-enable-ipv6-dht=false "your_torrent_link_or_magnet"

Method 2: Editing the Configuration File

For a permanent solution, you can add the setting to your global aria2 configuration file (typically named aria2.conf). This ensures the setting persists every time you launch the application.

  1. Open your aria2.conf file in a text editor.
  2. Add or modify the following line:
Desired Action Configuration Line to Add
Enable IPv6 DHT bt-enable-ipv6-dht=true
Disable IPv6 DHT bt-enable-ipv6-dht=false
  1. Save the file and restart your aria2 session or daemon.

Important Prerequisites

For IPv6 DHT to function correctly when enabled, ensure that your broader network settings in aria2 are compatible.

Note: IPv6 DHT requires global IPv6 support to be active in aria2. Ensure that your configuration does not contain enable-ipv6=false, as disabling global IPv6 will override and deactivate the IPv6 DHT function entirely regardless of your BT settings.