Home / Repstance User Guide / INTERACTING WITH REPSTANCE SERVER

INTERACTING WITH REPSTANCE SERVER

A running Repstance server can be reached in three ways: the command line (Command Line Interface (CLI)), a browser (Web User Interface (Web UI)) or your own code (REST API). All three send the same commands to the same server process, described in DATABASE CONFIGURATION COMMANDS, PROCESS CONFIGURATION COMMANDS, PROCESS CONTROL COMMANDS and DATA COMPARISON. CONFIGURE REPLICATION WITH REPSTANCE shows them used together.

Local and remote access

The server listens on three ports:

PortUsed byNeeds the token
8796 (HTTP, only from the server itself)repcli, when it runs directly on the Repstance serverNo
8797 (HTTPS)repcli configured for remote access, and the REST APIYes
3000 (HTTPS)Web User Interface (Web UI)Yes, as the login password

repcli running on the server itself needs no token: it connects to port 8796, and nothing outside the server can reach that port. From any other computer, repcli and the REST API connect to port 8797 and send the token in the header X-Token; see Configure repcli for Remote Access for the repcli configure command and the certificate. The Web UI uses the same token as the password of the user repstance. The token is the parameter token of /opt/repstance/conf/repstance.conf on the server; change it there and restart the services for the new value to take effect (see How to Start Repstance Services).

Choosing an interface

  • Command Line Interface (CLI) (repcli): typed commands, either at a prompt with Tab completion and built-in help (Fully Interactive Mode) or one at a time from a shell or a script (Command Mode). Fastest for ad-hoc work and for scripts that already run commands on the server.
  • Web User Interface (Web UI): a browser. Configure and monitor replication visually, without remembering the parameter names.
  • REST API: JSON over HTTPS. Call Repstance from your own application or automation, from any host that can reach port 8797.