For Ubuntu users, the
aria2 package can be directly installed via
apt install aria2. However, the version available for Ubuntu 18.04 LTS is only 1.33.1-1, which was released in 2018, instead of the latest 1.35 release currently available. If you’re using certain GUI clients, such as Aria2App, it would nag you about the outdated backend version each time it launches.
To install the latest version, you can either compile from source or grab the binaries here. Assuming you are using AMD64:
wget http://archive.ubuntu.com/ubuntu/pool/universe/a/aria2/aria2_1.35.0-1build1_amd64.deb dpkg -i aria2_1.35.0-1build1_amd64.deb
After which, you can launch
aria2 by calling
/usr/local/bin/aria2c followed by the desired options as described in the aria2c manual.
Running Aria2 as a service
If you use Aria2 through a GUI frontend, like most people do, you’ll probably want
aria2 to run as a system service that is automatically started upon system boot.
To achieve that, first, you will need to create a service file in
[Unit] Description=Aria2c download manager After=network.target [Service] Type=simple ExecStart=/usr/bin/aria2c --console-log-level=warn --enable-rpc --rpc-listen-all --conf-path=/etc/aria2.conf [Install] WantedBy=multi-user.target
A config file is required to pass on basic startup parameters. In the above example, we referenced the config file in /etc/aria2.conf. I use the following config with enforced two-way encryption on all data exchange:
dir=<your path here> disk-cache=512M file-allocation=falloc continue=true min-tls-version=TLSv1.2 max-concurrent-downloads=10 max-connection-per-server=4 max-download-limit=0 max-upload-limit=1M min-split-size=20M input-file=/root/.aria2/aria2.session save-session=/root/.aria2/aria2.session save-session-interval=180 enable-rpc=true rpc-allow-origin-all=false rpc-listen-all=true rpc-listen-port=6800 rpc-secret=<Your secret here> rpc-secure=false follow-torrent=mem enable-dht=true enable-dht6=true bt-force-encryption=true bt-min-crypto-level=arc4 bt-require-crypto=true bt-request-peer-speed-limit=62M seed-ratio=1.0 seed-time=0 bt-hash-check-seed=true bt-seed-unverified=true bt-save-metadata=false
Finally, create an empty aria2.session file, enable the service and start it for the first time:
touch /root/.aria2/aria2.session systemctl enable aria2 systemctl start aria2
Once this is done, make sure you have allowed incoming TCP connections on port
6800 of your VPS (or whichever port you have specified in the
aria2.conf file), and configure your GUI frontend accordingly.
When all is done, you can now add all sorts of download tasks to the server from your mobile devices, browsers, and computers. You can create multiple profiles for your different servers and switch between them in the app, too!