What? 

Setup a ARM server to automatically start downloading torrents from a Dropbox folder using Python, Cron, and Transmission.

Why?

Simple, secure, and resilient setup that since no network configurations, nothing exposed to the web, and no need to deal with changing IP addresses.
I find this setup great for finding torrents when away from home, adding the .torrent file to Dropbox,  coming home, and having the file(s) already downloaded.

Setup

  1. Follow steps 1 & 2 from my previous post here. This will get the server setup.

  2. Download this python script that will be used to fetch the torrent files from Dropbox 

  3. Fill in the missing constant fields at the beginning of  GetAllTorrentsFromDropbox.py using fully resolved paths
    1. APP_KEY and APP_SECRET : values from Dropbox when app is registered
    2. ACCESS_TYPE: should be 'app_folder'
    3. TOKEN_FILE: {abs path to file}/file
    4. TORRENT_FOLDER: {abs path to save .torrent files}

  4. Add the script to crontab in the terminal using   crontab -e and adding the entry at the end of the file
    Example: to have the script run every 10 minutes, one would add
    */10 * * * * python {Path to file}/GetAllTorrentsFromDropbox.py

  5. Install and start the Transmission daemon
    sudo apt-get install transmission-daemon
    transmission-daemon

  6. Configure transmission to automatically add torrents from where new ones are saved. In /var/lib/transmission-daemon/info/settings.json , add/edit "watch-dir":{path to where torrents are saved from step 3} and "watch-dir-enabled":true

  7. Do a hard restart of transmission
    sudo service transmission-daemon stop
    sudo service transmission-daemon start

Note



  • Usually transmission has permission issues regrading watched, incomplete, and download folders not allowing the process access by default. This is nothing that a chmod cannot resolve.
  • Setting transmission to keep incomplete downloads of completed downloads is always a good idea.

  • Links


  • Magnetic Link to Torrent conversion
  • Further transmission-daemon configuration including web interface setup
  • Samba configuration help very useful for accessing the completed download folder from a separate machine (even a windows one)