-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This wiki provides addition configuration options for RemTroll Server to help those with more advanced setups.
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.
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.
The server logs every access request so you can monitor it for security purposes. You can redirect the output however you wish.
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:
- port - Integer. The port this server should listen on.
- secure - Boolean. If you set this to true, https will be used.
- privkey - String. If you set secure to true, use this to specify the location of your private key file.
- pubcert - String. If you set secure to true, use this to specify the location of your public key file.
- keypass - String. If you have a password for the private key, you can specify it here.
- 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.
- 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'.
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.
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.
openssl genrsa -out server-key.pem 1024
openssl req -new -key server-key.pem -out server-csr.pem
openssl x509 -req -in server-csr.pem -signkey server-key.pem -out server-cert.pem