Forums

Mansoor
Mansoor
Offline
Resolved
0 votes
I like Transmission app but it lacks an important feature for me, which is Magnet Links. So, I searched the web looking for an alternative and found Aria2, which can: automatically download .torrent files from URLs, process Magnet links, and directly download normal files from http or ftp!

Here is a brief tutorial on how to install aria2 and its web gui in addition to a simple file manager to manage the downloaded files.

First instal aria2:
yum install aria2


Then, create a flexshare, for example "dm", with web access, then:
cd /var/www/html/
svn checkout https://github.com/ziahamza/webui-aria2.git/trunk dm


Make the required config and log files:
mkdir /var/aria2/
touch /var/aria2/download.session
mkdir /var/log/aria2
touch /var/log/aria2/aria.log
mkdir /etc/aria2/


Make a directory inside your flexshare to store the downloaded files into
mkdir /var/flexshare/shares/dm/downloads


Edit /etc/aria2/aria2.conf file and paste the following into it:
dir=/var/flexshare/shares/dm/downloads
rpc-secret=some-crazy-secret-token! # <- change this!
daemon=true
enable-rpc=true
rpc-listen-all=true
file-allocation=falloc
continue=true
log=/var/log/aria2/aria.log
log-level=warn
check-certificate=false
max-connection-per-server=8
summary-interval=120
enable-dht=true
rpc-listen-port=6800
max-concurrent-downloads=3
http-auth-challenge=true
input-file=/var/aria2/download.session
save-session=/var/aria2/download.session
save-session-interval=10
disable-ipv6=true
disk-cache=10M
timeout=600
retry-wait=30
max-tries=50
deferred-input=true


Make the service handler for aria2, /etc/init.d/aria2:
#!/bin/sh
#
# aria2 ariac server
#
# chkconfig: 345 70 30
# description: ariac server
# processname: aria2c

Prgmname="/usr/bin/aria2c"
shortname="aria2c"

#one option
options="--conf-path="

# configfile=/full_path/configfile
configfile="/etc/aria2/aria2.conf"

start() {
# Code here to start the program
logger -t ARIA2C "Starting aria2c daemon "
${Prgmname} ${options}${configfile}
sleep 5
return 0
}

stop() {
# Code here to stop the program and check it's dead
if [ -n "`pidof $shortname`" ]; then
logger -t ARIA2C "Shutting down aria2c daemon "
/usr/bin/killall $shortname
sleep 5
fi
return 0
}
##########################start here##########################
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
logger -t ARIA2C "$shortname restart, executed from $(whoami)"
stop
sleep 2
start
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
sleep 1
exit


Start the service and make sure aria2 is running
chmod +x /etc/init.d/aria2
chkconfig --level 345 aria2 on
service aria2 start
ps -aux | grep aria


Download a simple web file manager (make sure you secure properly):
cd /var/flexshare/shares/dm
mkdir downloads && cd downloads
wget https://raw.githubusercontent.com/prasathmani/tinyfilemanager/master/tinyfilemanager.php -O index.php
chown apache:admins index.php


Now, go to your flexshare, http://dm.domain.com, and set the connection secret token (see aria2.conf above) to start using the app. The file manager will be at: dm.domain.com/downloads
Monday, September 11 2017, 05:46 PM
Share this post:
Responses (2)
  • Accepted Answer

    Mansoor
    Mansoor
    Offline
    Monday, September 11 2017, 07:15 PM - #Permalink
    Resolved
    0 votes
    I also use Transmission in my macbook and it can handle magnet links. But the webUI, installed by the app on the server, cannot. This is why I looked for an alternative.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, September 11 2017, 06:38 PM - #Permalink
    Resolved
    1 votes
    I use magnet links with Firefox, the BitTorrent WebUI addon and transmission. I thought magnet links were added a while back. Also the Windows program Transmission Remote-GUI can handle them.
    The reply is currently minimized Show
Your Reply