JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 20.04.2010, 14:07
unconnected
Guest
 
Posts: n/a
Default Run JDownloader (with web interface) as a service

To run JDownloader as a service (written for Win 2k8 R2, but should work on Win2k3, Vista and Win7)

Pre-requisites:

instsrv.exe (from Win2k3 resource kit - download from microsoft.com)
srvany.exe (from Win2k3 resource kit - download from microsoft.com)
JDownloader installed and configured
JDownloader web interface installed and configured
Optional - create a new admin user called JDownloader, which the service will run as

Steps:

1)Place the instsrv.exe and srvany.exe in your JDownloader install directory (for this guide we'll assume the directory is C:\Program Files (x86)\JDownloader)
2)Open a command prompt and type this command: instsrv JDownloader "C:\Program Files (x86)\JDownloader\srvany.exe"
3)Create a .reg file with the following contents:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\JDownloader\Parameters]
"Application"="C:\\Program Files (x86)\\JDownloader\\JDownloader.exe"

NOTE: those double backslashs are NOT typos! and note the space in the first line in the word services, this is added by vBulletin, edit it out when you copy and paste it.

4)Run the .reg file
5)Open the Services applet (services.msc) and you should see your newly created JDownloader service. Right click this and head to the log on tab and add the user credentials for the JDownloader user you created (optional)
6)Start the service and browse to your web interface URL (default port is 8765)

NOTE: if you get a mesage about TOS in the web interface you'll need to stop the service, disable it, log on to Windows as the user the service runs as, go into JDownload proper and accept the TOS there.

Finished!

If you have any questions about this procedure feel free to ask questions, notice you can use the two executables here to create a uTorrent service too.

One more note - Win2k8 R2 ootb has very locked down firewall settings, which prevented me from seeing the web interface on any remote host, you'll need to head into the advanced firewall settings and make changes there to expose the web interface on the network (can't remember the steps, but a quick google on windows firewall should help out).

Last edited by unconnected; 15.05.2010 at 21:17.
Reply With Quote
  #2  
Old 28.04.2010, 12:42
anvar
Guest
 
Posts: n/a
Default

Hello,

Followed your (easy) steps to make jdownloader a service on 2K8R2.
but when starting the service, I'm getting the following message:
"The JDownloader service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs"

Any idea what the problem could be?
ps: paths and etc are all the same
Reply With Quote
  #3  
Old 28.04.2010, 12:45
anvar
Guest
 
Posts: n/a
Default

Found the problem, your reg key string has an extra space between the word "Services"
Reply With Quote
  #4  
Old 01.05.2010, 11:07
vpeter
Guest
 
Posts: n/a
Default

Can you please explain which are the advantages to start Jdownlaoder as a service against putting a shotcut for it in Startup folder and having it lunched automatically at every system startup?
Reply With Quote
  #5  
Old 02.05.2010, 17:59
anvar
Guest
 
Posts: n/a
Default

the webservice use is wonderfull if you have a pc as file server / downloader. Then you don't need an open session to run jdownloader and hence have more free ram for other appliances.
If you don't have a "server" or pc nas then there is not a good use for it
Reply With Quote
  #6  
Old 15.05.2010, 21:16
unconnected
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by anvar View Post
Found the problem, your reg key string has an extra space between the word "Services"
Hi Anvar, sorry about that, the space isn't present in the original post, I assume it's added by vBulletin to prevent trolls from creating rediculously long lines which break formatting.

I'll add a note in my post.

And to vpeter - running as a service is perfect when you're running a headless box which doesn't always have someone logged in on, i.e. if you run it from the Startup folder you need to be logged in, as a service, you don't.

Plus if for whatever reason it fails, you've got the built in service framework to capture that failure and respond with a set of actions and finally, I can scheduled the service to start and stop based on dynamic issues from other machines on my network (for example, if I start my L4D2 server, it automatically calls all my other bandwidth hogging services on the network and stops them while the server is up).
Reply With Quote
  #7  
Old 19.10.2010, 17:06
rcpl_ktb
Guest
 
Posts: n/a
Default

thx very much for your help, unconnected!! exactly what i've been looking for!! till the fabulous developers here integrate it into the software itself :D

good job everyone
Reply With Quote
  #8  
Old 29.10.2010, 12:59
callten
Guest
 
Posts: n/a
Default

This is great, does exactly what I want!

Buttt I have a problem trying to get the GUI running once I have started the service on startup. The only way I can get it to work is to stop the service, put it to manual and reboot. This is quite a longwinded method for rearranging a download queue or something. :(

I need the service part because I have seriously dodgy power supply issues and seem to be having powercuts every single night (usually right after I go to bed :\).

Any ideas how to get the GUI running without having to reboot?
Reply With Quote
  #9  
Old 30.10.2010, 10:41
drbits's Avatar
drbits drbits is offline
JD English Support (inactive)
 
Join Date: Sep 2009
Location: Physically in Los Angeles, CA, USA
Posts: 4,434
Default

Install a Battery Backup (to save your computer, not just JD). Set the Battery Backup to Hibernate your computer after the power has been down for a minute. Set it to restore the computer after the power has been back for 5 minutes.

Sometimes you have to look at the real problem, not just the inconveniences.
Reply With Quote
  #10  
Old 19.02.2024, 13:13
forivin forivin is offline
DSL Light User
 
Join Date: Sep 2013
Posts: 34
Default

For anyone finding this while googling, looking for an easier solution, you can easily run JD as a service from PowerShell or Cmd like this:
Code:
choco install nssm
nssm install JDownloader "%ProgramFiles%\JDownloader\JDownloader2.exe"
nssm start JDownloader
If you don't have chocolatey, you can manually install nssm and skip the choco command.

You can then control your JD from the browser: https://my.jdownloader.org
(Assuming you've entered your My.JDownloader credentials in your JD Settings.)

nssm is a widely used lightweight tool to simplify the creation and management of windows services.

To check the status, you run:
Code:
nssm status JDownloader
To stop the service, you run:
Code:
nssm stop JDownloader
To remove the service, you run:
Code:
nssm remove JDownloader confirm
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 16:29.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.