Installation
RAVAS provides two Windows installation programs for the RAVAS Central Server:
RCS-Setup.exe, the initial installer: installs the .NET hosting bundle, PostgreSQL with TimescaleDB and the server.RCS-Update.exe, the update installer: contains only the server and the .NET hosting bundle, and updates an existing installation.
Both are self-contained executables, so nothing has to be installed beforehand to run them.
The installers can be found on SharePoint.
Prerequisites
- A 64-bit (x64) computer running at least Windows 10 or Windows Server 2019.
- Administrator rights. The installer asks for elevation when started.
- About 1.5 GB of free disk space for the installed files, plus room for the database, which grows with the collected data (see Data retention).
- TCP port 5432 must be free: make sure there is no existing & running installation of PostgreSQL, or any other application that would block it.
An internet connection is not needed.
If the PostgreSQL service fails to start during or after the installation, install the Microsoft Visual C++ Redistributable for Visual Studio (x64) and run the installer again.
Components
The initial installer includes the following prerequisites and components:
.NET 10 hosting bundle: runtime required by the serverPostgreSQL 18binaries: database used by the serverTimescaleDBbinaries: PostgreSQL extension for efficient time-based data storage and queryingRAVAS Central Serverbinaries: the server application itself, including the web interface
The update installer only includes the .NET hosting bundle and the server.
Network ports
| Port | Protocol | Direction | Used for |
|---|---|---|---|
| 7080 | TCP | inbound | Web interface and REST API (configurable) |
| 5555 | TCP | inbound | RDC server, receives weights from indicators in RDC mode (configurable in Settings) |
| 49111 | UDP | broadcast out and replies in | Discovery of RedBox scales |
| 30718 | UDP | broadcast out and replies in | Discovery of ASCII scales |
| 51001 | UDP | inbound | Answers requests from the network looking for the server |
| 10001 | TCP | outbound | Connections to ASCII scales |
| 49112 | TCP | outbound | Connections to RedBox scales |
| 5432 | TCP | local only | PostgreSQL. The server connects to it on localhost; it is not reachable from the network |
The installer adds a Windows Firewall rule named RAVAS Central Server that allows all inbound traffic to the server program, which covers the inbound ports above. Firewalls elsewhere on the network, between the scales and the server, have to allow them too.
Running the installer
Run RCS-Setup.exe as administrator. It works in a console window and asks for input only when needed:
- if PostgreSQL is already installed, whether to skip reinstalling it (default: yes);
- if a step fails, whether to retry it after fixing the cause;
- at the end, to press any key to close the window.
Options (both installers):
--unattended: never prompt. An existing PostgreSQL installation is kept, and a failing step fails the installation instead of offering a retry.--allow-downgrade: install even if the installed version is newer.
For example, from an elevated Command Prompt:
RCS-Setup.exe --unattended
Every run writes a log to C:\ProgramData\RAVAS\install-<yyyyMMdd-HHmmss>.log.
The installer exits with one of these codes:
| Code | Meaning |
|---|---|
0 |
Success |
3010 |
Success, but Windows must be restarted to finish installing the .NET hosting bundle |
1 |
Failure, see the log |
2 |
Invalid arguments |
What the installer does
- Installs the .NET hosting bundle.
- Extracts PostgreSQL and TimescaleDB and, on a new installation, creates the database with a random password for the PostgreSQL
postgresuser. The password is stored in the database connection string inserver\appsettings.Production.json, which only SYSTEM and Administrators can read. Existing installations keep their password, except installations from before version 1.0 that still use the old default passwordpostgres: the update replaces it with a random one. - Registers PostgreSQL as the Windows service
PostgreSQL, listening on port 5432. - Extracts the server and registers it as the Windows service
Ravas.CentralServer(display nameRAVAS Central Server). The service depends on thePostgreSQLservice, starts automatically (delayed start) and is restarted when it fails: after 5 seconds, 30 seconds and 60 seconds, with the failure count reset after one day. - Adds the
RAVAS Central ServerWindows Firewall rule. - Starts the server and checks that it is still running 10 seconds later.
Once the installation is done, continue with Getting started.
Important directories
The following paths are used for the installation:
C:\Program Files\RAVAS\Central Server: the server and database binaries are both extracted heredatabase\pgsql: the PostgreSQL binaries and the executable used by thePostgreSQLWindows serviceserver: the server binaries and the executable used by theRavas.CentralServerWindows service, along with:appsettings.jsonandappsettings.Production.json: configuration files, see Server configurationlicense.key: the encrypted license, see Activationlogs: application log filesinstalled-version.txt: the installed version
server.prev: the previous version of the server, kept after an update
C:\ProgramData\RAVASserver-postgres-data: the database itself, along with any extensions and databackups: database backups made before each updateinstall-<timestamp>.log: installer logs
It isn't strictly required for the folders to be empty, but it is recommended: if some application is already using a file in the folder, there is a high possibility for the installation to fail. A non-empty server-postgres-data folder that does not contain a database is moved aside to server-postgres-data.incomplete-<timestamp> before the database is created.
Updating
Run RCS-Update.exe (or RCS-Setup.exe) as administrator on the computer where the server is installed. An update:
- refuses to run if the installed version is newer, unless
--allow-downgradeis given; - stops the
Ravas.CentralServerservice; - backs up the database with
pg_dumptoC:\ProgramData\RAVAS\backups\ravas_rcs-<yyyyMMdd-HHmmss>.dump(readable only by SYSTEM and Administrators), before the new version can change the database; - renames the
serverfolder toserver.prev(replacing an olderserver.prev), extracts the new version into a cleanserverfolder and moveslicense.key,logsandappsettings.Production.jsonover fromserver.prev; - starts the service and checks that it keeps running.
If anything after stopping the service fails, the previous files are moved back from server.prev, the previous version is started again and the installer exits with code 1. The database is never restored automatically: if the new version already changed it and the previous version does not work with it, restore the backup as described in Restoring a backup.
Settings changed in appsettings.json are lost on an update, because the file is replaced. Keep your own settings in appsettings.Production.json.
RCS-Setup.exe does not upgrade PostgreSQL to a new major version. If the existing database belongs to a different major version than the bundled PostgreSQL 18 (installations made with the earlier installer use PostgreSQL 17), the installer leaves PostgreSQL as it is and only updates the server.
In case of any errors during installation (file locks, system shutdown) the installer can simply be re-run after resolving the issue.
Uninstalling
There is no uninstaller. To remove the server, run the following from an elevated Command Prompt. The services can only be deleted with sc.exe, not from services.msc.
sc.exe stop Ravas.CentralServer
sc.exe delete Ravas.CentralServer
sc.exe stop PostgreSQL
sc.exe delete PostgreSQL
netsh advfirewall firewall delete rule name="RAVAS Central Server"
Then delete the folders:
C:\Program Files\RAVAS\Central Server: this folder also contains all application logs, configuration files and the license key.C:\ProgramData\RAVAS: this folder contains the database with all persisted data and user accounts, the backups made before updates and the installer logs.
Warning
Deleting C:\ProgramData\RAVAS permanently removes all data. Back up the database first if it may be needed again.
The .NET hosting bundle stays installed. Remove it from the list of installed apps in Windows if no other software needs it.