Setting up a Raspberry Pi as a download station with the help of JDownloader2

This article covers a step by step how-to dealing with the setup of JDownloader2 on Raspberry Pi.

The complete setup is meant to be used as the user pi. Take care of it, if you like to set it up for another user.

The goal

Run a JDownloader2 instance that automatically starts when a desktop session is established

Grant remote access to the JDownloader2 instance

Prerequisites

Running Raspian

Running a desktop session

How-to

JDownloader2 installation

Since newer versions of Raspian ship with the more or less original Oracle Java package and libraries like 7zip-JBinding, it is much more comfortable to set up a JDownloader2 installation and run it on a Raspberry Pi.

Create the directory, JDownloader will work in:

mkdir ~/jdownloader2
cd jdownloader2

Download the JDownloader starter file:

wget http://installer.jdownloader.org/JDownloader.jar

If you typed the last commands within a SSH connection, it is now time to change into a desktop session based terminal before starting JDownloader. That is because JDownloader needs features of an active LXDE environment, it won’t work as a headless service. You could for example use a automatically starting VNC server session like I explained here. Or (for testing purpose) just connect your Pi with your screen 😉

It is already possible to start JDownloader with the command:

java -jar /home/pi/jdownloader2/JDownloader.jar

With this command JDownloader starts, retrieves updates and so on. Everything with this single command. The initial startup will take a longer time. Also following startups won’t be that fast but remote control works fluently once JDownloader was started.

To autostart JDownloader together with a specific user’s LXDE session, create this script in your preferred users home

nano /home/pi/jdownloader2/startjd2.sh

with the JDownloader init command in it:

#!/bin/sh
java -jar /home/pi/jdownloader2/JDownloader.jar

Set the correct permissions afterwards:

chmod 755 /home/pi/jdownloader2/startjd2.sh

Then edit

nano ~/.config/lxsession/LXDE/autostart

and put this line into this usually empty file:

@/home/pi/jdownloader2/startjd2.sh

If you want a desktop icon press

lxshortcut -o /home/pi/Desktop/JDownloader.desktop

and tell the wizard the path to your startjd2.sh

As a conclusion: If you have enabled auto login into a LXDE session (through configuration of the inittab, an automatically starting VNC service or just by enabling “Boot to Desktop/Scratch” when running raspi-config) in combination with auto starting JDownloader, you will end with an nearly headless JDownload server.

Remote control

In the previous version of JDownloader there was support for remote control by directly/locally accessing the JDownloader instance. This is past. Nowadays there is a web based environment called My JDownloader. Just create an account, link your JDownloader instance with it and you’re done.

Hey there, i set up Jdownloader 2 successfully but have a problem. I have a NAS which i would like the Pi to save what I download from Jdownloader. i found that there isn’t a way to change the default save directory to a network location.
For example, my PI currently saves to the local download folder /home/pi/Downloads. But i would like it to save to a network location. Is this possible? thanks in advance!!

The thing is I only got the PI a few days ago and I have no clue on how to make shortcuts, I know what you mean by mounting a samba share but have no idea how to do it, do you mind explaining how, thanks for the reply!

Remember you need to add or have existed user of NAS. This will also mout folders of NAS on every reboot. Warning! As you can see, you need to write user and pass in plaintext, there are some solutions like to hide them, but it is on longer discussion. So try this method first and later you can think about this security issue.