On this page
Windows deployment
The Watchdog package includes TGateway. Verify a foreground launch from the complete directory before installing a Windows service. Do not run both instances together.
Prepare the installation
- Select Watchdog in Downloads and choose the package matching your Windows architecture.
- Install .NET 10 Runtime for that architecture. Use
dotnet --list-runtimesto check forMicrosoft.NETCore.App 10.x. - Extract the entire package into a permanent location, such as
D:\TGateway\WatchDog. KeepTGateway.Watchdog.exe,appsettings.json,GatewayApp, and all other bundled files. - Give the runtime account read, execute, and data-write access. Do not run from a temporary extraction folder or download cache.
Gateway reference requirements are at least 512 MB RAM, preferably 1 GB or more, and 8 GB or more storage. Allocate additional space for the required log, history, and offline-cache retention; see Environment setup.
Foreground launch
Open a normal PowerShell or Windows Terminal and substitute your installation directory:
Set-Location 'D:\TGateway\WatchDog'
.\TGateway.Watchdog.exeThe current programs inherit the launching account’s privileges; foreground startup does not require administrator rights. Grant directory, serial-device, or site-specific permissions to that account as needed. Elevate the terminal when installing the system service.
Leave the window open. Visit http://localhost:6200, confirm the gateway is running on the Watchdog dashboard, and then open http://localhost:6100. Follow Start and sign in for credentials and workspace identification.
After local access works, test from another computer using the host IP. Check listeners and Windows Firewall if remote access fails. Web and device-protocol ports are separate checks.
Install the Windows service
End the foreground Watchdog with Ctrl+C and wait for it to exit. Open PowerShell as administrator:
$watchdogExe = 'D:\TGateway\WatchDog\TGateway.Watchdog.exe'
sc.exe create TGatewayWatchdog binPath= "`"$watchdogExe`"" start= auto DisplayName= "TGateway Watchdog"
sc.exe start TGatewayWatchdog
sc.exe query TGatewayWatchdog
Get-Service TGatewayWatchdogExpect RUNNING from sc.exe query and Running from Get-Service. Reopen both Web pages. A running service does not establish that device data is correct.
This example uses LocalSystem by default. To use a dedicated account, configure Services → TGateway Watchdog → Properties → Log On and grant that account access to the installation, project data, and required devices. A service cannot rely on drive mappings from another user’s interactive session.
Watchdog uses its own program directory and the adjacent GatewayApp. If you move the installation, update the executable path in the service registration.
Logs and service management
| Location | Purpose |
|---|---|
| Watchdog Web Logs | Process startup, health checks, and project operations |
Logs/Watchdog/ | Default Watchdog file logs, relative to its installation |
GatewayApp/Logs/XTrace/ | Default gateway process logs; the gateway logging configuration is authoritative |
| Windows Event Viewer | System and Application events for service startup failures |
Run service controls only within an appropriate maintenance window:
sc.exe stop TGatewayWatchdog
sc.exe start TGatewayWatchdog
sc.exe query TGatewayWatchdogAfter arranging shutdown and backup, unregister the service with:
sc.exe stop TGatewayWatchdog
sc.exe delete TGatewayWatchdogUnregistering does not delete the installation or project data. Wait for the process to exit before replacing files.
Update and recovery
For gateway program updates, prefer Studio’s batch gateway update. Select the correct platform, then check both the version and business data.
When updating the Watchdog host or moving the complete installation:
- Create a Watchdog backup and download it elsewhere.
- Record service path, account, and ports. Stop the service in a maintenance window.
- Preserve a copy of the stopped installation, including
appsettings.json,GatewayApp,CurrentProject,Projects, andBackups. Do not copy only a SQLite main file while the gateway is writing. - Follow the release instructions to replace programs while preserving site configuration and data. Do not overwrite site databases with initial databases from the new package.
- Start the service and verify Watchdog state, Runtime version, active project, a known variable, and new data at the actual destination. If recovery is required, retain logs before restoring the saved installation and original service path.
Startup problems
| Symptom | Check and recovery |
|---|---|
Missing .NET runtime | Match runtime version and process architecture, install it, then restart |
Access is denied | Identify the failing file or device and grant access to the actual service account |
| Address already in use | Check for simultaneous foreground and service instances; do not terminate an unidentified process |
| Service immediately stops | Read file logs and Event Viewer, then stop the service and launch in the foreground to inspect the full error |
| Web works but device reads fail | Follow collection diagnosis for the actual protocol path |
See Troubleshooting for other symptoms.