magnify
formats

Download Torrents on a Remote Server

Published on April 15, 2012

Offload Torrents to a Remote Server

I only use my laptop and am frequently traveling, suspending the laptop, or using a MiFi hotspot ($$$ over 5GB) and so don’t want to download torrents, or even run a torrent client, on my primary machine.  Instead I’d prefer to be able to select torrents at anytime from my primary machine, and have a remote server downloads the files.  My remote server is at home with a high-bandwidth fiber connection and is running 24/7.  This way wherever I’m at, I can select torrents from my laptop and they’ll be downloaded fast at home.

There are a few very small helper apps I created for this.  They use the Microsoft .NET 4 runtime, so please install that first if not already on your computer.

Download these supporting apps and source here: TorrentTools.7z

.torrent Files

For .torrent files, the process is relatively simple with Dropbox, uTorrent and just a small tool.

Setup Instructions:

  1. Install Dropbox on both computers to keep a folder in sync.  We’ll call this “dropbox\Torrents\Autoload”.
  2. Install uTorrent on the remote server and set it’s autoload watch folder to the same.
  3. Last step is to get the .torrent file automatically moved into that autoload folder when it’s clicked in the browser.  To do this, on the primary machine when clicking on a .torrent file, the browser will ask what program to open the file with, tell it to always open .torrent files with this little tool: MoveTorrentFile.exe.  First open the MoveTorrentFile.exe.config file in a text editor and set the “TargetDirectory” setting to the folder in #1.

That’s it.  Now when you click a .torrent file link in your browser the remote server will start downloading it.  See it in action (opens an about one minute video as a link)…

2012-04-16_2252

Magnet Links

Many torrent sites use the newer magnet uri scheme instead of .torrent files.  This is a little trickier to offload than just the .torrent files, but another tool or two makes this easy.  In this case we’ll use the same general technique above, but put the magnet links into files that Dropbox will move over and then have an app that opens the link files on the remote server.

Setup Instructions:

  1. Follow steps #1 and #2 from above.
  2. Now when clicking a magnet: link in the browser, we want to capture the link into a file that Dropbox will move across.  That’s what the MagnetLinkToFile.exe tool does.  Edit the MagnetLinkToFile.exe.config file’s TargetDirectory property to point to your autoload directory.  Run it once and it’ll register itself to handle magnet: URI links.  Then you can click a magnet: link in a browser and it will put the link into a .magnet file in the autoload directory.
  3. On the remote server, run OpenMagnetLinkFiles.exe which monitors the target folder for .magenet files created by the above.  Before running, set the WatchDirectory property in its OpenMagnetLinkFiles.exe.config file to the autoload directory.  When it finds a .magnet file, it runs the marnget: link inside the file then deletes the .magnet file.  uTorrent registers a “magnet:” handler when installed, so it’ll then start downloading the torrent.

Misc Tips

  • Always run OpenMagnetLinkFiles.exe
    To get OpenMagnetLinkFiles.exe to always run on my remote server, I put a shortcut to the app in the Startup folder.  Then set the shortcut properties to run it minimized.  Also used autologon to have Windows automatically login on reboot.  You could alternatively use Windows Task Scheduler if you’d prefer not to run it under a user account.
  • Torrent Client on Primary Machine
    If you do want to have a torrent app on the primary machine, but use this technique as the default, then… In step #3 up top, the torrent client will probably have already registered itself to open .torrent files.  So to redirect the app that opens them, find a .torrent file, right-click and choose “Open with…”, select MoveTorrentFile.exe and choose to “always open with this program”.

Conclusion

I’ve been using this technique for awhile now.  I’d be very interested in learning if you’ve tried this or done something similar.  Please leave a comment if so.  thanks

Update (5/18/2012): Wil Wheaton shows another good example of the usefulness of bittorrent for entirely legal purposes

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
3 Comments  comments 

3 Responses

  1. Cool article Noah! In one of my smart home network installations, I came across similar functionality in some modern NAS devices. The Buffalo Terastation Cloud Edition has “smart folders”, where you can drop a .torrent file, and the Terastation will automatically start downloading the torrent for you. It has a really powerful web-based UI control panel, and if you’re a linux junkie, you can geek out and modify this NAS even further. It’s a great option for those who want the functionality of cloud services (like dropbox), with the privacy and control of their own server.

  2. Blake Daniels

    Excellent guide! Been digging around for hours looking for how to fix the problem encountered by magnet URIs and this just about solved it. The only other issue is one of the computers i use frequently is a mac. This mac needs to be able to click a magnet: link and save the URI to a file (like the MagnetLinkToFile.exe handles on windows). Is there any chance of a mac compatible app/instructions on how to manually set the URI handler? Thank you!

    • noahcoad

      Looks like for MacOS you can register a handler (via this post) so it’d be a matter of writing a similar little app that watches for the magnet links and saves them to a file to replace MagnetLinkToFile.exe.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>