Skip to main content

Installing WiConnector

WiConnector comes in three forms. Each one installs, upgrades, updates and patches with the same file, keeps your configuration and data, and saves a configuration backup before a new version starts.

FormFileFor
Windows setupWiConnector-Setup-<version>-x64.exeWindows 10 / 11, Windows Server 2016 or newer (64-bit)
Linux packagewiconnector-<version>-linux-x64.tar.gz, …-linux-arm64.tar.gzDebian, Ubuntu, Red Hat family; x64 PCs and arm64 gateways (Raspberry Pi 4/5, industrial ARM)
Docker kitwiconnector-<version>-docker.tar.gzAny Linux host with Docker Engine and the compose plugin

Altrex sends you the file for your version, or a link to download it.

Versions: upgrades, updates and patches​

WiConnector versions are MAJOR.MINOR.PATCH, for example 2.4.1.

  • Major upgrade (1.x to 2.0): larger changes. Read the release notes first.
  • Update (2.3 to 2.4): new features.
  • Patch (2.4.0 to 2.4.1): fixes only.

All three install the same way: run the new version's setup over the installed one.

  • Configuration, users, licences, certificates, logs, buffered history values and the history database are kept.
  • A configuration backup of kind Before upgrade is saved first (System Configuration → Backup and restore).
  • Installing an older version over a newer one is refused. To go back, restore the Before upgrade backup after installing the older version (uninstall first, keeping the data).

Windows​

Install​

  1. Run WiConnector-Setup-<version>-x64.exe and accept the administrator prompt.
  2. Select components:
    • WiConnector with the built-in history database (recommended): also installs PostgreSQL 16 with TimescaleDB as a local service.
    • WiConnector only: for history in an external database, or no history.
  3. Ports:
    • Web interface port: default 5080. The setup warns when another program already uses it.
    • History database port: default 5433 (built-in database only; it listens on 127.0.0.1 only).
  4. Additional tasks:
    • Allow the web interface port through Windows Firewall (domain and private networks).
    • Start the WiConnector tray icon when a user signs in.
    • Desktop shortcut.
  5. Install. At the end, open WiConnector in the browser and create the administrator account.

To use the built-in history database, open Historian (System Configuration → Modules → Historian) and choose Built-in. WiConnector then creates its own database login and locks the database's superuser away (see History).

What is installed where​

WhatWhere
Program, tray app, PostgreSQL binariesC:\Program Files\Altrex\WiConnector
Installation settings (port, data folder)C:\Program Files\Altrex\WiConnector\wiconnector.json
Configuration, logs, licences, backupsC:\ProgramData\Altrex\WiConnector\data (administrators only)
History database filesC:\ProgramData\Altrex\WiConnector\database
Setup logsC:\ProgramData\Altrex\WiConnector\install-logs
Windows servicesWiConnector (delayed automatic start, restarts after a failure), WiConnector History Database (WiConnectorDB)

Unattended install​

WiConnector-Setup-1.2.0-x64.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /TYPE=full /PORT=5080 /DBPORT=5433 /TASKS=firewall,trayautostart /LOG=setup.log
  • /TYPE=server installs without the built-in database.
  • Leave out /PORT and /DBPORT on an upgrade to keep the current ports.
  • Exit code 10 means the files were installed but setting up the services failed. The steps are in %TEMP%\WiConnector-install.log and in the setup log (/LOG=); run the setup again after fixing the cause.

The tray icon​

The WiConnector icon in the notification area shows the service state with a coloured dot (green running, red stopped, orange starting or stopping). Double-click it to open WiConnector. Right-click it for:

  • Open WiConnector
  • Start service, Stop service, Restart service
  • Backup and restore:
    • Create backup now
    • Restore backup…: choose a .wcbk file; WiConnector restarts with it
    • Open backups folder
    • Backup page in WiConnector
  • History database: its state, Start database, Stop database (built-in database only)
  • Open logs folder, About WiConnector, Hide tray icon

Starting, stopping, backup and restore ask for administrator approval (the Windows UAC prompt), because they change a Windows service or the protected data folder. The first time a Windows user opens the logs or backups folder from the tray, Windows asks for administrator approval once: the data folder is for administrators only, so the tray gives that user read access to that one folder (not to the configuration). After an upgrade it may ask once more.

Change the port later​

Run the setup of the installed version again (it repairs the installation) and enter the new port. The firewall rule and shortcuts follow.

Uninstall​

Settings → Apps → WiConnector → Uninstall. The uninstaller asks whether to delete the configuration, licences, logs, backups and the history database too. Choose No to keep them: a later installation carries on with them.

Linux​

Install​

tar xzf wiconnector-1.2.0-linux-x64.tar.gz
cd wiconnector-1.2.0-linux-x64
sudo ./install.sh

The installer asks two questions:

  1. Web interface port: default 5080 (or the current one on an upgrade). It warns when the port is in use.
  2. Built-in history database: installs PostgreSQL 16 and TimescaleDB from their official package sources (apt.postgresql.org and packagecloud.io; Debian, Ubuntu, Red Hat, Rocky, AlmaLinux). It listens on 127.0.0.1 only. An existing PostgreSQL 16 is reused; its postgres account is not changed.

Then it creates the wiconnector system user (member of dialout for serial ports), installs the program, registers and starts the wiconnector systemd service and, when ufw or firewalld is active, offers to open the port.

Without questions:

sudo ./install.sh --yes --port 5080 --database # or --no-database
OptionMeaning
--port NWeb interface port
--database / --no-databaseSet up / skip the built-in history database
--no-firewallDo not touch ufw / firewalld
--yesNo questions; defaults and the options given
--allow-downgradeInstall over a newer version

What is installed where​

WhatWhere
Program (self-contained, no .NET runtime needed)/opt/wiconnector
Installation settings (port, data folder, database)/etc/wiconnector/wiconnector.json
Configuration, logs, licences, backups/var/lib/wiconnector
Servicewiconnector.service (user wiconnector, restarts after a failure)
Command/usr/local/bin/wiconnectorctl

The installer rewrites /etc/wiconnector/wiconnector.json on every run. For other settings, use a systemd override: sudo systemctl edit wiconnector and add for example Environment=WiConnector__BackupDir=/srv/backups.

Manage it: wiconnectorctl​

CommandDoes
wiconnectorctl statusService state, version and web address
sudo wiconnectorctl start / stop / restartControls the service
wiconnectorctl logs [-f]Service log from the journal
sudo wiconnectorctl port 8080Changes the web interface port and restarts
sudo wiconnectorctl backup create --note "before line 3"Saves a configuration backup
sudo wiconnectorctl backup listLists the backups
sudo wiconnectorctl backup restore FILE.wcbkRestores a backup and restarts
sudo wiconnectorctl uninstall [--purge]Removes WiConnector

Uninstall​

sudo /opt/wiconnector/uninstall.sh # keeps /etc/wiconnector and /var/lib/wiconnector
sudo /opt/wiconnector/uninstall.sh --purge # also deletes them, and the wiconnector history database and logins

PostgreSQL itself stays installed.

Docker​

Install​

Needs Docker Engine with the compose plugin.

tar xzf wiconnector-1.2.0-docker.tar.gz
cd wiconnector-1.2.0-docker
./install.sh # asks for the web interface port; or: ./install.sh --yes --port 5080

The kit contains the WiConnector image (docker load, so the site needs no internet for it), the compose file and the built-in history database (the timescale/timescaledb image, pulled on first start). install.sh writes .env:

SettingMeaning
WICONNECTOR_VERSIONImage version; set by install.sh
WICONNECTOR_PORTWeb interface port on the host (default 5080)
WICONNECTOR_WS_PORTWebSocket data service port on the host (default 5090)
TZTime zone for logs, e.g. Asia/Kolkata

Data lives in Docker volumes: wiconnector-data (configuration, logs, licences, backups), history-db (history database) and history-secrets (the one-time database start-up password). The database has no port open outside its private network.

Upgrade​

Unpack the new kit and run its install.sh in the folder of the previous installation (or copy the old .env next to it, so the same port is kept). It loads the new image, saves a Before upgrade configuration backup and recreates the WiConnector container; the volumes are kept.

Manage it​

In the kit's folder: docker compose ps, docker compose logs -f server, docker compose restart server, docker compose down (keeps the volumes; down -v deletes them). Backups: System Configuration → Backup and restore in the web interface, or docker compose exec server dotnet WiConnector.Server.dll backup create.

Configuration backup and restore​

See Backup, import and change history.