Running mldonkey-server in headless server and bittorrent mode

by Martin Monperrus
Here is a small howto (for Linux/Debian/Ubuntu) to set up mldonkey to serve large files (to "seed" files on a "seedbox" in the P2P terminology), for instance to seed scientific datasets .

First, install the package mldonkey-server ($ aptitude install mldonkey-server), and set it up to be launched at startup. Then, stop mldonkey ($ service mldonkey-server stop) to configure it by modifying /var/lib/mldonkey/downloads.ini (mldonkey is reflective, all configuration items can be set at runtime, and they are saved when the program is stopped). In particular, you may disable all file sharing protocols but bittorrent:
 enable_overnet = false
 enable_kademlia = false
 enable_servers = false
 enable_bittorrent = true
 enable_donkey = false
 enable_opennap = false
 enable_soulseek = false
 enable_gnutella = false
 enable_gnutella2 = false
 enable_fasttrack = false
 enable_directconnect = false
 enable_fileTP = false
 enable_openft = false
I also recommend to disable the web info download (in particular the guarding.p2p part which blocks some clients*), replace
 web_infos = [
  ("geoip.dat", 0, "http://www.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz");
  ("server.met", 0, "http://www.gruk.org/server.met.gz");
  ("guarding.p2p", 96, "http://www.bluetack.co.uk/config/level1.gz");
  (hublist, 0, "http://dchublist.com/hublist.config.bz2");
  ("nodes.gzip", 0, "http://update.kceasy.com/update/fasttrack/nodes.gzip");]
by web_infos = []

Then, to serve a file:
- restart mldonkey ($ service mldonkey-server start)
- copy it into /var/lib/mldonkey/shared (for instance /var/lib/mldonkey/shared/dataset.zip)
- connect to mldonkey through telnet: $ telnet localhost 4000
- type compute_torrent shared/dataset.zip

That's it, you can now download the file with the link http://server.com:6881/dataset.zip.torrent.

See the documentation at http://mldonkey.sourceforge.net/BitTorrent and http://mldonkey.sourceforge.net/SeedBitTorrents

(*) otherwise you may get an HTTP 404 with the error message "IP %s is blocked, its part of the used IP blocklist "


Tagged as: