2.1. Installation as a Service on a Windows Server

For ad-hoc or temporary RCE network setups, running a headless RCE from the command line is perfectly fine. For more permanent installations, however, we recommend installing RCE as a Windows service instead. This has the advantage that RCE automatically shuts down when the server is shut down, and automatically restarts when the server does.

2.1.1. RCE as a Windows Service

Executing the following steps will install RCE as an auto-start service on Windows.

  1. Navigate to the extras\windows_service folder inside your installation folder of RCE named rce

  2. Open the file install_as_service.bat and adjust these settings:

    • Set RCE_ROOT_PATH to the location of your RCE installation (typically, the location which you are editing these files in). RCE must already be present (and unpacked) in this location; the service installer does not copy any files there.

    • Set RCE_SERVICE_USER to the name of the existing user account that the RCE service should run as.

      Note

      This user account will be used to run RCE and all local tools that are invoked by it. Make sure that this user has appropriate system permissions to run these tools' executables, and read/write all related files.

  3. Execute with administrator rights

    install_as_service.bat

    by double-clicking or on the command line

  4. Open the Windows Service Managment Console (e.g. execute "services.msc" on the command line)

  5. Look for entry "RCE Service", do a right-click and click "Properties"

  6. Click on the "Log On" tab and fill in the correspondig password for the user account set to the RCE_SERVICE_USER variable. By clicking the "Apply" button a message should inform you that the privilege to "Log on as service" was added to the account.

    Note

    To add the "Log on as a service" right to an account on your local computer manually:

    1. Open Local Security Policy.

    2. In the console tree, double-click Local Policies, and then click User Rights Assignments.

    3. In the details pane, double-click Log on as a service.

    4. Click Add User or Group and add the appropriate account to the list of accounts that possess the Log on as a service right.

  7. Close the properties dialog by clicking "Ok"

To manually start the RCE service:

  1. Open the Windows Service Managment Console (e.g. execute services.msc on the command line)

  2. Right-click on the entry "RCE Service" and select "Start"

To stop the RCE service:

  1. Open the Windows Service Managment Console (e.g. execute services.msc on the command line)

  2. Right-click on the entry "RCE Service" and select "Stop"

To uninstall the RCE service:

  1. Navigate to the extras\windows_service folder inside your installation folder of RCE named rce

  2. Open the file uninstall_service.bat and set the absolute path of the variable RCE_ROOT_PATH to the location of your RCE installation

  3. Execute with administrator rights

    uninstall_service.bat

    by double-clicking or on the command line

2.1.2. Service Configuration

After installation, the service instance will be started automatically. This will create a default configuration file if it does not exist yet.

To configure the service instance, locate the RCE configuration file in the service user's home directory - by default, it is located at C:\users\<user id>\.rce\default\configuration.json. Edit this file and restart the service to apply the changes.

For importing SSH credentials and authorization group keys into a service, please refer to section "Importing authorization data without GUI access" in the User Guide. As of RCE 10, file-based imports are only processed on startup, so a restart is required for this, too.

Note

The need to restart the service is temporary; future versions of RCE will apply configuration changes as soon as configuration files are changed or new import files are placed in the respective folders.