Running mlDonkey in Docker

mlDonkey 3.1.6 on Ubuntu 18.04 in a 90MB Docker image

mlDonkey in Docker


Every day it is more difficult to install mlDonkey due to its lack of maintenance and the difficulty to find everything we need in our operating system. One way to continue enjoying this magnificent p2p program is to run it inside a Docker container and on a platform on which it worked well. This keeps it isolated from the operating system installed on your computer, which will keep it running for years to come.

First of all, you need to install Docker on your Windows or Linux.

MLDonkey is an open-source, multi-protocol, peer-to-peer file sharing application that runs as a back-end server application on many platforms. It can be controlled through a user interface provided by one of many separate front-ends, including a Web interface, telnet interface and over a dozen native client programs.

Mods (02/12/2022)

  • Disabled all deprecated protocols (only eDonkey and Kademlia are working).

  • Replaced deprecated update URLs with

  • Increased "client_buffer_size" to 5000000 for bandwidth optimisation.

  • Increased "max_upload_slots" to 10 for easier sharing.

  • Decreased "ED2K-upload_timeout" to 60 to avoid queues full of idle clients.


  1. To get the image:

    docker pull wibol/mldonkey-ubuntu

  2. To create the container:

    docker create --name mldonkey-ubuntu --restart=always
    -p 4000:4000 -p 4001:4001 -p 4080:4080
    -p 20562:20562 -p 20566:20566/udp -p 16965:16965/udp
    -v "($HOME/Downloads/mlDonkey):/var/lib/mldonkey/incoming/files"

    We must remove "( )" and customize its content.

    mlDonkey stores data inside /var/lib/mldonkey/incoming/files container directory, so we mount it on local filesystem for easy access.

  3. To run the container:

    Open 20562/tcp, 20566/udp and 16965/udp ports in your router and OS.

    docker start mldonkey-ubuntu

    Then you can access mlDonkey like http://localhost:4080 or installing "mldonkey-gui" from distro repo or "" repository.

    mlDonkey web user interface

    • User: admin
    • Password: Passw0rd-

    You can change the default password later from the telnet, web or GUI command lines:

    useradd admin (NewPassw0rd-)

    We must remove "( )" and customize its content.

    Host incomming directory is owned by "mldonkey" container user (uid=101, gid=101), so we need to change permissions for full access (Linux):

    sudo chmod -R 777 (~/Downloads/mlDonkey)

    We must remove "( )" and customize its content.

Other optional mounts

You may want to use these other options:

  • -v "(/var/lib/mldonkey):/var/lib/mldonkey"

  • -v "(/tmp/mldonkey):/var/lib/mldonkey/temp"

  • -v "($HOME/Video/mlDonkey):/var/lib/mldonkey/shared"

We must remove "( )" and customize its content.

If these directories aren't mounted, they will all reside on the system's root partition, which is where Docker stores data by default. Be sure you have enough free space on it.

Known problems

When creating the container we received the error:

Error response from daemon: create ($HOME/Downloads/mlDonkey): "($HOME/Downloads/mlDonkey)" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path

To solve it, we must remove "( )" from local mount point.