Installing JDownloader2 on CentOS 7/RHEL 7 [Headless]
For those that don’t know, JDownloader is a popular Java-based link downloader that supports downloading files/videos/audio from many popular sites such as YouTube, Facebook, Twitter, etc. One of my favorite uses for it is to download a specific resolution of an online video or insta-rip audio from a video. JDownloader is a GUI tool at heart, but by connecting to their My JDownloader online service, you can use the software via command-line/no GUI (headless). Before continuing with this tutorial, make sure that you have already created a My JDownloader account, as you will need one.
Security Consideration: Based on how My JDownloader works, you are effectively allowing the My JDownloader online service to push remote commands to your local JDownloader instance (hello C2 anyone?). I strongly recommend that you install JDowloader on a system that is segmented part of your network that can’t reach anything else of importance (ex. your personal desktop/laptop).
Alright, let’s get down to it. First, we’re going to want to install java, as JDownloader won’t run without it:
Next, we’re going to create a low-privilege user “jdown2” to specifically run the JDownloader service and make the user’s shell nologin as an added security precaution:
Now we create a directory in /opt/ for JDownloader, set the appropriate permissions, and then download the software to the new directory:
After we’ve downloaded it, we run JDownloader as the “jdown2” user and it will start the update process and it will pull down additional files needed for JDownloader to run:
I had to run this command twice, as the process quit the first time. You will know when the update/setup process is done when you get to a screen like this asking you to enter in your My JDownloader credentials:
Enter in your My JDownloader Credentials, and then navigate to the My JDownloader control panel. You should see your new JDownloader instance appear. If so, we’re almost done.
CTRL+C out of the JDownloader process that you were running, and run the following commands to register JDownloader2 as a system service, configure it to launch on boot, and then start it back up:
All done. Now you have a headless JDownloader system that you can control remotely and have it download whatever you need. This guide was made for CentOS 7, but they are generic enough to work on most other Linux distributions.