SurferCloud Blog SurferCloud Blog
  • HOME
  • NEWS
    • Latest Events
    • Product Updates
    • Service announcement
  • TUTORIAL
  • COMPARISONS
  • INDUSTRY INFORMATION
  • Telegram Group
SurferCloud Blog SurferCloud Blog
SurferCloud Blog SurferCloud Blog
  • HOME
  • NEWS
    • Latest Events
    • Product Updates
    • Service announcement
  • TUTORIAL
  • COMPARISONS
  • INDUSTRY INFORMATION
  • Telegram Group
  • banner shape
  • banner shape
  • banner shape
  • banner shape
  • plus icon
  • plus icon

Installing Aria2 and AriaNg on Linux for Web-Based Download Management

January 6, 2025
5 minutes
INDUSTRY INFORMATION,TUTORIAL
1017 Views

Aria2 is a lightweight and highly versatile download utility that supports multiple protocols, including HTTP, HTTPS, FTP, SFTP, and BitTorrent. By integrating it with AriaNg, a modern web-based interface, you can easily manage downloads from a browser. This guide provides a comprehensive walkthrough for installing and configuring Aria2 and AriaNg on a Linux system.


Part 1: Installing Aria2

Aria2 can be installed quickly using a community-provided script. Follow the steps below:

1. Download the Installation Script

To simplify the installation process, download the automated script:

wget -N git.io/aria2.sh && chmod +x aria2.sh

2. Run the Installation Script

Execute the script to install Aria2:

./aria2.sh

The script will automatically configure Aria2, including setting up a download directory, configuration file, and an RPC key.

3. Managing Aria2 Service

Once installed, you can manage the Aria2 service using the following commands:

  • Start the service: /etc/init.d/aria2 start or service aria2 start
  • Stop the service: /etc/init.d/aria2 stop or service aria2 stop
  • Restart the service: /etc/init.d/aria2 restart or service aria2 restart
  • Check the service status: /etc/init.d/aria2 status or service aria2 status

4. Key Configuration Details

After installation, note the following important configurations:

  • Configuration file location: /root/.aria2c/aria2.conf This file contains settings for Aria2, including optional parameters. If your system locale doesn’t support Chinese, some comments in the file might display incorrectly.
  • Default download directory: /root/downloads You can change this directory in the aria2.conf file.
  • RPC key: The script generates a random RPC key during installation. This key ensures that only authorized clients can access Aria2. The key is stored in the aria2.conf file.

Part 2: Installing and Configuring AriaNg

AriaNg is a web-based frontend for Aria2, providing an intuitive interface for managing downloads. Below are the steps to set it up:

1. Download AriaNg

To download and set up AriaNg, follow these steps:

  1. Create a directory for AriaNg: mkdir -p /var/www/ariang cd /var/www/ariang
  2. Download the latest AriaNg release (e.g., version 1.3.8): wget https://github.com/mayswind/AriaNg/releases/download/1.3.8/AriaNg-1.3.8.zip
  3. Extract the archive: unzip AriaNg-1.3.8.zip After extraction, all files will be located in /var/www/ariang.

2. Configure a Web Server

You can use a web server like Nginx or Apache to serve AriaNg. Here’s how to set it up with Nginx:

  1. Install Nginx (if not already installed): sudo apt update sudo apt install nginx -y
  2. Configure a virtual host for AriaNg: Open a configuration file (e.g., /etc/nginx/sites-available/ariang) and edit it: sudo nano /etc/nginx/sites-available/ariang Add the following: server { listen 80; server_name your_domain_or_ip; root /var/www/ariang; index index.html; location / { try_files $uri $uri/ =404; } }
  3. Enable the site and restart Nginx: sudo ln -s /etc/nginx/sites-available/ariang /etc/nginx/sites-enabled/ sudo systemctl restart nginx Now, you can access AriaNg through your browser by visiting http://your_domain_or_ip.

3. Configure RPC

To connect AriaNg with Aria2:

  1. Open AriaNg in your browser (e.g., http://your_domain_or_ip).
  2. Click the settings icon in the upper right corner and select “RPC.”
  3. Enter the following details:
    • Aria2 RPC Address: Use the Aria2 service address, such as http://127.0.0.1:6800/jsonrpc.
    • RPC Key: Provide the RPC key from the Aria2 configuration.
    • Test Connection: Click the test button to ensure a successful connection.

Once configured, you can manage downloads via the AriaNg interface.


Common Issues and Solutions

Q1: How can I edit the Aria2 configuration file?

A1: Use a text editor to modify the configuration file located at /root/.aria2c/aria2.conf. For example:

nano /root/.aria2c/aria2.conf

After editing, restart the Aria2 service to apply changes.


Q2: How do I limit download speeds?

A2: Add the following settings to aria2.conf:

# Global maximum download speed (bytes per second)
max-overall-download-limit=1M
# Per-task download speed limit
max-download-limit=512K

Restart the service for the changes to take effect.


Q3: AriaNg cannot connect to Aria2. What should I do?

A3: Check the following:

  • Ensure the Aria2 service is running and listening on the correct port (default is 6800).
  • Verify the RPC key in the AriaNg configuration matches the one in aria2.conf.
  • Check your firewall settings to ensure the port is open.

Q4: How can I add additional BitTorrent trackers to improve speed?

A4: Update the bt-tracker parameter in aria2.conf:

bt-tracker=tracker1,tracker2,tracker3

Search online for updated tracker lists to include the latest options.


Q5: The AriaNg interface shows garbled text. How can I fix this?

A5: Ensure your browser and server are configured to use UTF-8 encoding. If the issue persists, verify that the AriaNg files were downloaded and extracted correctly.


Conclusion and Recommendation

By following this guide, you’ve successfully installed and configured Aria2 and AriaNg for efficient web-based download management. This combination offers a powerful and user-friendly solution for handling downloads on Linux.

For a more advanced and feature-rich cloud-based download management solution, we recommend SurferCloud. It provides high-speed servers, cloud storage, and enhanced tools for managing your downloads seamlessly.

Tags : Aria2 configuration Aria2 installation guide Aria2 RPC setup AriaNg setup AriaNg web interface install Aria2 on Linux Linux download manager Linux file download automation Nginx AriaNg configuration SurferCloud alternative web-based download management

Related Post

3 minutes TUTORIAL

How to Change or Add Language in Windows Serv

Learn how to easily change or add languages on Windows ...

6 minutes COMPARISONS

UEFI vs BIOS: Understanding the Key Differenc

When it comes to booting up your computer, you may have...

5 minutes INDUSTRY INFORMATION

Choosing the Best Linux Distribution for Your

Linux offers a wide variety of distributions (distros),...

Affordable CDN

ucdn

2025 Special Offers:

annual vps

Light Server promotion:

ulhost-promo

Cloud Server promotion:

cloud server

Copyright © 2024 SurferCloud All Rights Reserved.  Sitemap.