One of my favorite download utilities operated in command line in linux systems is aria2. Aria2 has advanced features with support for multi-chunks, multi-servers and torrents. I have been using it quite often especially for torrent downloading. To install aria2 in the Ubuntu system execute as root:
# apt-get install aria2
Aria2 can be combined with WebUI-Aria2, a web interface to manage your aria2 instance. WebUI-Aria2 is very simple to install and you will be able to add files, magnet links or torrents to download right from your web browser. Assuming that you are still in root and Apache2 server is running execute the following:
Download webui-aria2 using git in the /var/www directory
# cd /var/www
# git clone https://github.com/ziahamza/webui-aria2
If you navigate with your browser to the corresponding url of webui-aria2 folder on your server, you will see the following info message:
This is because you will need to launch aria2 as a background service to listen to incoming connections. In order to avoid anyone else using your aria2 instance, your can generate a random token as follows:
openssl rand -base64 32
Run aria2 as a daemon
After that you need to run aria2 as a daemon.
# aria2c --enable-rpc --rpc-listen-all --daemon
For further configuration and parameterization check also the Aria2 Documentation.
ArianNG inside a Docker container
Another handy Web UI for aria is AriaNG. AriaNg is a modern web frontend making aria2 easier to use, written in AnglularJS, thus it does not need any compilers or runtime environment. You can just put AriaNg in your web server and open it in your browser from any desktop or mobile devices.
With Portainer you can add the following stack to deploy the AriaNG container. Substitute HOST_PORT, HOST_DOWNLOAD_PATH and HOST_CONFIG_PATH variables with some of your choice.
version: "2"
services:
ariang:
image: hurlenko/aria2-ariang
ports:
- HOST_PORT:8080
volumes:
- HOST_DOWNLOAD_PATH:/aria2/data
- HOST_CONFIG_PATH:/aria2/conf
environment:
- PUID=6600
- PGID=6601
- RPC_SECRET=YOUR_SECRET_KEY
- DOMAIN=0.0.0.0:8080
- ARIA2RPCPORT=HOST_PORT
restart: always