Skip to content

Instantly share code, notes, and snippets.

@nikolak
Forked from timothyandrew/README.md
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nikolak/77a386c51cfe1be70f2c to your computer and use it in GitHub Desktop.
Save nikolak/77a386c51cfe1be70f2c to your computer and use it in GitHub Desktop.

Introduction

  • This script lets you set up and use a temporary DigitalOcean droplet to download torrent files.
  • Once downloaded, they can be streamed down to your local machine.
  • This uses transmission-cli for the torrent client, and nginx to serve files.

Setup on Local Machine

  • This assumes that you have a DigitalOcean account and tugboat set up, as well as seedbox-setup.sh present in the current directory.
# Create a droplet on DigitalOcean

$ tugboat create seedbox
$ tugboat wait seedbox
$ tugboat info seedbox
  • Copy the IP address of the droplet, and use it for the following commands:
$ scp seedbox-setup.sh root@my.ip.address.here:/tmp/

Setup on Remote Machine

  • You can SSH in using ssh root@my.ip.address.here
$ sh /tmp/seedbox-setup.sh
  • When the first config file (for transmission) opens in Vim, change the values for these keys:
Key Value
download-dir "/usr/share/nginx/html"
rpc-authentication-required "false"
rpc-whitelist-enabled "false"
  • Type <esc>:wq to quit Vim.
  • The next config file that opens is the nginx config. Inside the http block, add autoindex on;
  • Type <esc>:wq to quit Vim.

Using the seedbox

  • To add/manage torrents, go to http://my.ip.address.here:9091/
  • To view/download files, go to http://my.ip.address.here/

Destroying the seedbox

  • After the download is done, run tugboat destroy seedbox locally.
sudo add-apt-repository -y ppa:transmissionbt/ppa
sudo apt-get -y update
sudo apt-get -y install transmission-cli transmission-common transmission-daemon nginx
sed -i 's/^.*rpc-whitelist-enabled.*/"rpc-whitelist-enabled": false,/' /etc/transmission-daemon/settings.json
sed -i 's/^.*rpc-authentication-required.*/"rpc-authentication-required": false,/' /etc/transmission-daemon/settings.json
sudo nano /etc/transmission-daemon/settings.json
sudo chmod 777 /usr/share/nginx/html
sudo rm /usr/share/nginx/html/index.html
sudo /etc/init.d/transmission-daemon reload
sudo /etc/init.d/nginx restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment