[Raspberry Pi] Aria2 Web UI [Updated June 2020]

Hi there, I want to share a very easy way to use your Raspberry Pi as a download web server with the help of Aria2 download tool. According to Aria2 Official Website: “aria2 is a lightweight multi-protocol & multi-source command-line download utility. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink. aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces”. As you can see, this is a very flexible download tool available for Linux, Windows and Android. Well, today I want to show you how to use Aria2 through a Web User Interface.

[Update June 2020] Step #1: Installing Apache2 / Nginx & Aria2

You can install Aria2 on Raspbian / Ubuntu / CentOS / Fedora just search for “aria2” on your OS package manager. I’ve used Raspbian Lite to make this little download server, it will work on the Standalone version and the Berryboot version (but also this will work on any single board computer that runs Debian / Ubuntu / CentOS). Once in Raspbian, do a full upgrade by executing:

sudo apt update; sudo apt upgrade -y; sudo apt dist-upgrade -y; sudo apt autoremove -y

Once the upgrade is completed, reboot your Raspberry Pi by executing:

sudo shutdown -r now

Install Aria2 by executing:

sudo apt install aria2 -y

Now you can install Apache by executing:

sudo apt install apache2 -y

Or you can install Nginx (much faster) by executing:

sudo apt install nginx -y

If you’ve installed Apache, remove the index.html file (to see downloaded files) from apache directory and make a new directory for aria2, you can do that by executing:

sudo rm -f /var/www/html/index.html; sudo mkdir /var/www/html/aria2

If you’ve installed Nginx, you need to enable the autoindex module (to see downloaded files) from apache directory and make a new directory for aria2, you can do that by editing the Nginx config file:

sudo nano /etc/nginx/sites-available/default

Add the “autoindex on;” next to the location config. Example:

location / {
    autoindex on;
}

Lastly, create Aria2’s directory by executing:

sudo mkdir /var/www/html/aria2

Step #2: Download AriaNg

AriaNg is “a modern web frontend making aria2 easier to use. To download the latest version (AllInOne) go to the GitHub Releases Page. You can do that in Raspbian by executing:

wget https://github.com/mayswind/AriaNg/releases/download/1.1.6/AriaNg-1.1.6-AllInOne.zip; sudo unzip AriaNg*.zip -d /var/www/html/aria2

Aria2 will take default settings from a file, let’s create it in case you need it in the future:

sudo mkdir $HOME/.aria2; sudo touch $HOME/.aria2/aria2.conf

It also require to start Aria2 as RPC-server as a background task, to do that you can use “screen” and “crontab“. You can install “screen” by executing:

sudo apt install screen -y

Now I’ll use “screen” to start Aria2 as RPC-server in the background at every reboot, you can do that by executing:

crontab -e

I use nano to add/modify crontab tasks. Add the following command line:

@reboot screen -d -m -S AriaRPC bash -c 'aria2c – enable-rpc – rpc-listen-all – rpc-allow-origin-all=true'

Once that is done, press Ctrl+O to save the task, press enter and press Ctrl+X to exit nano. Reboot your device with:

sudo shutdown -r now

Step #3: Finding Your Local IP Address

You can find what IP is using your Raspberry Pi by executing this command:

sudo ifconfig

You will see something like:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.105  netmask 255.255.255.0  broadcast 255.255.255.255
        inet6 fe80::ba27:ebff:fe21:1233  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:21:12:33  txqueuelen 1000  (Ethernet)
        RX packets 14738  bytes 4049731 (3.8 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 11846  bytes 3295441 (3.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

My Raspberry Pi is using: 192.168.1.105 at my end.

Step #4: Start to Download Files

Once you know your Raspberry Pi local address, type it in your browser plus the aria2 directory, example:

192.168.1.105/aria2

You will see something like:

[Update May 2020] Step #5: Install JDownloader

As you may know, JDownloader is a very popular download manager that have a huge community of developers and fans, now you can install JDownloader on your Raspberry Pi and manage your JDownloader downloads through this website: My JD. Be aware that you need an account there in order to use this service. We’re all set, first let’s install a minimal Java runtime by executing this command line:

sudo apt install openjdk-8-jre-headless -y

Once that’s completed, all you need is to download and install JDownloader, do that by executing this single line:

mkdir /media/jdownloader && cd /media/jdownloader; wget http://installer.jdownloader.org/JDownloader.jar

As for the last step, you need to start JDownloader service through Java, do that by executing this command line:

java -Djava.awt.headless=true -jar /media/jdownloader/JDownloader.jar

Once you execute that command line, JDownloader will start and will update itself, wait for that to complete, after that, reboot your Raspberry Pi. Once again, start JDownload service and now it will ask for your login details (email and password – same as My JD website), once the login is completed, you can now manage your JDownloader downloads through My JD.

Quick suggestion: to start JDownloader service at every boot, you can add this line to crontab:

@reboot java -Djava.awt.headless=true -jar /media/jdownloader/JDownloader.jar

Conclusion

There you go, now you can download as many file as you want, just be sure to have enough space on your SD card or USB drive. Leave a comment if you have any suggestion, doubt or if you want to report an issue. I’ll take a look.

Want to know even more about it? Doubts? Leave a comment.

 2,923 total views,  1 views today


This is a honest review, as you can see there's no ads, affiliate links nor warez content on my blog. All reviews of servers, apps, devices and tools are original content generated by myself. There's not any commercial influence on my blog content from any company nor project developers.

[Raspberry Pi] Aria2 Web UI [Updated June 2020]

Share and Enjoy!

5 2 votes
Article Rating
Subscribe
Notify of
guest
14 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Jimmy
Jimmy
1 year ago

THANK YOU!!!

bill
bill
1 year ago

Really easy ! Thank you!

Victor
Victor
1 year ago

Hey can you include jdownloader? Please

Stephen
Stephen
5 months ago

Hi Alexander, I have install AriaNG, but now I see there is v1.1.6 version that is more recent, v1.1.1 is 1year old. how to update?
and second I have follow guide for jdownloader but when finish on terminal it don’t ask me nothing for insert myjdownloader credential.
Please help.

Stephen
Stephen
5 months ago
Reply to  Alexander G

Hi Alexander, I have tried to repeat all passages, in fact changed number of version and downloaded 1.1.6 but ariang remain always 1.1.1,also after several reboot

Stephen
Stephen
5 months ago
Reply to  Alexander G

ok I have solved in alternative using it on docker, now I have 1.1.6, but there is a same problem like standalone app about after a reboot all setting that I have changed on ariang are lost (example: max connection per file, prealloc, falloc etc.) all return to default.

Instead for jdownload I don’t have any error, I’m on headless mode so I use putty and after I have this, what do after? https://1drv.ms/u/s!Am-E9cNGrpCX9SE6rEAjZwt9m3lt?e=8rnUwe

Tod
Tod
5 months ago

Hey don’t use apache, please use nginx which is more faster…

Moz'
Moz'
2 months ago

Hi Alexader,

Thanks for the tutorial

It seems that the config part is missing.
I followed all the steps, Aria2 Status is still showing “disconnected”
How can we fix this issue ?

PC : aria2 cli is working fine, the gui cant be used since it’s “disconnected”

Scroll to top