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, "");
  ("server.met", 0, "");
  ("guarding.p2p", 96, "");
  (hublist, 0, "");
  ("nodes.gzip", 0, "");]
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/
- connect to mldonkey through telnet: $ telnet localhost 4000
- type compute_torrent shared/

That's it, you can now download the file with the link

See the documentation at and

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

Tagged as: