documentation:aria2c
Differences
This shows you the differences between two versions of the page.
| documentation:aria2c [2020/02/01 12:35] – external edit 127.0.0.1 | documentation:aria2c [2020/02/02 14:02] (current) – removed lucid | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ======Install and configure aria2c with aria-ng and SSL on Ubuntu 16.04.5====== | ||
| - | |||
| - | Aria2 is an extremely powerful command line download manager capable of handing a wide range of protocolls including torrents. | ||
| - | Aria-ng is a webui for aria2c, which is hooked into via RPC on port 6800. | ||
| - | |||
| - | This guide will cover everything including a simple nginx install and configuration with SSL, installing aria2c and making some simple adjustments as well as creating a systemd service for aria2c. | ||
| - | |||
| - | =====Nginx and SSL===== | ||
| - | |||
| - | Firstly we need to install nginx and a firewall. | ||
| - | |||
| - | < | ||
| - | |||
| - | ===== Let's Encrypt ===== | ||
| - | |||
| - | For SSL use the EFF's PPA for the Let's Encrypt certbot. | ||
| - | |||
| - | < | ||
| - | # apt update; sudo apt upgrade | ||
| - | # apt install python-certbot-nginx | ||
| - | # certbot --nginx certonly</ | ||
| - | |||
| - | Cert and Key locations: | ||
| - | |||
| - | ''/ | ||
| - | |||
| - | ''/ | ||
| - | |||
| - | =====Aria2====== | ||
| - | |||
| - | Download and install the latest aria2 release for the repos | ||
| - | |||
| - | < | ||
| - | We need to verify that we have a version that is >= v1.19 in order for core features of aria-ng to function: | ||
| - | < | ||
| - | |||
| - | Now we download and extract the aria-ng webui, which is a simple process, as it it only consists of HTML5 and JavaScript. | ||
| - | < | ||
| - | # mkdir aria-ng & cd aria-ng | ||
| - | # wget https:// | ||
| - | # unzip aria-ng-0.4.0.zip & rm aria-ng-0.4.0.zip | ||
| - | </ | ||
| - | |||
| - | We will be running aria2c as root, so its configuration file will need to be created under ''/ | ||
| - | |||
| - | First create the directory: | ||
| - | < | ||
| - | $ sudo su | ||
| - | # mkdir / | ||
| - | </ | ||
| - | |||
| - | Then write the following configuration file: | ||
| - | |||
| - | Create ''/ | ||
| - | |||
| - | < | ||
| - | continue | ||
| - | daemon=true | ||
| - | dir=/ | ||
| - | file-allocation=falloc | ||
| - | log-level=warn | ||
| - | max-connection-per-server=4 | ||
| - | max-concurrent-downloads=3 | ||
| - | max-overall-download-limit=0 | ||
| - | min-split-size=5M | ||
| - | enable-http-pipelining=true | ||
| - | |||
| - | enable-rpc=true | ||
| - | rpc-allow-origin-all=true | ||
| - | rpc-listen-all=true | ||
| - | |||
| - | rpc-secret=YOUR_PASSWORD | ||
| - | |||
| - | rpc-certificate=/ | ||
| - | rpc-private-key=/ | ||
| - | rpc-secure=true | ||
| - | </ | ||
| - | |||
| - | It is vital that you replace '' | ||
| - | |||
| - | The download location is set by the '' | ||
| - | |||
| - | Make sure to set a secret token, or password, in the '' | ||
| - | |||
| - | You can test your aria2 config by setting the '' | ||
| - | < | ||
| - | $ sudo / | ||
| - | </ | ||
| - | This will give you any output to monitor for errors before continuing. | ||
| - | |||
| - | ====Systemd==== | ||
| - | |||
| - | Now we can create a systemd service. | ||
| - | First create the .service file: | ||
| - | |||
| - | Create ''/ | ||
| - | |||
| - | < | ||
| - | [Unit] | ||
| - | | ||
| - | | ||
| - | | ||
| - | |||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | |||
| - | | ||
| - | | ||
| - | </ | ||
| - | |||
| - | Now reload the systemd configuration files: | ||
| - | |||
| - | < | ||
| - | # systemctl daemon-reload | ||
| - | </ | ||
| - | |||
| - | Start (and optionally enable at boot) the aria2 systemd service: | ||
| - | < | ||
| - | # systemctl enable aria2 </ | ||
| - | |||
| - | ===== UFW ===== | ||
| - | You will need to restart to start ufw and enable the rules. | ||
| - | < | ||
| - | # ufw allow " | ||
| - | We will also need to allow port 6800 for the aria2c RPC connection: | ||
| - | < | ||
| - | # ufw enable | ||
| - | # reboot</ | ||
| - | |||
| - | At this point the server should be | ||
| - | =====Use in conjunction with an SFTP jail===== | ||
| - | There are various reasons why one may want to set-up a file share for accessing the downloaded files from aria2, preferably securely and without overhead, and a jailed SFTP server comes in handy for this. This will create a separate user, with which one can connect to the Download directory, and only that directory, through a secure SSH connection. | ||
| - | |||
| - | A guide on how to set this up can be found here: [[documentation: | ||
| - | |||
| - | Simply make sure that the '' | ||
| - | |||
| - | =====Known Issues and Workarounds===== | ||
| - | |||
| - | As of Firefox version 61, you may run into a few graphical glitches and will experience large troubles when attempting to use a self-signed cert with it.\\ | ||
| - | |||
| - | {{: | ||
| - | |||
| - | A self-signed cert will result in Firefox not allowing a connection over SSL at all with aria-ng. There are a few complicated workarounds for this. | ||
documentation/aria2c.1580560512.txt.gz · Last modified: 2021/06/18 16:36 (external edit)