Portainer Templates logo

Portainer Templates

JDownloader JDownloader

Container

DownloadersTools

JDownloader docker image

Image details

Pulls: 52.8M
Architecture: amd64, arm64, arm/v7, arm/v6, 386, arm, arm/v5, arm64/v8
Image size: 306 MB
Latest: 2.3.0
User: jaymoulin
Created: Nov 23, 2017
Updated: 1 years ago
Status: active

Configuration

Type
Container
Platform
linux
Image
jaymoulin/jdownloader:latest
Ports
3129:3129/tcp
Volumes
/opt/JDownloader/app/cfg : /portainer/Files/AppData/Config/JDownloader/opt/JDownloader/Downloads : /portainer/Downloads
Env vars
MYJD_DEVICE_NAME=MYJD_USER=MYJD_PASSWORD=
Restart
unless-stopped

Template by novaspirit

Notes

Standalone Install

Select an install method, to see config/commands for deploying JDownloader

Installation method

Install on Portainer

Import all app templates into your Portainer instance, for easy 1-click deploys

  1. Ensure both Docker and Portainer are installed, and up-to-date
  2. Log into your Portainer web UI
  3. Under Settings → App Templates, paste the below URL
  4. Head to Home → App Templates, and the list of apps will show up
  5. Select JDownloader, fill in any config options, and hit Deploy

Template Import URL

https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me demo

More install options in our documentation.

logo
Sources
Issues

JDownloader 2 - Docker Image

latest release Docker Pulls Docker stars PayPal donation Buy me a coffee Buy me a coffee
DISCLAIMER: As-of 2021, this product does not have a free support team anymore. If you want this product to be maintained, please support on Patreon.
(This product is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addition to maintenance, support and stability there are many desirable features yet to be added.)

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!

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

Note for RPI Zero : specify that you want the arm32v6 image (e.g. jaymoulin/jdownloader:0.7.0-arm32v6) because rpi zero identify itself as armhf which is wrong.

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:3129 | This Network port is required for Direct Connection mode, more information in this section |

Environment Variables

ParameterFunction
FILEMYJDUSER=myjd-userThe docker secret of your MyJDownloader user
FILEMYJDPASSWORD=myjd-passwordThe docker secret of your MyJDownloader password
MYJDUSER=email@email.comYour MyJDownloader user
MYJDPASSWORD=fooYour MyJDownloader password
MYJDDEVICENAME=goofyThe device name that will appear on MyJdownloader portal
XDGDOWNLOADDIR=/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 FILEMYJDUSER and FILEMYJDPASSWORD 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 MYJDUSER and MYJDPASSWORD values which only create environment variable
  • If haven't set FILEMYJDUSER, FILEMYJDPASSWORD, MYJDUSER and MYJDPASSWORD 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)

Install Docker

If you don't have Docker installed yet, you can do it easily in one line using this command
curl -sSL "https://gist.githubusercontent.com/jaymoulin/e749a189511cd965f45919f2f99e45f3/raw/0e650b38fde684c4ac534b254099d6d5543375f1/ARM%2520(Raspberry%2520PI)%2520Docker%2520Install" | sudo sh && sudo usermod -aG docker $USER

Serve JDownloader on your own domain behind Caddy, Nginx or Traefik. Fill in your domain and copy the result. It's a starting point, some apps need their own base URL or extra headers set too.

Proxying jdownloader.example.com to http://JDownloader:3129

Add this to your Caddyfile

jdownloader.example.com {
	reverse_proxy http://JDownloader:3129
}

Check the logs first

Nine times out of ten the logs tell you exactly what went wrong.

  • In Portainer, go to Containers, click the container, then Logs. Or run docker logs JDownloader
  • Exit codes help too: 137 means killed, usually out of memory. 126 or 127 means the command inside the image is broken.

Port already in use

If deployment fails with "Bind for 0.0.0.0:3129 failed: port is already allocated", something else on your server is using that port.

  • Find what's using it: sudo ss -tlnp | grep :3129
  • Stop the other service, or pick a different host port. In 3129:3129 only the left number is yours to change, the right one belongs to the app.

Running but the page won't load

The container is up but nothing appears in your browser.

  • Use your server's real IP: http://your-server-ip:3129. The 0.0.0.0 link Portainer shows isn't a real address.
  • Give it a minute after first deploy, JDownloader can take a while to initialise.
  • Make sure your firewall allows the port, e.g. sudo ufw allow 3129

Permission denied on volumes

If the logs show "permission denied", the app can't write to its data folder on the host.

  • Fix the ownership: sudo chown -R 1000:1000 /portainer/Files/AppData/Config/JDownloader (and the same for the other mapped folders)

Image won't pull

Test the pull directly on the host: docker pull jaymoulin/jdownloader:latest

  • "manifest unknown" means the tag no longer exists. This template uses latest, so try pinning a specific version instead.
  • "toomanyrequests" is the Docker Hub rate limit. Log in with docker login to raise it.
  • "no space left on device" means a full disk. Reclaim space with docker system prune

"exec format error"

This means the image was built for a different CPU architecture than your server.

  • This image supports: amd64, arm64, arm/v7, arm/v6, 386, arm, arm/v5, arm64/v8
  • Check yours with uname -m: x86_64 is amd64, aarch64 is arm64. Raspberry Pi and other ARM boards are the usual culprits.

Container keeps restarting

The unless-stopped restart policy relaunches the app after every crash, so the real error can scroll past.

  • Check the logs right after a restart, the last few lines before it died are the useful ones.
  • Get the exit code with docker inspect JDownloader --format '{{.State.ExitCode}}'
  • Still stuck? Redeploy once with the restart policy set to no so the failure stays visible.

Required settings are blank

MYJD_DEVICE_NAME, MYJD_USER, MYJD_PASSWORD have no default value, and JDownloader may crash or misbehave if left empty.

  • Fill them in on the deploy screen before hitting deploy.

Raise an issue

Found something which isn't working as it should? Here's how to report it.

A single container

JDownloader runs as one container, the simplest kind of app here. Just the one image to pull and nothing else wired up alongside it.

The app image

An image is the app packed up ready to go, everything JDownloader needs bundled into one download. This template pulls jaymoulin/jdownloader:latest, which Docker fetches once (about 306 MB) and then starts your own copy from.

Where the image comes from

Docker pulls its images from registries, public libraries of ready-built apps. JDownloader's comes from Docker Hub, published by jaymoulin.

Version tags

The bit after the colon in the image name is the version tag. Here it's latest, which always points at the newest build, so a redeploy can bump you to a newer release without you asking. Newest right now is 2.3.0. Pin a specific tag if you would rather stay on one version.

Which machines it runs on

Every image is built for particular CPU types. This one ships for amd64, arm64, arm/v7, arm/v6, 386, arm, arm/v5, arm64/v8, so it runs on both regular x86 servers and ARM boards like a Raspberry Pi.

Ports

A port is the door the app answers on. A mapping like 3129:3129 means it's reachable on port 3129 of your server, where the left number is yours to change and the right one belongs to the app. It opens:

  • 3129:3129

Volumes

A volume is where JDownloader keeps its files so they survive an update or a restart. Without one, anything it saves would sit inside the container and vanish the moment it's recreated. This template mounts:

  • /opt/JDownloader/app/cfg from /portainer/Files/AppData/Config/JDownloader on the host
  • /opt/JDownloader/Downloads from /portainer/Downloads on the host

Environment variables

Environment variables are the settings you hand over when you deploy, things like a password or a timezone. JDownloader takes 3 of them, and 3 need a value before it'll start properly:

  • MYJD_DEVICE_NAME, needs a value
  • MYJD_USER, needs a value
  • MYJD_PASSWORD, needs a value

Restart policy

The restart policy here is unless-stopped, so Docker restarts JDownloader after a crash or reboot, but leaves it off when you stop it on purpose. You can change this on the deploy screen. The choices are no (never restart), on-failure (only after a crash), unless-stopped (restart unless you stop it), and always (bring it back no matter what).

Networking

Nothing custom is set, so JDownloader sits on Docker's default bridge network: its own private space that reaches the outside world only through the ports it publishes.

Container name

Once it's deployed, Portainer names the container JDownloader. That's what you'll spot in the containers list and use in commands like docker logs JDownloader.

Platform

The platform is linux, the kind of system the container is built to run on. Docker and Portainer handle this on a normal Linux server.

Portainer app templates

Zooming out, this whole page comes from a Portainer app template: a short recipe telling Portainer how to set JDownloader up. Add the template list to Portainer once, then deploying JDownloader is a click rather than a wall of config.