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.
The server listens on three ports:
| Port | Used by | Needs the token |
|---|---|---|
| 8796 (HTTP, only from the server itself) | repcli, when it runs directly on the Repstance server | No |
| 8797 (HTTPS) | repcli configured for remote access, and the REST API | Yes |
| 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).
Next page:
Command Line Interface (CLI)