jdownloader
jdownloader copied to clipboard
Docker JDownloader 2 headless image with automatic updates.
JDownloader 2
Docker JDownloader 2 headless image with automatic updates.
There is no embedded graphical interface, you should manage your downloads through the official JDownloader web interface here : https://my.jdownloader.org.
You can report issues in the github issues.
You can send feedback and discuss the project in the github discussions.
Versions
OpenJDK 17
More recent OpenJDK version.
arch \ tags | latest ubuntu openjdk17 openjdk17-ubuntu |
alpine openjdk17-alpine |
---|---|---|
amd64 | OK | OK |
arm64 | OK | OK |
arm/v7 | OK | NA |
s390x | Need feedback | Need feedback |
OpenJDK 8
Greater platforms compatibility.
arch \ tags | openjdk8 openjdk8-ubuntu |
openjdk8-alpine |
---|---|---|
amd64 | OK | OK |
arm64 | OK | OK |
arm/v7 | OK | Avoid Issue 4, Issue 11 |
arm/v6 | NA | Need feedback |
386 | NA | Need feedback |
ppc64le | Need feedback | Need feedback |
s390x | Need feedback | Need feedback |
Docker run
docker run (official documentation)
docker run -d \ --name <CONTAINER-NAME> \ --restart <RESTART> \ --user <UID>:<GID> \ -v "<DOWNLOADS-PATH>:/jdownloader/downloads/" \ -v "<CONFIG-PATH>:/jdownloader/cfg/" \ -v "<LOGS-PATH>:/jdownloader/logs/" \ -e "JD_EMAIL=<JD_EMAIL>" \ -e "JD_PASSWORD=<JD_PASSWORD>" \ -e "JD_DEVICENAME=<JD_DEVICENAME>" \ -e "JAVA_OPTIONS=<JAVA_OPTIONS>" \ -e "LOG_FILE=<LOG_FILE>" \ -e "UMASK="<UMASK>" \ -p "<PORT>:3129" \ antlafarge/jdownloader:<TAG>
Note : Parameters indented twice are optional.
Parameters
Name | Type | Description | Optional (default) |
---|---|---|---|
<CONTAINER-NAME> |
Name | Container name. | Recommended (random) |
<RESTART> |
Restart | Container restart policy. Use on-failure to have a correct behavior of Restart JD , Close and Shutdown buttons in the JDownloader settings.Use unless-stopped if the container doesn't restart on system reboot. |
Recommended (no ) |
<UID> |
User | Owner (User ID) of the files and directories created. You can use the id -u command in your shell to get your current user id. |
Recommended (0 ) |
<GID> |
User | Owner (Group ID) of the files and directories created. You can use the id -g command in your shell to get your current groud id. |
Recommended (0 ) |
<DOWNLOADS-PATH> |
Volume | Directory where your downloads will be stored on your host machine. If you use the user parameter, check the permissions of the directories you mount as volumes. |
REQUIRED |
<CONFIG-PATH> |
Volume | Directory where the JDownloader settings files will be stored on your host machine. If you use the user parameter, check the permissions of the directories you mount as volumes. |
Recommended (in container) |
<LOGS-PATH> |
Volume | Directory where the JDownloader log files will be stored on your host machine. If you use the user parameter, check the permissions of the directories you mount as volumes. |
Not recommended (in container) |
<JD_EMAIL> |
Env | Your myJDownloader email. | REQUIRED |
<JD_PASSWORD> |
Env | Your myJDownloader password. | REQUIRED |
<JD_DEVICENAME> |
Env | Device name in your myJDownloader web interface. | Optional (hostname) |
<LOG_FILE> |
Env | Write JDownloader logs from java command in a file.You should create activate the volume parameter <LOGS-PATH> to access this log file from the host machine.Useful if you have any issues with JDownloader. Example : "/jdownloader/logs/jd.docker.log" |
Optional (/dev/null ) |
<JAVA_OPTIONS> |
Env | Java options. Use -Xms128m -Xmx1g to change initial and max Java heap size memory. |
Optional (empty) |
<UMASK> |
Env | Change the umask. | Optional (no change) |
<PORT> |
Port | Network port used for Direct connection mode. | Optional (not exposed) |
<TAG> |
Tag | Docker hub tag. | Optional (latest ) |
Example
docker run -d \ --name jdownloader \ --restart on-failure:10 \ --user 1000:100 \ -v "/hdd/JDownloader/downloads/:/jdownloader/downloads/" \ -v "/hdd/JDownloader/cfg/:/jdownloader/cfg/" \ -e "JD_EMAIL=[email protected]" \ -e "JD_PASSWORD=MyGreatPassword" \ -e "JD_DEVICENAME=JD-DOCKER" \ -p 3129:3129 \ antlafarge/jdownloader:latest
Note : Parameters indented twice are optional.
Docker Compose
Docker Compose (official documentation)
services: jdownloader: image: antlafarge/jdownloader:<TAG> container_name: <CONTAINER-NAME> # optional restart: <RESTART> # optional user: <UID>:<GID> # optional volumes: - "<DOWNLOADS-PATH>:/jdownloader/downloads/" - "<CONFIG-PATH>:/jdownloader/cfg/" # optional - "<LOGS-PATH>:/jdownloader/logs/" # optional environment: - "JD_EMAIL=<JD_EMAIL>" - "JD_PASSWORD=<JD_PASSWORD>" - "JD_DEVICENAME=<JD_DEVICENAME>" # optional - "JAVA_OPTIONS=<JAVA_OPTIONS>" # optional - "LOG_FILE=<LOG_FILE>" # optional - "UMASK=<UMASK>" # optional ports: - "<PORT>:3129" # optional
Example
services: jdownloader: image: antlafarge/jdownloader:latest container_name: jdownloader # optional restart: on-failure:10 # optional user: 1000:100 # optional volumes: - "/hdd/JDownloader/downloads/:/jdownloader/downloads/" - "/hdd/JDownloader/cfg/:/jdownloader/cfg/" # optional environment: - "JD_EMAIL=[email protected]" - "JD_PASSWORD=MyGreatPassword" - "JD_DEVICENAME=JD-DOCKER" # optional ports: - "3129:3129" # optional
Guides
Setup
- Go to my.jdownloader.org and create an account.
- If you want to run the image as an unprivileged user, check the permissions of the directories you mount as volumes, and use the
user
parameter- Create the downloads directory :
mkdir /path/to/downloads/
- Setup the user and group owners :
sudo chown -R 1000:100 /path/to/downloads/
- You can get your User ID (UID) by using :
id -u
- You can get your User Group ID (GID) by using :
id -g
- I recommend to use
100
as GID (users
group), because every users should be in this group, and it will be easier to manage multi-users privileges.
- You can get your User ID (UID) by using :
- Setup the access rights :
sudo chmod -R 770 /path/to/downloads/
- Do the same for the config directory
- Create the downloads directory :
- Run the container by choosing the docker run or docker compose method and customize the parameters by using your myJDownloader credentials.
- You can check the container logs :
docker logs --follow --tail 100 jdownloader
(CTRL + C
to quit)
- You can check the container logs :
- Wait some minutes for JDownloader to update and be available in your myJDownloader web interface.
Update JDownloader
JDownloader will update itself automatically when it is idle (every 12 hours), so you have nothing to do.
To disable the automatic upates, go to your JD instance on my.jdownloader.org, and go to Settings
/ Event Scripter
and switch from Enabled
to Disabled
.
Update the image
-
Docker run method :
- Stop the current container :
docker stop jdownloader
- Remove the current container :
docker rm jdownloader
- Update the image :
docker pull antlafarge/jdownloader:latest
- Remove the old untagged images :
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
- Restart the container :
docker start jdownloader
- Stop the current container :
-
Docker compose method :
- Stop the current container :
docker compose stop jdownloader
- Remove the current container :
docker compose rm -f jdownloader
- Update the image :
docker compose pull jdownloader
- Remove the old untagged images :
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
- Restart the container :
docker compose up -d
- Stop the current container :
Change your email or password
- If you started the container by setting the email and password environment variables :
- You must follow the Update the image guide by setting the new email or password on the final step.
- If you started the container without setting the email and password environment variables :
- Run the setup script in the running container :
docker exec jdownloader /jdownloader/setup.sh "[email protected]" "MyNewPassword" "JD-DOCKER"
. - Restart the container :
-
Docker run method :
docker restart jdownloader
. -
Docker compose method :
docker compose restart jdownloader
.
-
Docker run method :
- Run the setup script in the running container :
Special characters in password
If you have special characters in your password, you have 2 solutions :
-
Modify your docker run command or docker-compose.yml file :
- If you have exclamation marks (
!
) in your password and you use a bash shell, this special character corresponds to commands history substitution. You might need to disable it by using the commandset +H
in your bash shell. - If your password contains double quotes (
"
), escape it with backslashes (\
) in the docker run command or docker-compose.yml file."JD_PASSWORD=My\"Great`Password"
- If you use the docker run method, also escape backticks (
`
) with backslashes (\
)."JD_PASSWORD=My\"Great\`Password"
- If you use the docker run method, also escape backticks (
- Start the container.
- If you have exclamation marks (
-
Or put your password manually in the settings file :
- Modify your docker run command or docker-compose.yml file parameters :
- Set an empty
<JD_PASSWORD>
(for disabling password replacement on container start)."JD_PASSWORD="
- Set a
<CONFIG-PATH>
volume to access the JDownloader settings files.
- Set an empty
- Start the container.
- Go to your config directory and open the settings file named
org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json
. - Search for the password field and place your password in the empty double quotes.
"password":"MyGreatPassword",
- If your password contains double quotes (
"
), escape it with backslashes (\
)."password":"My\"Great`Password",
- Save the file and restart the container.
docker restart jdownloader
- Modify your docker run command or docker-compose.yml file parameters :
Troubleshooting
Files permissions issue
Check your user can read and write the directories you mounted as volumes.
Read carefully the Setup guide and follow the steps.
Or run the container as root (remove user
option).
Armhf libseccomp2 issue
If you run the image on an armhf host (arm/v7
), you may encounter many command errors (wait
, sleep
, curl
, date
)
This may be resolved by upgrading the libseccomp2
library (docker dependency).
First you should try to upgrade your system by using the usual method.
If this upgrade didn't resolve the problem, add the backports repo for debian buster and update :
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC 648ACFD622F3D138
echo "deb http://deb.debian.org/debian buster-backports main" | sudo tee -a /etc/apt/sources.list.d/buster-backports.list
sudo apt update
sudo apt install -t buster-backports libseccomp2
Docker privileges
If nothing worked and many internal commands fail, your container may lack some privileges and you can try the --privileged flag.
Nothing worked / another issue
You can report issues in the github issues.
You can send feedback and discuss the project in the github discussions.
Docker commands reminder
Container stop
docker stop jdownloader
Container restart
docker restart jdownloader
Container logs
docker logs --follow --tail 100 jdownloader
Note: To access the JDownloader log files, you have to set the <LOGS-PATH>
volume.
Container delete
docker rm -f jdownloader
Image delete
docker rmi antlafarge/jdownloader:openjdk17
Compose start
cd /path/to/docker-compose.yml/directory/ docker compose up -d
Compose stop
cd /path/to/docker-compose.yml/directory/ docker compose down