-
If you've not already done so,
download
and install the latest version of R for Windows:
Download the Rserve zip file and extract it to a new folder.
Make sure that you can run it from a command prompt.
We put Rserve in "C:\Rserve" on our server. Once we added "R.exe" to the PATH and set the R_HOME environment variable, we were able to start rserve.exe as expected:
-
Download and install AlwaysUp, if necessary.
-
Start AlwaysUp.
-
Select Application > Add to open the Add Application window:
-
On the General tab:
-
In the Application field, enter the full path to the Rserve executable, rserve.exe.
That's "C:\Rserve\libs\x64\Rserve.exe" on our machine.
-
In the Name field, enter the name that you will call the application in AlwaysUp.
We stuck with the default of Rserve but you can specify another name if you like:
-
Move to the Logon tab and enter the username and password of the account where you installed and run Rserve.
Rserve should run in this account to find required environment variables and other configuration:
-
Switch to the Startup tab and check the Ensure that the Windows networking components have started box.
Rserve communicates via TCP/IP and this option will prevent the server from starting before the network is ready:
-
We're done configuring Rserve as a service so click the Save button to record your settings.
In a couple of seconds, an application called "Rserve" will show up in the AlwaysUp window.
It's not yet running though and the state will be "Stopped":
-
To start Rserve from AlwaysUp, choose Application > Start "Rserve".
In a few seconds, the status will change to "Running" and the server will be working in the background:
-
That's it! Next time your computer boots, Rserve will start up immediately, in the background, without anyone needing to log on.
Please restart your PC now and test that everything works as expected after Windows comes back to life.
And please feel free to edit Rserve in AlwaysUp to check out the many other settings that may be appropriate for your environment.
For example,
send email alerts if it stops,
restart the server nightly to cure memory leaks,
boost the priority of rserve.exe to support computationally expensive tasks,
and much more.