Skip to content

Instantly share code, notes, and snippets.

Last active Jan 15, 2022
What would you like to do?
Best aria2 Config
### Basic ###
# The directory to store the downloaded file.
# Downloads the URIs listed in FILE.
# Save error/unfinished downloads to FILE on exit.
# Save error/unfinished downloads to a file specified by --save-session option every SEC seconds. If 0 is given, file will be saved only when aria2 exits. Default: 0
# Set the maximum number of parallel downloads for every queue item. See also the --split option. Default: 5
# Continue downloading a partially downloaded file.
# Set max overall download speed in bytes/sec. 0 means unrestricted. Default: 0
# Set max download speed per each download in bytes/sec. 0 means unrestricted. Default: 0
# Make aria2 quiet (no console output). Default: false
### Advanced ###
# Restart download from scratch if the corresponding control file doesn't exist. Default: false
# If false is given, aria2 aborts download when a piece length is different from one in a control file. If true is given, you can proceed but some download progress will be lost. Default: false
# Always resume download. If true is given, aria2 always tries to resume download and if resume is not possible, aborts download. If false is given, when all given URIs do not support resume or aria2 encounters N URIs which does not support resume, aria2 downloads file from scratch. Default: true
# Enable asynchronous DNS. Default: true
# Rename file name if the same file already exists. This option works only in HTTP(S)/FTP download. Default: true
# Handle quoted string in Content-Disposition header as UTF-8 instead of ISO-8859-1, for example, the filename parameter, but not the extended version filename. Default: false
# Enable disk cache. If SIZE is 0, the disk cache is disabled. This feature caches the downloaded data in memory, which grows to at most SIZE bytes. SIZE can include K or M. Default: 16M
# Specify file allocation method. none doesn't pre-allocate file space. prealloc pre-allocates file space before download begins. This may take some time depending on the size of the file. If you are using newer file systems such as ext4 (with extents support), btrfs, xfs or NTFS(MinGW build only), falloc is your best choice. It allocates large(few GiB) files almost instantly. Don't use falloc with legacy file systems such as ext3 and FAT32 because it takes almost same time as prealloc and it blocks aria2 entirely until allocation finishes. falloc may not be available if your system doesn't have posix_fallocate(3) function. trunc uses ftruncate(2) system call or platform-specific counterpart to truncate a file to a specified length. Possible Values: none, prealloc, trunc, falloc. Default: prealloc
# No file allocation is made for files whose size is smaller than SIZE. Default: 5M
# Set log level to output to console. LEVEL is either debug, info, notice, warn or error. Default: notice
# console-log-level=notice
# Set log level to output. LEVEL is either debug, info, notice, warn or error. Default: debug
# log-level=debug
# The file name of the log file. If - is specified, log is written to stdout. If empty string("") is specified, or this option is omitted, no log is written to disk at all.
# log=
### RPC ###
# Enable JSON-RPC/XML-RPC server. Default: false
# Pause download after added. This option is effective only when --enable-rpc=true is given. Default: false
# pause=false
# Save the uploaded torrent or metalink meta data in the directory specified by --dir option. If false is given to this option, the downloads added will not be saved by --save-session option. Default: true
# rpc-save-upload-metadata=true
# Add Access-Control-Allow-Origin header field with value * to the RPC response. Default: false
# Listen incoming JSON-RPC/XML-RPC requests on all network interfaces. If false is given, listen only on local loopback interface. Default: false
# Specify a port number for JSON-RPC/XML-RPC server to listen to. Possible Values: 1024 -65535 Default: 6800
# rpc-listen-port=50100
# Set RPC secret authorization token.
# rpc-secret=
# Use the certificate in FILE for RPC server. The certificate must be either in PKCS12 (.p12, .pfx) or in PEM format. When using PEM, you have to specify the private key via --rpc-private-key as well. Use --rpc-secure option to enable encryption.
# rpc-certificate=
# Use the private key in FILE for RPC server. The private key must be decrypted and in PEM format. Use --rpc-secure option to enable encryption.
# rpc-private-key=
# RPC transport will be encrypted by SSL/TLS. The RPC clients must use https scheme to access the server. For WebSocket client, use wss scheme. Use --rpc-certificate and --rpc-private-key options to specify the server certificate and private key.
# rpc-secure=false
# The maximum number of connections to one server for each download. Default: 1
# aria2 does not split less than 2*SIZE byte range. Possible Values: 1M -1024M. Default: 20M
# Download a file using N connections. The number of connections to the same host is restricted by the --max-connection-per-server option. Default: 5
# Set user agent for HTTP(S) downloads. Default: aria2/$VERSION, $VERSION is replaced by package version.
### BitTorrent ###
# Save meta data as ".torrent" file. Default: false
# bt-save-metadata=false
# Set TCP port number for BitTorrent downloads. Multiple ports can be specified by using ',' and '-'. Default: 6881-6999
# Set max overall upload speed in bytes/sec. 0 means unrestricted. Default: 0
# max-overall-upload-limit=256K
# Set max upload speed per each torrent in bytes/sec. 0 means unrestricted. Default: 0
# max-upload-limit=0
# Specify share ratio. Seed completed torrents until share ratio reaches RATIO. Specify 0.0 if you intend to do seeding regardless of share ratio. Default: 1.0
# Specify seeding time in (fractional) minutes. Specifying --seed-time=0 disables seeding after download completed.
# Enable Local Peer Discovery. If a private flag is set in a torrent, aria2 doesn't use this feature for that download even if true is given. Default: false
# bt-enable-lpd=false
# Enable IPv4 DHT functionality. It also enables UDP tracker support. If a private flag is set in a torrent, aria2 doesn't use DHT for that download even if true is given. Default: true
# Enable IPv6 DHT functionality. If a private flag is set in a torrent, aria2 doesn't use DHT for that download even if true is given.
# Set UDP listening port used by DHT(IPv4, IPv6) and UDP tracker. Default: 6881-6999
# Set host and port as an entry point to IPv4 DHT network.
# Set host and port as an entry point to IPv6 DHT network.
# Change the IPv4 DHT routing table file to PATH. Default: $HOME/.aria2/dht.dat if present, otherwise $XDG_CACHE_HOME/aria2/dht.dat.
# Change the IPv6 DHT routing table file to PATH. Default: $HOME/.aria2/dht6.dat if present, otherwise $XDG_CACHE_HOME/aria2/dht6.dat.
# Enable Peer Exchange extension. If a private flag is set in a torrent, this feature is disabled for that download even if true is given. Default: true
# Specify the prefix of peer ID. Default: A2-$MAJOR-$MINOR-$PATCH-. For instance, aria2 version 1.18.8 has prefix ID A2-1-18-8-.
# Specify the string used during the bitorrent extended handshake for the peer’s client version. Default: aria2/$MAJOR.$MINOR.$PATCH, $MAJOR, $MINOR and $PATCH are replaced by major, minor and patch version number respectively. For instance, aria2 version 1.18.8 has peer agent aria2/1.18.8.
# Comma separated list of additional BitTorrent tracker's announce URI. Reference:
# bt-tracker=udp://,udp://,udp://,udp://,udp://,udp://,udp://,udp://,,,udp://,udp://,udp://,udp://,udp://,udp://,,,udp://,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment