Project Icon

docker-jdownloader

Docker化JDownloader 2实现简易部署和管理

此Docker镜像简化了JDownloader 2的安装和控制流程,摒弃了繁琐的VNC会话和图形界面。通过MyJDownloader接口,可轻松管理下载任务。镜像支持Docker、Docker Compose和Kubernetes等多种部署方式,并提供自定义下载目录、用户权限设置和直接连接模式等灵活配置选项,大幅提升了使用体验。

[!CAUTION] As-of 2021, this product does not have a free support team anymore. If you want this product to be maintained, please support my work.

[!NOTE] (This product is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addition to maintenance and stability there are many desirable features yet to be added.)

logo

JDownloader 2 - Docker Image

latest release Docker Pulls Docker stars PayPal donation Buy me a coffee Buy me a coffee

Headline

This image allows you to have JDownloader 2 easily installed and controlled via MyJDownloader, thanks to Docker. No cluncky and rusty VNC sessions here! No graphical interface - No problem!

Installation

Here are some examples to get started with the creation of this container. Please note that this package is also hosted on Github Container Registry, just add ghcr.io/ before the image name (docker pull ghcr.io/jaymoulin/jdownloader instead of jaymoulin/jdownloader)

Docker

docker run -d --init --restart=always -v </path/to/downloads>:/opt/JDownloader/Downloads -v </path/to/appdata/config>:/opt/JDownloader/app/cfg --name jdownloader -u $(id -u) -p 3129:3129 -e MYJD_USER=email@email.com -e MYJD_PASSWORD=bar -e MYJD_DEVICE_NAME=goofy jaymoulin/jdownloader

Docker Compose

services:
   jdownloader:
    image: jaymoulin/jdownloader
    container_name: jdownloader
    restart: always
    user: 1001:100
    volumes:
        - </path/to/appdata/config>:/opt/JDownloader/app/cfg
        - </path/to/downloads>:/opt/JDownloader/Downloads
        - </path/to/appdata/logs>:/opt/JDownloader/app/logs #optional
        - </path/to/appdata/extensions>:/opt/JDownloader/app/extensions #optional
        - /etc/localtime:/etc/localtime:ro #optional
    environment: 
            FILE_MYJD_USER: myjd-user #optional (see [Identify](https://github.com/jaymoulin/docker-jdownloader#identify))
            FILE_MYJD_PASSWORD: myjd-password #optional (see [Identify](https://github.com/jaymoulin/docker-jdownloader#identify))
            MYJD_USER: email@email.com #optional (see [Identify](https://github.com/jaymoulin/docker-jdownloader#identify))
            MYJD_PASSWORD: bar #optional (see [Identify](https://github.com/jaymoulin/docker-jdownloader#identify))
            MYJD_DEVICE_NAME: goofy #optional
            XDG_DOWNLOAD_DIR: /opt/JDownloader/Downloads #optional
    ports:
        - 3129:3129 
    secrets:
        - myjd-user #optional (see [Identify](https://github.com/jaymoulin/docker-jdownloader#identify))
        - myjd-password #optional (see [Identify](https://github.com/jaymoulin/docker-jdownloader#identify))

secrets:
  myjd-user: #optional (see [Identify](https://github.com/jaymoulin/docker-jdownloader#identify))
    file: ~/jdownloader/secrets/myjd_user.txt
  myjd-password: #optional (see [Identify](https://github.com/jaymoulin/docker-jdownloader#identify))
    file: ~/jdownloader/secrets/myjd_password.txt

Kubernetes

apiVersion: apps/v1
kind: Deployment
metadata:
  name: jdownloader
  labels:
    app: jdownloader
spec:
  replicas: 1
  selector:
    matchLabels:
      app: jdownloader
  template:
    metadata:
      labels:
        app: jdownloader
    spec:
      containers:
        - name: jdownloader
          image: jaymoulin/jdownloader
          env:
            - name: MYJD_USER
              value: "email@email.com"
            - name: MYJD_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: my_jd_secret
                  key: password
          volumeMounts:
            - mountPath: /opt/JDownloader/app
              name: exec
            - mountPath: /opt/JDownloader/app/cfg
              name: cfg
            - mountPath: /opt/JDownloader/Downloads
              name: downloads
            - mountPath: /opt/JDownloader/app/extensions
              name: extensions
      volumes:
        - name: exec
          emptyDir: {}
        - name: cfg
          hostPath:
            path: /path/to/jd/cfg
            type: Directory
        - name: downloads
          hostPath:
            path: /path/to/downloads
            type: Directory
        - name: extensions
          hostPath:
            path: /path/to/extensions
            type: Directory

[!CAUTION] Note for RPI Zero You may need to specify that you want the arm32v6 image (e.g. docker run -d --platform=linux/arm/v6 jaymoulin/jdownloader) because rpi zero identifies itself as armhf which is incorrect (https://github.com/moby/moby/issues/41017) (https://github.com/moby/moby/issues/34875).

Configuration

You can set many parameters when you configure this container, but you must specify your MyJDownloader login/password to connect to your container.

Configuration values

ParameterFunction
-v /opt/JDownloader/app/cfgConfig file folder, saves your configuration on the host
-v /opt/JDownloader/app/logsContainer logs folder, specify it only if you wan to keep logs on the host
-v /opt/JDownloader/app/extensionsExtensions folder, specify it only if you wan to install extensions and keep it on the host
-v /opt/JDownloader/DownloadsDownloads folder (where you put your download mountpoint)
-u <UID>:<GID>Add user identifiers to run the container with user priviledges. To obtain such values, run on your host id yourusername, additional information can be found in Docker documentation
-p 3129:3129This Network port is required for Direct Connection mode, more information in this section

Environment Variables

ParameterFunction
FILE_MYJD_USER=myjd-userThe docker secret of your MyJDownloader user
FILE_MYJD_PASSWORD=myjd-passwordThe docker secret of your MyJDownloader password
MYJD_USER=email@email.comYour MyJDownloader user
MYJD_PASSWORD=fooYour MyJDownloader password
MYJD_DEVICE_NAME=goofyThe device name that will appear on MyJdownloader portal
XDG_DOWNLOAD_DIR=/opt/JDownloader/DownloadsIf you use this variable, set it as per the downloads folder volume!
UMASK="0002"Defines specific rights for your downloaded files (default: undefined) - Must respect octal form (begins with 0 followed by three numbers between 0 and 7 included) (cf. https://en.wikipedia.org/wiki/Umask)

Identify

There are 3 possibilities to give login password for MyJDownloader:

  • Declare FILE_MYJD_USER and FILE_MY_JD_PASSWORD which is used with the principle of docker secret : https://docs.docker.com/engine/swarm/secrets/#use-secrets-in-compose. This is the most docker way.
  • Declare MYJD_USER and MYJD_PASSWORD values which only create environment variable
  • If haven't set FILE_MYJD_USER, FILE_MY_JD_PASSWORD, MYJD_USER and MYJD_PASSWORD values, you can still configure an account by running (Recommended method because it is the most secure but not fully automatic in the docker-compose.)
docker exec jdownloader configure email@email.com password

Other options can be changed on your MyJDownloader account : https://my.jdownloader.org/index.html#dashboard.

Appendixes

Direct Connection Mode

Direct Connection mode (or Direct Connections) improves the use of this container via MyJDownloader GUI and is strongly recommended at least in your LAN.

By enabling this mode, the communication happens directly between the client and the JDownloader server via port 3129 (by default), instead of being routed trough MyJDownloader servers. This enables the GUI to respond much faster with information reliably updating over time. In this mode, MyJDownloader server still handles service related tasks, like the session authentication and notifications.

To enable Direct Connection mode from internet, you need to open and forward port 3129 adjusting your router configuration. Please find more information in this JDownloader's article

DNS Rebind Warning

If you are running a router like Fritz!Box, Asus, OpenWRT, DDWRT, pfSense or any other 3rd party advanced routers you may have DNS Rebind Protection enabled: Direct Connections will not work, you will have to explicitly whitelist mydns.jdownloader.org. The procedure is different for every router, here are some tips:

  • Asus Merlin: Follow this procedure to enable custom scripts and edit the dnsmasq file, then add the line rebind-domain-ok=/mydns.jdownloader.org/
  • FreshTomato: In 'Advanced->DHCP/DNS/Dnsmasq Custom configuration' add rebind-domain-ok=mydns.jdownloader.org
  • Fritz!Box: KB Article from JDownloader
  • OpenWRT: browse to Network>DHCP and DNS>General Settings and add mydns.jdownloader.org to Domain Whitelist
  • pfSense: more information here

Direct Connection using a Bridged Network

To get Direct Connection when using a bridged newtwork, please follow these steps:

  • Expose 3129 port when creating the container (-p 3129:3129 parameter)
  • When JDownloader is running, navigate to Settings > Advanced Settings > Search for "myjdownloader" > Find MyJDownloaderSettings: Custom Device IPs and enter your host LAN IP using this formatting ["192.168.1.10"]. If you need to specify more IPs use ["192.168.1.10","10.10.10.10"]
  • Set MyJDownloaderSettings: Manual Local Port to 3129
  • Set MyJDownloaderSettings: Direct Connect Mode to Allow lan/wan connections with manual port forwarding
  • Restart JDownloader, connections will now be direct

Debugging

You can put a file called jdownloader-block.txt file in your Download folder to pause the container start. This will allow to connect to the container with a shell to debug. (docker exec -it jdownloader sh)

项目侧边栏1项目侧边栏2
推荐项目
Project Cover

豆包MarsCode

豆包 MarsCode 是一款革命性的编程助手,通过AI技术提供代码补全、单测生成、代码解释和智能问答等功能,支持100+编程语言,与主流编辑器无缝集成,显著提升开发效率和代码质量。

Project Cover

AI写歌

Suno AI是一个革命性的AI音乐创作平台,能在短短30秒内帮助用户创作出一首完整的歌曲。无论是寻找创作灵感还是需要快速制作音乐,Suno AI都是音乐爱好者和专业人士的理想选择。

Project Cover

有言AI

有言平台提供一站式AIGC视频创作解决方案,通过智能技术简化视频制作流程。无论是企业宣传还是个人分享,有言都能帮助用户快速、轻松地制作出专业级别的视频内容。

Project Cover

Kimi

Kimi AI助手提供多语言对话支持,能够阅读和理解用户上传的文件内容,解析网页信息,并结合搜索结果为用户提供详尽的答案。无论是日常咨询还是专业问题,Kimi都能以友好、专业的方式提供帮助。

Project Cover

阿里绘蛙

绘蛙是阿里巴巴集团推出的革命性AI电商营销平台。利用尖端人工智能技术,为商家提供一键生成商品图和营销文案的服务,显著提升内容创作效率和营销效果。适用于淘宝、天猫等电商平台,让商品第一时间被种草。

Project Cover

吐司

探索Tensor.Art平台的独特AI模型,免费访问各种图像生成与AI训练工具,从Stable Diffusion等基础模型开始,轻松实现创新图像生成。体验前沿的AI技术,推动个人和企业的创新发展。

Project Cover

SubCat字幕猫

SubCat字幕猫APP是一款创新的视频播放器,它将改变您观看视频的方式!SubCat结合了先进的人工智能技术,为您提供即时视频字幕翻译,无论是本地视频还是网络流媒体,让您轻松享受各种语言的内容。

Project Cover

美间AI

美间AI创意设计平台,利用前沿AI技术,为设计师和营销人员提供一站式设计解决方案。从智能海报到3D效果图,再到文案生成,美间让创意设计更简单、更高效。

Project Cover

AIWritePaper论文写作

AIWritePaper论文写作是一站式AI论文写作辅助工具,简化了选题、文献检索至论文撰写的整个过程。通过简单设定,平台可快速生成高质量论文大纲和全文,配合图表、参考文献等一应俱全,同时提供开题报告和答辩PPT等增值服务,保障数据安全,有效提升写作效率和论文质量。

投诉举报邮箱: service@vectorlightyear.com
@2024 懂AI·鲁ICP备2024100362号-6·鲁公网安备37021002001498号