Install download manager with web GUI on OpenWrt: Aria2 Detailed tutorial

Detailed tutorial to install and setup Aria2 Download Manager with Web GUI on OpenWrt along with troubleshooting steps for common issues.

I have been playing around with OpenWrt, as I recently installed OpenWrt on an Amplifi HD Router. I was amazed by the opportunities this OS opens up, especially for routers. I was able to setup a Samba server on OpenWrt with a USB drive. But, it turned out to be too much of a hassle to be using wget to download files to the router’s USB drive every time. That’s when I set out to find a good download manager with web GUI for OpenWrt. And, I learned about the download manager, Aria2 for OpenWrt.

In this detailed tutorial, I will explain the steps to install & setup Aria 2 download manager on OpenWrt. I did find some tutorials for the setup here and there, but nothing that completely covers every step at a single place (probably, I didn’t search enough). Anyways, this article will not only cover the installation and setup part, but also some troubleshooting steps if you struggle during the setup.

So, let’s jump into the tutorial.

Requirements

  • Device running OpenWrt
  • Web GUI access to OpenWrt
  • Samba setup with USB drive (or otherwise) – Read this tutorial.

Install & setup Aria2 Download Manager on OpenWrt

Step 1. Install Aria2 & related dependencies

Using Web Admin GUI

  1. Login to OpenWrt Router’s Web Admin GUI using the router’s IP/gateway.
  2. On the Menu, click on System and then, Software.
  3. Click on Update lists… and wait for the command to complete.
  4. Under Download and install package: enter luci-app-aria2 and click on OK. This will also install the package named aria2, which can be confirmed by searching for aria2 under Filter: and checking under the tab named Installed.
  5. Similarly, download and install these packages: webui-aria2 and libopenssl-legacy.

Using terminal or SSH

On the terminal, signed in as root, type opkg update && opkg install aria2 luci-app-aria2 webui-aria2 libopenssl-legacy and press Enter.

Step 2. Setup Aria2 using Web GUI on OpenWrt

  1. Reload OpenWrt Web GUI page.
  2. On the Menu, click on Services and then, Aria2.
  3. Under Basic options, make sure Enabled is checked. Run daemon as user should say aria2. Provide path for the Download directory. You may leave the other settings untouched. Check the image below for reference:-
    Setup Aria2 Download Manager on OpenWrt: Basic Options
  4. For safe measure, reboot the router and go back to Aria 2 page under Services. Under Aria2 – Running Status, it should say running. If i doesn’t check the troubleshooting steps below.

Step 3. Access Aria2 Download manager for OpenWrt on web browser

You can directly access the Download manager page by going to your router’s web admin IP followed by /webui-aria2, for example, http://192.168.1.1/webui-aria2. Else, go to Aria2 page under Services and click on the button named WEBUI-ARIA2 under Running Status.

Troubleshoot OpenWrt Aria2 Download Manager

Now, you might face some issues during the setup part. The installation is pretty straight forward. So, here’s a list of a few issues and their solution. If you face an issue not mentioned here, just leave a comment below and I will try my best to help.

Oh Snap! Could not connect to the aria2 RPC server

If this is what you see upon checking the Web UI page, follow these steps:-

  1. On OpenWrt Menu, click on Services and then, Aria2.
  2. Click on the tab named Log above and check if you see the following error lines:-
    daemon.err aria2c[9945]: Exception: [Platform.cc:125] errorCode=1 OSSL_PROVIDER_load 'legacy' failed.
    daemon.err aria2c[9945]: Exception caught
    daemon.info aria2c[9945]: jail: exec-ing /usr/bin/aria2c
  3. At this point, install an easy to use text-editor like Nano (optional), if you are uncomfortable with Vi. Alternatively, you can also access the file and edit it if you have OpenWrt File Manager or FTP access. To install Nano though, go to the terminal (SSH/web-based), type opkg update && opkg install nano and press Enter. Assuming you did, type nano /etc/init.d/aria2 and press Enter.
  4. Press Ctrl + F, type procd_add_jail "$NAME.$section" log and press Enter. This will take you to the line.
  5. Under that line, add procd_add_jail_mount "/usr/lib".
  6. When done, press Ctrl + S and then Ctrl + X to save and exit.
  7. Reboot and check Aria2’s Web GUI page. It should say, “Successfully connected to Aria2 through remote RPC…” To confirm you can also check Aria2’s running status on OpenWrt page.

Thanks to smaller09 and orzass for the fix.

Download was unsuccessful

If this is something that you see on downloading and and every file, and you don’t have SSL (HTTPS) on your OpenWrt server, then follow these instructions:-

  1. Go to Aria2’s Settings page (ServicesAria2).
  2. Click on the tab – HTTP/FTP/SFTP Options.
  3. Untick Check certificate.
  4. Click on Save & Apply.

Now, your downloads should be able to start without any issues.

Conclusion

A quick shout-out to this YouTube video for the Indonesian tutorial.

Be the first to comment

Leave a Reply

Your email address will not be published.


*