A client for downloading files via the BitTorrent protocol from a torrent-server.

Michael Smith



6,280 latest version

4.9 quality score

Version information

  • 0.2.0 (latest)
  • 0.1.0
released Apr 6th 2016
This version is compatible with:
  • Debian

Start using this module


msmith/torrent_client — version 0.2.0 Apr 6th 2016

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with torrent_client
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module


A client for downloading files via the BitTorrent protocol from a torrent-server.

Module Description

This module uses libtorrent BitTorrent library written in C++ to download files served from a torrent-server. Using BitTorrent to transfer files can result in faster transfers with less load on the file server.

The module includes two classes:

  • torrent_client to configure the system for downloading files using BitTorrent
  • torrent_file to download individual files


Beginning with torrent_client

Install libtorrent and boost as pre-requisites for building the torrent_client Ruby gem.

On Mac OS X, that can be done via Homebrew

brew install boost libtorrent-rasterbar


class {'::torrent_client':
  provider => 'puppet_gem',

Torrent_File {
  server => 'http://filehost:8000/torrent',
  port   => 5555,

torrent_file {'large file':
  path => '/tmp',




Install client prereqs; currently only torrent_client.

  • provider: select which package provider to use to install Ruby gems. Defaults to puppet_gem.



Downloads a file.

  • file: namevar, name of the file as stored on the server
  • ensure: ensure the file is present/absent
  • path: (required) fully qualified file path for a directory to download the file to
  • server: (required) torrent server name and port
  • port: port to use for the BitTorrent, defaults to 5555