Set Aria2 Maximum Concurrent HTTP Connections Ubuntu
This article provides a quick solution for Ubuntu users looking to optimize download speeds with aria2. It identifies the specific command-line flag used to define the limit of simultaneous connections per server during a download session.
The option that allows aria2 to set the maximum number of concurrent
HTTP connections is -x or its long form
--max-connection-per-server. By default, aria2 uses a
single connection per server. Increasing this value can significantly
improve download speeds for files hosted on servers that support
multiple connections.
To use this option in the terminal, append the flag followed by the desired number of connections to your aria2c command. For example, to set the limit to 16 concurrent connections, run the following command:
aria2c -x 16 https://example.com/file.zipIt is important to note that this option works in conjunction with
the -s or --split option. While
-x sets the maximum cap per server, -s
determines how many parts the file is split into for downloading. For
optimal performance, ensure the split number is equal to or less than
the maximum connection limit.
To make this setting permanent on your Ubuntu system, you can edit
the aria2 configuration file. Open ~/.aria2/aria2.conf in a
text editor and add the following line:
max-connection-per-server=16Save the file and restart any running aria2 sessions or the daemon for the changes to take effect. This configuration ensures all future downloads utilize the specified number of concurrent connections without requiring manual flag input each time.