Skip to content
James McCarthy edited this page Mar 12, 2017 · 9 revisions

Remtroll Server

This wiki provides addition configuration options for RemTroll Server to help those with more advanced setups.

  1. Prerequistes
  2. Install
  3. Logging
  4. Configuration
  5. HTTPS Certificates
  6. Self-signed certificate

Prerequisites

You must have NodeJS installed to run the RemTroll server.

RemTroll is hosted on npm. Make sure you have the latest version installed before installing RemTroll.

Install

To install from the command line, run:

npm install remtroll-server -g

You will then be able to run remtroll-server by doing the following:

remtroll-server <config path>

where config path is the path to your configuration file. This is optional as you can edit the configuration file in the module directory where remtroll-server is installed.

Logging

The server logs every access request so you can monitor it for security purposes. You can redirect the output however you wish.

Configuration

By default, the config file will be stored in the cfg folder inside the module. You can create your own configuration file.

The configuration file is in the JSON format. The format is as follows:

  1. port - Integer. The port this server should listen on.
  2. secure - Boolean. If you set this to true, https will be used.
  3. privkey - String. If you set secure to true, use this to specify the location of your private key file.
  4. pubcert - String. If you set secure to true, use this to specify the location of your public key file.
  5. keypass - String. If you have a password for the private key, you can specify it here.
  6. cacert - String. If you set secure to true, use this to specify the location of your certificate authority certificate. If you're using a certificate signed by an already-trusted authority, leave this blank.
  7. shutphrase - String. This acts like a password that you can use to control who can give the shutdown command. The app will prompt you for this. It defaults to 'supersecret'.

HTTPS certificates

If you wish, you can configure https to work with RemTroll. The server will require you to configure the private key and public key for HTTPS.

If you own a domain, we've used CACert.org to create certificates for free in the past. The downside is that not all browsers and OSes/devices trust CACert so you may need to install their root certificate.

Self-signed certificate

Assuming you have OpenSSL installed on your system, the following three commands will generate a certificate that you can use to enable a secure RemTroll server.

For the following, the private key file will be called server-key.pem and the SSL certificate will be called server-cert.pem. We recommend placing them in a secure location and then running remtroll --config to indicate the full path to the certificate in your config.

  1. openssl genrsa -out server-key.pem 1024
  2. openssl req -new -key server-key.pem -out server-csr.pem
  3. openssl x509 -req -in server-csr.pem -signkey server-key.pem -out server-cert.pem
Clone this wiki locally