Note: The example aria2.conf above may incorrectly use the $HOME variable. Some users have reported the curly brace syntax to explicitly create a separate ${HOME} subdirectory in the aria2 working directory. Such a directory may be difficult to traverse as bash will consider it to be the $HOME environment variable. For now, it is recommended to use absolute path names in aria2.conf.

Option details

continue

Continue downloading a partially downloaded file if a corresponding control file exists.

Additional notes

1--file-allocation=falloc

Recommended for newer file systems such as ext4 (with extents support), btrfs or xfs as it allocates large files (GB) almost instantly. Do not use falloc with legacy file systems such as ext3 as prealloc consumes approximately the same amount of time as standard allocation would while locking the aria2 process from proceeding to download.

Tip: See aria2c --help=#all and the aria2 man page for a complete list of configuration options.

Note: If both seed-ratio and seed-time are specified, seeding ends when at least one of the conditions is satisfied.

Example aria2.daemon

This configuration can be used to start Aria2 as a service. It can be used in conjunction with several of the frontends listed below. Note that rpc-user and rpc-pass are deprecated, but most frontends have not been ported to the new authentication yet. Do not forget to change user, password and Download directory.

Frontends

Note: Settings implemented in frontends do not affect aria2's own configuration, and it is uncertain whether the different UIs reuse aria2 configuration if a custom one has been made. Users should ensure their desired parameters are effectively implemented within selected tools and that they are stored persistently (uGet for example has its own aria2's command line which sticks across reboots).

Web UIs

Note: These frontends need aria2c to be started with --enable-rpc in order to work. They are meant to run on your local computer, not on a remote server that downloads using aria

Tips and tricks

Download the packages without installing them

Just use the command below:

# pacman -Sp packages | aria2c -i -

pacman -Sp lists the urls of the packages on stdout, instead of downloading them, then | pipes it to the next command. Finally, The -i in aria2c -i - switch to aria2c means that the urls for files to be downloaded should be read from the file specified, but if - is passed, then read the urls from stdin.

pacman XferCommand

Changing the User Agent

Some sites may filter the requests based on your User Agent, since Aria2 is not a well known downloader, it may be good to use a most known downloader or browser as the Aria's User Agent. Just use the -U option like this:

$ aria2c -UWget http://some-url-to-download/file.xyz

You can use whatever you want, like -UMozilla/5.0 and so on.

Using Aria2 with makepkg

You can use Aria2 instead of curl to download source files, just change the DLAGENTS variable as follows:

Note: Use the -UWget option to change the user agent to Wget. It may prevent problems when downloading from sites that filters the requests based on the user agent to provide different responses on what the users uses to access the URL. Since Aria2 is a lesser known downloader it may be recognized by the site as a browser instead of a downloader, so changing the user agent to Wget may fix it in most cases