Installation
RAVAS provides two Windows installers for the Weighing Server. Both are self-contained, so nothing has to be installed beforehand:
RWS-Setup.exeinstalls everything: the .NET 10 hosting bundle, the PostgreSQL 18 database with the TimescaleDB extension, and the server with its web interface.RWS-Update.execontains 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 inserver\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 Serverfirewall 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, withappsettings.jsonandappsettings.Production.json: its configurationlicense.key: the activated licenselogs: its log filesinstalled-version.txt: the installed version
server.prev: the previous version, kept after an updatedatabase\pgsql: PostgreSQL
C:\ProgramData\RAVAS:
server-postgres-data: the databasebackups: the database backups made before each updateinstall-<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:
- stops the server;
- backs up the database to
C:\ProgramData\RAVAS\backups\ravas_rws-<yyyyMMdd-HHmmss>.dump; - moves the current version to
server.prevand installs the new one, keepinglicense.key,logsandappsettings.Production.json; - 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.