Menu Close

How to install Cloud Torrent on Ubuntu

Cloud Torrent

Introduction

Cloud Torrent is a self-hosted remote torrent client according to its Github repository. Basically this is a seedbox where you can add a torrent and when the files finished leeching, you can download them to your device via direct link.

Even though the project itself haven’t got any update for more than a year, it is still woking fine on the most part of it.

Install Cloud Torrent

Fetch latest release

Get the latest binary from its Github release page. Download the one which suited your system.

Since I am using a 64-bit system, I’m going to download cloud-torrent_linux_amd64.gz, then extract the file

$ wget https://github.com/jpillora/cloud-torrent/releases/download/0.8.25/cloud-torrent_linux_amd64.gz
$ tar xvf cloud-torrent_linux_amd64.gz

Make Cloud Torrent accessible globally

Make the binary accessible globally moving the file to the system and allow it to execute

$ sudo mv cloud-torrent_linux_amd64 /usr/local/bin/cloud-torrent
$ sudo chmod +x /usr/local/bin/cloud-torrent

Verify installation

Now you can verify the installation by running

$ cloud-torrent

Create a configuration file (optional)

You can edit the settings inside the Web-UI. Or you can edit the configuration file manually before running the program

First, create a directory and create settings.json inside the directory

$ mkdir ~/.config/cloud-torrent
$ nano ~/.config/cloud-torrent/settings.json

Inside settings.json, paste and edit these configurations fit as your need

The configurations are self-explained. Don’t forget to change /home/user/cloud-torrent to the path where you want to store downloaded files

{
  "AutoStart": true,
  "DisableEncryption": false,
  "DownloadDirectory": "/home/user/cloud-torrent",
  "EnableUpload": false,
  "EnableSeeding": false,
  "IncomingPort": 61132,
  "SeedRatio": 0,
  "UploadRate": "Low",
  "DownloadRate": "High",
  "DoneCmd": ""
}

Autostart

We will make Cloud Torrent autostart at every boot.

Create a new systemd unit file

$ sudo nano /etc/systemd/system/cloud-torrent.service

Use configurations below.

Replace YOURUSER with the user you created settings.json on the step above, or with the user you wish to run Cloud Torrent

[Unit]
Description=Cloud Torrent Daemon
After=network.target

[Service]
User=YOURUSER
Group=YOURUSER
Type=simple
ExecStart=/usr/local/bin/cloud-torrent -h 127.0.0.1 -p 8080 -c /home/YOURUSER/.config/cloud-torrent/settings.json
ExecReload=/bin/kill -s HUP $MAINPID

[Install]
WantedBy=multi-user.target

Enable and run Cloud Torrent

$ sudo systemctl daemon-reload
$ sudo systemctl restart cloud-torrent

Cloud Torrent is now available at http://your-server-ip:8080

Reverse proxy

Since we run Cloud Torrent on port other than 80 and 443, it is useful to have reverse proxy to give us much cleaner URL to access the Cloud Torrent.

this is compulsory if you are running the server behind Cloudflare

Install Nginx

In this tutorial, we are going to use Nginx.

Some Nginx basic setup

If you don’t know how to use Nginx, this will help you going through the rest of this tutorial. If you already have a working Nginx running on your server, you can skip this and continue to the next step.

If you haven’t install Nginx, you can easily install it by running. The cd into the directory to start working on the configurations

$ sudo install nginx
$ cd /etc/nginx/

The default configurations are quite bloated with the comments, so we are going to create a new one

$ sudo nano sites-available/cloud-torrent

Nginx configuration

Paste configurations below into the file and save it

server {
    listen 80 default_server;
    listen [::]:80 default_server;

    server_name _;

    location / {
        proxy_pass http://127.0.0.1:8080;
    }

    location /sync{
        proxy_pass http://127.0.0.1:8080;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

Reload your Nginx

$ sudo systemctl reload nginx

Cloud Torrent now is available at http://your-server-ip or http://your-domain

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x