Configure repcli for Remote Access

The repcli tool can be used as standalone application to manage remote Repstance Server through the HTTPS protocol. 

The tool can be found in the following directories, once the product is installed:

  • /opt/repstance/cli/macos – For MacOS Operating System
  • /opt/repstance/cli/win – For Windows
  • /opt/repstance/cli/linux – For Linux

Or they can be downloaded from here: 

These remote clients are only able to connect using the HTTPS protocol and are supplied with the following default configuration: 

  • HTTPS port is 8797
  • For HTTPS initial use a Self-Signed Certificate is provided
  • HTTPS authorisation “Token” is the value of the token parameter in the /opt/repstance/conf/repstance.conf file. By default it is the Instance ID in AWS and the VM ID in Azure

In order to use the repcli utility to communicate with the remote Repstance Server it has to be configured using the repcli command “configure”.

The following example demonstrates the command syntax: 

$ repcli configure url=https://hostname:8797/ token=your_token verifyhttps=0 

Note – The verifyhttps parameter should be set to 0 to avoid the Self-signed certificate error. With this value the certificate of the server is not verified, so repcli cannot detect that it is connected to a wrong server. When a certificate issued by a trusted authority is installed, use the default value 1. 

As the product is initially supplied with a Self-Signed Certificate it is highly recommended that the user replaces this with a security certificate of the required Security level themselves. The new certificate and key needs to be supplied to the Repstance Server and the appropriate entries in the /opt/repstance/conf/repstance.conf file need to be edited to reflect these changes: 

  • key – path to the key
  • crt – path to the certificate

Using this method, the default HTTPS port can also be changed by modifying the port parameter. The certificate and the port that are set here are those of the Repstance Server, which repcli and the REST API use; the Web UI has its own certificate (see Web User Interface (Web UI)). 

The default token used to access the server can also be changed by modifying the token parameter in the same file. It is recommended to change the default token after the installation. The new token is used after the Repstance services are restarted (see How to Stop Repstance Services and How to Start Repstance Services). 

If the user wishes to prevent any external access, the port parameter should be set to value 0.

Note – The Web UI Server connects to the Repstance Server through this port on the same computer. With the port set to 0 the Web UI does not work. If you set another port, set the same value in the API_PORT line of the /opt/repstance/ui2/.env.local file and restart the Web UI service; that file is replaced with the default one when Repstance is updated.

 
On this page