top of page
Search
Writer's picturechourmovs vs

Mldonkey, free, light and powerful for your P2P sessions on headless machines

Updated: May 18, 2023

For a headless Linux user, it is recommended to use Docker to install and run mldonkey

Introduction

As you probably already know, mldonkey is a multi-protocol peer-to-peer file sharing software available on Linux. It can be used in graphical mode or in headless mode, i.e. without a graphical interface but via a web browser.

This is the case of other software like amule, tansmission, deluge and others but mldonkey is lighter, more stable and more powerful according to me than these competitors In 2023, Mldonkey, although little or not maintained by its community, still offers a solution suitable for low-powered machines. It allows especially for a NAS or an equivalent headless machine to access in a single web application to the edonkey network (ED2K = emule) and bittorrent.

For a Linux "headless" user, it is recommended to use Docker to install and run mldonkey, it allows to be free of OS environment constraints (dependencies, initial configuration) and to facilitate maintenance.


Installation / prerequisites

In this example I will use the new docker repository I've just created to get latest version 3.1.7-2 based on arch which works very well for me https://hub.docker.com/r/chourmovs/mldonkey_arch For security reasons I will connect this docker to the Gluetun vpn, taking care to make the ports necessary for the application available. In my example, the VPN service is Private internet access with the port forwardingenabled, this is important so that "Peers" can see my machine via TCP or UDP ports (see below) Everything is installed on my NAS terramaster F221 in version 5.1 with Docker and Portainer applications installed I use Portainer to store my docker compose in a stack and run it, this is the most user friendly solution for me Here is the stack in question


version: "3.5"

networks:
  media_network:
    name: media_network
    driver: bridge
    ipam:
      driver: default
      config:
      - subnet: 172.28.10.0/24

services:
  gluetun:
    image: qmcgaw/gluetun:latest
    container_name: Gluetun
    restart: always
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    ports:
      - 8888:8888/tcp    # HTTP proxy
      - 8388:8388/tcp    # Shadowsocks
      - 8388:8388/udp    # Shadowsocks
      - 4000:4000/tcp
      - 4001:4001
      - 4080:4080
      - 20562:20562
      - 20566:20566/udp
      - 16965:16965
      - 6209:6209
      - 6881:6881
      - 6882:6882
      - 3617:3617/udp
      - 4444:4444
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris
      - VPN_SERVICE_PROVIDER=private internet access
      - OPENVPN_USER=login
      - OPENVPN_PASSWORD=password
      - SERVER_REGIONS=Netherlands
      - FIREWALL_OUTBOUND_SUBNETS=192.168.1.0/24
      - HTTPPROXY=on
      - SHADOWSOCKS=on
      # Wireguard:
      # - WIREGUARD_PRIVATE_KEY=${WIREGUARD_KEY}
      # - WIREGUARD_ADDRESSES=${WIREGUARD_ADDRESSES}
      - PRIVATE_INTERNET_ACCESS_VPN_PORT_FORWARDING=on
    networks:
      - media_network
    volumes:
      - ./Volume1/public/gluetun/gluetun/data:/gluetun:rw
     
  mldonkey:
    image: chourmovs/mldonkey_arch:main
    restart: unless-stopped
    depends_on:
      - "gluetun"
    environment:
    - PUID=1000 # Your Docker user here
    - PGID=1000 # Your Docker Group here
    - TZ=Europe/Paris # Your Time Zone Here
    
#   - ${NET_NAME}
    network_mode: "service:gluetun"
    
    volumes:
    - /Volume1/public/mldonkey/conf:/var/lib/mldonkey
    - /Volume1/public/mldonkey/tmp:/mnt/mldonkey_tmp
    - /Volume1/public/mldonkey/incoming:/mnt/mldonkey_completed
    - /Volume1/public/:/data # Optionnel, un dossier supplémentaire dont je souhaite un accès pour mldonkey
    
volumes: 
  gluetun:

In bold the parts to edit to match your configuration

Screenshots




Configure port forwarding in mldonkey

If gluetun configuration is a bit specific for Private internet access which only allows one port in port forward not manageable on their site, configuring port forwarding will still be necessary (via gluetun or your VPN provider's site) to ensure your visibility by other "Peers" across the VPN.

With private internet access we have a random port forwarding at each launch of the container and which is otherwise updated every 60 days or so,so the manipulation will be to be redone from time to time.


Find the port reserved by PIA in the log of your gluetun container (the first button under quick action)





here it's 45333 then configure this port in mldonkey


NB : mldonkey is the aggregation of several applications into one and linux only accepts one application per port. Since TCP and UDP ports do more or less the same thing, in order not to create a conflict and crash the application, I will configure Mldonkey to use the gluetun tcp port on the ED2K protocol and the gluetun UDP port for Bittorent's DHT protocol (see following screenshots)




Thus mldonkey will work without hindrance on the two main sharing protocols, of course with another (more expensive) VPN that allows to configure multiple port forwarding this limit would not be anymore...


and the result



I am connected with high ID on my 3 favorite servers




130 views0 comments

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page