Skip to content

Installation

RAVAS provides two Windows installers for the Weighing Server. Both are self-contained, so nothing has to be installed beforehand:

  • RWS-Setup.exe installs everything: the .NET 10 hosting bundle, the PostgreSQL 18 database with the TimescaleDB extension, and the server with its web interface.
  • RWS-Update.exe contains only the .NET hosting bundle and the server, and updates an existing installation.

Download them from SharePoint.

Prerequisites

  • A 64-bit (x64) computer with Windows 10 or Windows Server 2019 or later.
  • Administrator rights.
  • About 1.5 GB of free disk space, plus room for the database, which grows with the collected data (see Data retention).
  • TCP port 5432 free: no other PostgreSQL installation or other program may be using it.

No internet connection is needed.

Network ports

Port Protocol Direction Used for
7080 TCP inbound Web interface and REST API
5555 TCP inbound RDC server, weights from indicators in RDC mode
49111 UDP broadcast, replies in Discovering RedBox scales
30718 UDP broadcast, replies in Discovering ASCII scales
51001 UDP inbound Answering programs that look for the server
10001 TCP outbound Connections to ASCII scales
49112 TCP outbound Connections to RedBox scales
5432 TCP local only PostgreSQL

Ports 7080 and 5555 can be changed, see Server configuration and Services.

The installer adds a Windows Firewall rule, RAVAS Weighing Server, that allows all inbound traffic to the server. Firewalls elsewhere on the network, between the scales and the server, must allow these ports too.

Running the installer

Run RWS-Setup.exe as administrator. It runs in a console window and only asks for input when it needs to: whether to keep an existing PostgreSQL installation, and whether to retry a step that failed. When it's done, continue with Getting started.

The installer sets up:

  • PostgreSQL as the Windows service PostgreSQL, with a new database. The database password is generated and stored in server\appsettings.Production.json.
  • The server as the Windows service RAVAS Weighing Server (Ravas.WeighingServer), which starts with Windows and is restarted when it fails.
  • The RAVAS Weighing Server firewall rule.

Both installers take these options:

  • --unattended: never ask. An existing PostgreSQL installation is kept, and a step that fails ends the installation.
  • --allow-downgrade: install even if the installed version is newer.

Each run writes a log to C:\ProgramData\RAVAS\install-<yyyyMMdd-HHmmss>.log and ends with one of these exit codes:

Code Meaning
0 Success
3010 Success, but Windows must restart to finish installing the .NET hosting bundle
1 Failure, see the log
2 Invalid arguments

Important directories

C:\Program Files\RAVAS\Weighing Server:

  • server: the server, with
    • appsettings.json and appsettings.Production.json: its configuration
    • license.key: the activated license
    • logs: its log files
    • installed-version.txt: the installed version
  • server.prev: the previous version, kept after an update
  • database\pgsql: PostgreSQL

C:\ProgramData\RAVAS:

  • server-postgres-data: the database
  • backups: the database backups made before each update
  • install-<timestamp>.log: the installer logs

For a new installation, these folders should be empty or not exist yet: a file that another program has open can make the installation fail.

Updating

Run RWS-Update.exe (or RWS-Setup.exe) as administrator on the server computer. The update:

  1. stops the server;
  2. backs up the database to C:\ProgramData\RAVAS\backups\ravas_rws-<yyyyMMdd-HHmmss>.dump;
  3. moves the current version to server.prev and installs the new one, keeping license.key, logs and appsettings.Production.json;
  4. starts the server and checks that it keeps running.

If the new version doesn't start, the update puts the previous one back and exits with code 1. It doesn't restore the database: if the previous version can't work with it, restore the backup (see Restoring a backup).

appsettings.json is replaced on every update, so keep your own settings in appsettings.Production.json.

If an update fails, for example because a file was locked, fix the cause and run it again.

Uninstalling

There is no uninstaller. Run these from an elevated Command Prompt:

sc.exe stop Ravas.WeighingServer
sc.exe delete Ravas.WeighingServer
sc.exe stop PostgreSQL
sc.exe delete PostgreSQL
netsh advfirewall firewall delete rule name="RAVAS Weighing Server"

Then delete C:\Program Files\RAVAS\Weighing Server (the server, its configuration, logs and license) and C:\ProgramData\RAVAS (the database, the backups 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 installed apps in Windows if nothing else needs it.