Introduction
aria2 is a lightweight, multi-protocol, multi-source download utility that operates from the command line. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent, and Metalink, allowing you to download files from multiple sources simultaneously to maximize bandwidth usage.
What aria2 Does
- Downloads files via HTTP/HTTPS, FTP, SFTP, BitTorrent, and Metalink protocols in a single binary
- Splits downloads into multiple segments and fetches them in parallel for faster transfer speeds
- Resumes interrupted downloads without re-downloading completed portions
- Provides a JSON-RPC and XML-RPC interface for remote control and integration with web UIs
- Supports downloading from multiple URIs for the same resource simultaneously
Architecture Overview
aria2 is written in C++ for performance and low memory footprint. It uses an event-driven architecture with a single-threaded core and asynchronous I/O to manage thousands of concurrent connections efficiently. The download engine handles protocol negotiation, segment management, and disk I/O while exposing an RPC interface for external control.
Self-Hosting & Configuration
- Runs as a daemon with
aria2c --enable-rpc --daemonfor persistent download management - Configuration file at
~/.aria2/aria2.confstores default options like max connections and download directory - Pair with web frontends like AriaNg or webui-aria2 for a graphical download manager experience
- Supports proxy configuration via
--all-proxyor per-protocol proxy settings - Session files allow saving and restoring download progress across restarts
Key Features
- Extremely low memory usage (typically 4-9 MiB) compared to other download managers
- Protocol-agnostic segmented downloading accelerates transfers regardless of source type
- BitTorrent support includes DHT, PEX, encryption, magnet URIs, and selective file downloading
- Metalink support enables automatic mirror selection and integrity verification via checksums
- Built-in JSON-RPC/XML-RPC API makes it easy to build custom automation and UIs on top
Comparison with Similar Tools
- wget — single-connection downloads without segmentation; aria2 adds parallel connections and multi-protocol support
- curl — focused on single transfers and scripting; aria2 handles queuing, segmentation, and BitTorrent natively
- axel — lightweight accelerator but lacks BitTorrent, Metalink, and RPC interface
- transmission-cli — BitTorrent only; aria2 handles HTTP/FTP downloads equally well
FAQ
Q: Can aria2 download from multiple mirrors simultaneously? A: Yes. Pass multiple URIs for the same file and aria2 fetches segments from each source in parallel, maximizing throughput.
Q: How does aria2 compare in memory usage to graphical download managers? A: aria2 typically uses 4-9 MiB of RAM, far less than GUI-based tools like JDownloader or Free Download Manager.
Q: Does aria2 support download speed limiting?
A: Yes. Use --max-download-limit and --max-upload-limit to cap bandwidth per download or globally.
Q: Can I use aria2 as a daemon with a web interface?
A: Yes. Run aria2 with --enable-rpc and connect a frontend like AriaNg for browser-based download management.