{"id":18716173,"url":"https://github.com/carlonluca/docker-mldonkey","last_synced_at":"2025-10-14T01:07:27.262Z","repository":{"id":67318824,"uuid":"294974391","full_name":"carlonluca/docker-mldonkey","owner":"carlonluca","description":"Project to build a docker image containing the mldonkey service.","archived":false,"fork":false,"pushed_at":"2025-09-06T09:06:49.000Z","size":261,"stargazers_count":26,"open_issues_count":2,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-09-06T10:26:11.135Z","etag":null,"topics":["docker","mldonkey"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/carlonluca.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-09-12T15:45:40.000Z","updated_at":"2025-09-06T09:06:53.000Z","dependencies_parsed_at":"2023-11-26T02:27:03.939Z","dependency_job_id":"98937515-5f50-4cfb-9155-72c6e824249f","html_url":"https://github.com/carlonluca/docker-mldonkey","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"purl":"pkg:github/carlonluca/docker-mldonkey","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlonluca%2Fdocker-mldonkey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlonluca%2Fdocker-mldonkey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlonluca%2Fdocker-mldonkey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlonluca%2Fdocker-mldonkey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carlonluca","download_url":"https://codeload.github.com/carlonluca/docker-mldonkey/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlonluca%2Fdocker-mldonkey/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017454,"owners_count":26086081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","mldonkey"],"created_at":"2024-11-07T13:11:47.668Z","updated_at":"2025-10-14T01:07:27.257Z","avatar_url":"https://github.com/carlonluca.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mldonkey docker image\n\nThis repository hosts the Dockerfile for building the mldonkey docker image.\n\nThis image includes:\n\n* mldonkey core from the [official mldonkey repo](https://github.com/ygrek/mldonkey);\n* additional patches from my [mldonkey fork](https://github.com/carlonluca/mldonkey);\n* [mldonkey-next](https://github.com/carlonluca/mldonkey-next), a modern web client for mldonkey written in Angular (see the [official repo](https://github.com/carlonluca/mldonkey-next) for other native clients).\n\n![Screenshot](shot.png)\n\nDesktop             |  Mobile\n:-------------------------:|:-------------------------:\n![desktop](https://github.com/carlonluca/mldonkey-next/blob/master/docs/mldonkey-next_desktop.png?raw=true)  |  ![mobile](https://github.com/carlonluca/mldonkey-next/blob/master/docs/mldonkey-next_mobile.png?raw=true)\n\n## Available versions\n\nVersions tagged just with a software versions are builds of mldonkey from official mldonkey releases. The mldonkey code is currently taken from https://github.com/ygrek/mldonkey.\n\nVersions including a hash are versions built from specific commits. Commits do not refer to the official repo but to my fork https://github.com/carlonluca/mldonkey. If you want to know what the image includes, refer to that repo history and branches (in particular the dev branch). My fork tries to stay in sync with the more official repo above.\n\nCurrently, dev images include the dark theme and all the most recent commits to the official repo + other updates. Refer to https://github.com/carlonluca/mldonkey for more info.\n\n**Refer to https://bugfreeblog.duckdns.org/docker-images-for-the-mldonkey-service for more info about each available image.**\n\n## Owner and permissions\n\nThe mldonkey daemon running inside the container must be able to read and modify\ndata inside the volume. You'll also probably want to properly share data with a\nuser available in your host. The mldonkey daemon always use the **mldonkey** user and\ngroup, but you can setup the environment so that the container assignes the desired\nuid and gid to the mldonkey user and group inside the container. This will allow you\nto see those files with the proper permissions in your host.\n\n### Example\n\nLet's assume your user is named _luca_ and has the uid 1001, and that you want your\ndata to be assigned group _luca_, which has the same gid 1001. In this case you\ncan ask the container to assign the value 1001 to uid and gid _mldonkey_ in the container\nby using the env variables:\n\n```\nMLDONKEY_UID=1001\nMLDONKEY_GID=1001\n```\n\nThis will establish a mapping between user _luca_ in the host to user _mldonkey_ in the\ncontainer, and group _luca_ in the host with group _mldonkey_ in the container.\n\n## Ports\n\n|Network|Type|MLDonkey default|Configuration file|\n|---|---|---|---|\n|http_port|HTTP|4080|downloads.ini|\n|mldonkey-next interface|HTTP|4081|container remap\u003cbr/\u003e(required for mldonkey-next for webserver and websocket)|\n|telnet_port|TCP|4000|downloads.ini|\n|gui_port|TCP|4001|downloads.ini|\n|websocket to core|TCP|4002|**not used anymore** [1]|\n|websocket for log stream|TCP|4003|**not used anymore** [2]|\n|eDonkey2000|TCP|random|donkey.ini|\n|eDonkey2000|UDP|TCP port + 4|donkey.ini|\n|Kad|TCP|random|donkey.ini, Kademlia section|\n|Kad1|UDP|Same as TCP|donkey.ini, Kademlia section|\n|Overnet|TCP|random|donkey.ini, Overnet section|\n|Overnet|UDP|Same as TCP|donkey.ini, Overnet section|\n|BitTorrent Client |TCP|6882|bittorrent.ini|\n|BitTorrent Tracker |TCP|6881|bittorrent.ini|\n|BitTorrent DHT |UDP|random|bittorrent.ini|\n|DirectConnect|TCP|4444|directconnect.ini|\n|DirectConnect|UDP|Same as TCP|directconnect.ini|\n\n* [1]: websocket server is now listening on the webapp port (4081) appening the _/ws_ path\n* [2]: websocket server is now listening on the webapp port (4081) appening the _/logstream_ path. **logstream is returned without authentication**, use the MLDONKEY_NEXT_ENABLE_LOG_STREAM env variable to enable/disable (1 to enable, 0 or unset to disable). By default it is unset.\n\n## Running the Container\n\nThis is an example command to run docker-mldonkey:\n\n```\ndocker create --name=mldonkey \\\n              -v \u003cpath to core files\u003e:/var/lib/mldonkey:rw \\\n              -e MLDONKEY_GID=\u003cgid\u003e \\\n              -e MLDONKEY_UID=\u003cuid\u003e \\\n              -e TZ=\u003ctimezone\u003e \\\n              -e MLDONKEY_ADMIN_PASSWORD=password \\\n              -e MLDONKEY_NEXT_ENABLE_LOG_STREAM=\u003c0 or 1\u003e \\\n              -p 4000:4000 \\\n              -p 4001:4001 \\\n              -p 4002:4002 \\\n              -p 4080:4080 \\\n              -p 4081:4081 \\\n              -p \u003cedonkey_port\u003e:\u003cedonkey_port\u003e \\\n              -p \u003cedonkey_port\u003e:\u003cedonkey_port\u003e/udp \\\n              -p \u003ckad\u003e:\u003ckad\u003e \\\n              -p \u003ckad\u003e:\u003ckad\u003e/udp \\\n              -p \u003covernet\u003e:\u003covernet\u003e \\\n              -p \u003covernet\u003e:\u003covernet\u003e/udp \\\n              -p 6881:6881 \\\n              -p 6882:6882 \\\n              -p 3617:3617/udp \\\n              -p 4444:4444 \\\n              -p 4444:4444/udp \\\n              carlonluca/mldonkey:dev\n```\n\nmldonkey stores data inside `/var/lib/mldonkey`. You may want to mount the data directory to local filesystem. Doing this will persist the data when you re-create the docker container. It is also easier to get downloaded files this way.\n\nNOTE: for the randomly chosen ports, you'll have to run the container first and let the core create his conf files. Then create the container again by remapping the chosen ports.\n\n### Running using Docker Compose\n\nCreate a docker compose file docker-compose.yml (or add to an existing one):\n\n```yaml\nservices:\n    mldonkey:\n        container_name: mldonkey\n        restart: unless-stopped\n        environment:\n            - MLDONKEY_ADMIN_PASSWORD=$ADMIN_PWD\n            - MLDONKEY_UID=\u003cuid\u003e\n            - MLDONKEY_GID=\u003cgid\u003e\n            - TZ=\u003ctimezone\u003e\n        ports:\n            - 4000:4000\n            - 4001:4001\n            - 4002:4002\n            - 4080:4080\n            - 4081:4081\n            - \u003cedonkey_port\u003e:\u003cedonkey_port\u003e\n            - \u003cedonkey_port\u003e:\u003cedonkey_port\u003e/udp\n            - \u003ckad\u003e:\u003ckad\u003e\n            - \u003ckad\u003e:\u003ckad\u003e/udp\n            - \u003covernet\u003e:\u003covernet\u003e\n            - \u003covernet\u003e:\u003covernet\u003e/udp\n            - 6881:6881\n            - 6882:6882\n            - 3617:3617/udp\n            - 4444:4444\n            - 4444:4444/udp\n        volumes:\n            - \u003cpath to core files\u003e:/var/lib/mldonkey\n```\n\nnow run the configuration:\n\n```\ndocker compose up -d\n```\n\n### Running behind a reverse proxy\n\nIt is possible to run mldonkey-next behind a reverse proxy. This is an example an nginx configuration:\n\n```plain\nserver {\n    listen 80;\n    server_name mldonkey.your.domain;\n\n    location / {\n        proxy_pass http://upstream;\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Proto $scheme;\n    }\n\n    location /ws {\n        proxy_pass http://upstream;\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection \"upgrade\";\n        proxy_set_header Host $host;\n    }\n\n    location /logstream {\n        proxy_pass http://upstream;\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection \"upgrade\";\n        proxy_set_header Host $host;\n    }\n}\n```\n\n**NOTE**: mldonkey implementation is not probably safe enough for public exposure, so I suggest to only use this setup in a safe environment. If you really intend to expose the service, you can do so even throught HTTPS:\n\n```plain\nserver {\n    listen 443 ssl;\n    server_name mldonkey.your.domain;\n    ssl_certificate [...];\n    ssl_certificate_key [...];\n\n    [...]\n}\n```\n\n## Notes for Docker for Mac\n\nmldonkey does not like the `temp` directory to reside in Mac filesystem. It is better to mount `/var/lib/mldonkey/temp` inside the Docker VM filesystem.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlonluca%2Fdocker-mldonkey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarlonluca%2Fdocker-mldonkey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlonluca%2Fdocker-mldonkey/lists"}