How to install a headless JDownloader server in a Raspberry Pi 2

This is a tutorial to install JDownloader such a systemd service in a Raspberry PI
Prerequisites:
Install java ffmpeg decoder, vim and unrar:
sudo apt install -y default-jdk ffmpeg vim unrar-free
Then create a new folder and enter to the created folder
mkdir jdownloader && cd jdownloader
Download the JDownloader installer
wget http://installer.jdownloader.org/JDownloader.jar
After that we finished the installation phase and we need to configure our JDownloader, we are start running the JDownloader executable
java -jar JDownloader.jar -norestart
Wait if there are updates, after it finished you can stop it with CTRL+C command an you need to re run it again
java -jar JDownloader.jar -norestart
You should wait if there is another update and then configure MyJDownloader with the credentials that you created in https://my.jdownloader.org/
You need to setup your email and password

Then you can check if your server is online in https://my.jdownloader.org

After that you need to stop the JDownloader headless server pressing CTRL+C in the terminal
In the next phase you can configure your JDownloader server such as SystemD service it is in order to have an unattended service and you can manage it using the services commands.
Run in the terminal
sudo touch /etc/systemd/system/jdownloader.service && sudo vim /etc/systemd/system/jdownloader.service
You should copy this configuration to the opened vim terminal, keep in mind that the ExecStart needs to point to the JDownloader executable
[Unit]
Description=JDownloader
Wants=network.target
After=network.target
[Service]
Type=simple
ExecStart=java -jar /home/pi/jdownloader/JDownloader.jar -norestart
PIDFile=/home/pi/bin/jdownloader/JDownloader.pid
User=pi
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

And that's it you can finish the configuration reloading the SystemD Daemon
sudo systemctl daemon-reload
Start the service
sudo systemctl start jdownloader.service
And at the end you need to enable the service
sudo systemctl enable jdownloader.service
You can check the service status using
sudo service jdownloader status

And that's it you have your JDownloader server in your Raspberry Pi and you can queue downloads using MyJDownloader from everywhere.
Comments ()