Skip to main content

Adding torrents using Remote Torrent Adder

In

This guide is for advanced users only and is not officially supported by USB, as it is frequently updated voluntarily by our staff and it may be broken in some slots. Only proceed if you know what you're doing. If there are any questions on the installation or the execution of the scripts, you may ask on the USB Community server.

As many of you know, Deluge is fast and more aggressive to upload but it starts to become a real nuisance once you load more than 500 torrents. rTorrent, on the other hand, is good at handling large amount of seeding torrents, making it ideal for long term seeding.

This guide will help you automate the process of moving your torrents from Deluge to rTorrent for long-term seeding.


Preparation

  • By default, Deluge downloads to ~/Downloads and rTorrent downloads to ~/files.
  • Please ensure that both Deluge and rTorrent download to the same directory.

Deluge requires an absolute path to your Download to: directory, so you'll have to enter something like /home13/username/Downloads, not ~/Downloads. rTorrent, on the other hand, will accept shortcuts such as ~/Downloads.


Install Dependencies

  • Login to your slot's SSH terminal and execute the following commands

Python 3

wget https://raw.githubusercontent.com/ultraseedbox/UltraSeedbox-Scripts/master/Language%20Installers/python-pip-install.sh
chmod +x python-pip-install.sh
bash python-pip-install.sh

perl

screen -m bash -c "curl -L http://xrl.us/installperlnix | bash"
  • After that run the following commands
exec $SHELL
python -m pip install requests service_identity cryptography perl
perl -MCPAN -e 'install Convert::Bencode'
  • The installer is interactive so respond to the prompts as follows

Would you like to configure as much as possible automatically? [yes] yes

What approach do you want? (Choose 'local::lib', 'sudo' or 'manual')[local::lib]

Would you like me to append that to /homexx/username/.bashrc now? [yes] yes

  • After the installation, load .bashrc by doing the following command
exec $SHELL

Download Scripts

  • For this guide, we'llwe bewill settinginstall upit extensionsin that~/scripts send
      torrent
    • You filesmay fromchoose youranother browserfolder toaccordingly.
    • your
    remote
  • client for downloading torrents without logging into your torrent client's web interface.

    Installing
  • Run the Extensionfollowing:
mkdir -p $HOME/scripts && cd $HOME/scripts
wget https://raw.githubusercontent.com/lethanhviet/autoExport/master/rtorrent_fast_resume.pl
wget https://raw.githubusercontent.com/ultraseedbox/UltraSeedbox-Scripts/master/deluge-rtorrent/autoExport.py

Configuration

  • InstallEdit theautoExport.py extensionin fromyour thesefavorite linkseditor. We'll use nano.
  • The following are optional fields and can be leave as blank

Setting
nano Up

autoExport.py

Remote Torrent Adder

  • OnceFind installed,this rightsection clickof the extensionscript and clickedit Options.accordingly
#######################################################
# Customize
#######################################################
is_interactive = False 								# Set this to True to allow direct output or set to False for cron
discord_url = "" 									# Discord Webhook URL
minseedtime = 24 									# Minimum seeding time (in hours)
src = home_dir + "/scripts/" 						# Where is rtorrent_fast_resume.pl kept?
state_folder = home_dir + "/.config/deluge/state/" 	# Link to deluge's state folder
watch_folder = home_dir + "/watch/" 				# Link to rTorrent's watch folder
deluge_port = 12345 								# Deluge Port. Found under "Remote client access" section in UCP
deluge_user = "username" 							# Deluge Username. Found under "Remote client access" section in UCP
deluge_pass = "p@55w0rd" 							# Deluge Password. Found under "Remote client access" section in UCP

It is critical you ensure your folder paths are properly quoted

For example: watch_folder = "/homeXX/user/watch/"

  • Then,autoExport.sh ais newthe tabscript appearsyou'll actually run. The autoExport.sh script essentially just runs the autoExport.py script, but specifically using the custom version of Python included with Deluge.
  • Save the Remotescript Torrenton Adderscripts setup page. Click Add server to add one. The following connection details are shown below:folder

ruTorrent

wget https://raw.githubusercontent.com/ultraseedbox/UltraSeedbox-Scripts/master/deluge-rtorrent/autoExport.sh
Serverchmod name:+x {anyautoExport.sh
name}
Server
type:

Testing

ruTorrent
    WebUI
  • You can now choose to test out your script by running it manually
$HOME/scripts/autoExport.sh

Be
sure to set Host:is_interactive {username}.{servername}.usbx.me= Port: 443
SSL: Checked
Username: {username}
Password: Password: As configuredTrue in UCPorder underto ruTorrentsee Relativethe Path:output /rutorrentin 
your

terminal window

This


will

Setting throwUp a Server respondedScheduling with an irregular HTTP code when adding a torrent. You can safely ignore this error.

Deluge

Server name: {any name}
Server type: Deluge WebUI

Host: {username}.{servername}.usbx.me
Port: 443
SSL: Checked
Username: {username}
Password: Password: As configured in UCP under Deluge
Relative Path: /deluge

Transmission

Server name: {any name}
Server type: Transmission WebUI

Host: {username}.{servername}.usbx.me/transmission/rpc
Port: 443
SSL: Checked
Username: {username}
Password: Password: As configured in UCP under Transmission

Torrent Control

cron
  • To set Torrentup Controla up,cron click the plugin icon. This will take you to its configuration page.job

crontab -e
  • ToAdd addthe afollowing new server, goentry to Server Configuration
  • Onrun the Currentscript serverevery dropdown,6 selecthours New
      Server
    • Assuming you want to execute the script every 6 hours

    ruTorrent

Server0 name:*/6 {any* name}* Bittorrent* Client: ruTorrent
Server address: https:~//{username}.{servername}.usbx.me/rutorrent
Username: {username}
Password: As configured in UCP under ruTorrent

Click Save after configuringscripts/autoExport.sh

For more information on crontab schedules, visit crontab.guru

Deluge

Server name: {any name}
Bittorrent Client: Deluge
Server address: https://{username}.{servername}.usbx.me/deluge
Password: As configured in UCP under Deluge

Click Save after configuring

Transmission

Server name: {any name}
Bittorrent Client: Transmission
Server address: https://{username}.{servername}.usbx.me/transmission/rpc
Username: {username}
Password: As configured in UCP under Transmission

Click Save after configuring