Skip to main content

Quick Start

This guide will help you quickly deploy and use the ThingsGatewayRuntime platform.

The screenshots and configuration notes in this guide are aligned with GatewayRuntime 2.1.22.

Preparation

System Requirements

Operating System

SystemSupported Versions
WindowsWindows 10/11, Windows Server 2016+
LinuxUbuntu 18.04+, CentOS 7+, Debian 10+

Studio Project Workspace

ItemRequirement
Runtime Environment.NET 10.0 SDK (required for project maintenance in Studio)
CPUx64 architecture, 2 cores or more recommended
Memory2GB or more recommended
Storage4GB or more available space recommended
Network Port5100 (Studio Web interface)

GatewayRuntime Runtime

ItemRequirement
Runtime EnvironmentOption 1: .NET 10.0 Runtime deployment
Option 2: Standalone deployment package with no additional .NET Runtime installation required
CPUx64 architecture, 1 core is sufficient to run
MemoryMinimum 256MB, 512MB or more recommended
Storage2GB or more available space recommended
Network Port6100 (Gateway Web interface)
Tip
  • Watchdog provides a Web management interface with default port 6200, which can be accessed via browser at http://<gateway-IP>:6200
  • Gateway Web interface is provided on port 6100 by GatewayRuntime
  • Studio Web interface is provided on port 5100, used for project maintenance and deployment

Studio And Watchdog HTTP IP Login

The packaged Studio and Watchdog hosts listen on 0.0.0.0 and officially support plain http://IP:port access. Studio uses port 5100; Watchdog uses port 6200.

CheckStudioWatchdog
Remote managementRemoteManagementEnabled=trueRemoteManagementEnabled=true
Remote deployment and process controlNot applicableRemoteDeploymentEnabled=true
Plain remote HTTPAllowInsecureRemoteHttp=trueAllowInsecureRemoteHttp=true

The login page automatically obtains a two-minute, one-time RSA-OAEP-SHA256 public-key challenge and encrypts the password before sending it. A plain HTTP IP page does not require crypto.subtle or subtle.importKey. Studio then uses a JWT Bearer; Watchdog uses an eight-hour opaque Bearer session that is revoked on logout and lost after a Watchdog restart.

HTTP security boundary

The password challenge only adds protection to the login or bootstrap password field; it does not replace TLS. Bearer tokens, password-change requests, project packages, backups, and other management traffic are still unencrypted in transit over plain HTTP. Prefer HTTPS on public or untrusted networks.

If localhost works but an IP address does not, verify the 0.0.0.0 listener, the settings above, and the firewall. If the page reports an importKey error, clear browser and proxy caches, redeploy the complete current static assets, and confirm that the dynamically loaded node-forge asset returns HTTP 200.

Install .NET

Recommended Method

Using the Bootstrapper tool can automatically detect the current system platform and download the corresponding .NET installation package, without manual selection.

After running Bootstrapper.exe, select the "Download .NET Runtime" function to automatically complete the download and installation.

Offline Download Script

If you need to download the .NET installation package in advance, you can use the download-packages.ps1 script:

# Download all platforms
.\download-packages.ps1 -OutputPath "./offline-packages"

# Download only the current platform (auto-detect)
.\download-packages.ps1 -CurrentPlatformOnly

# Download for a specific platform
.\download-packages.ps1 -Platform "windows-x64"
.\download-packages.ps1 -Platform "linux-arm64"

Software Deployment

Service Directory Check

Before starting the software, keep the delivered directories complete and confirm the startup program for each service.

DirectoryStartup ProgramDefault Web PortPurpose
WatchDog/ThingsGatewayRuntime.Watchdog.exe or ThingsGatewayRuntime.Watchdog6200Manage gateway process status, project packages, backups, logs, tunnels, and runtime parameters
WatchDog/GatewayApp/Started by Watchdog6100GatewayRuntime Web configuration, data collection, forwarding, alarms, logs, users, roles, scripts, and rules
Studio/ThingsGatewayStudio.exe or ThingsGatewayStudio5100Project management, local runtime control, Watchdog connection, project upload, and project download

Do not move files out of these directories after deployment. If a directory is incomplete, the related Web page or runtime function may fail to start.

Deployment Steps

Windows System Deployment

Step 1: Prepare the Deployment Package

  • Copy the entire build/WatchDog directory to the target device
  • Recommended path: C:\ThingsGateway\ or D:\ThingsGateway\
  • Ensure the directory structure is complete, do not omit any files

Step 2: Check Runtime

  • Open Command Prompt
  • Execute: dotnet --list-runtimes
  • Confirm that .NET 10.0 Runtime is displayed

Step 3: Configure Firewall

  • Open "Windows Defender Firewall"
  • Click "Advanced Settings"
  • Create inbound rules to allow the following ports:
    • 6100 (Gateway runtime Web interface)
    • 6200 (Watchdog Web management interface)
    • Other acquisition ports (as needed)
  • Or temporarily disable the firewall for testing (not recommended for production environments)

Step 4: Start the Service

  • Enter the WatchDog directory
  • Double-click to run ThingsGatewayRuntime.Watchdog.exe
  • Wait for the service to start

Step 5: Verify Deployment

  • Open a browser and visit http://localhost:6100
  • Log in with the default account: admin / 111111
  • Check the gateway runtime status

Linux System Deployment

Step 1: Prepare the Deployment Package

  • Upload the entire build/WatchDog directory to the target device
  • Recommended path: /opt/ThingsGateway/ or /home/user/ThingsGateway/
  • Use scp, sftp, or other file transfer tools

Step 2: Set Execution Permissions

cd /opt/ThingsGateway/WatchDog
chmod +x ThingsGatewayRuntime.Watchdog

Step 3: Configure Firewall

# Using firewalld (CentOS/RHEL)
firewall-cmd --permanent --add-port=6100/tcp
firewall-cmd --permanent --add-port=6200/tcp
firewall-cmd --reload

# Or using ufw (Ubuntu/Debian)
ufw allow 6100/tcp
ufw allow 6200/tcp
ufw reload

Step 4: Start the Service

cd /opt/ThingsGateway/WatchDog
./ThingsGatewayRuntime.Watchdog

Step 5: Verify Deployment

curl http://localhost:6100
# Or access http://<server-IP>:6100 in a browser

Configure as System Service (Linux)

Create a systemd service file:

sudo nano /etc/systemd/system/thingsgateway.service

Watchdog service file content:

[Unit]
Description=ThingsGateway Runtime Watchdog Service
After=network.target

[Service]
Type=simple
User=root
WorkingDirectory=/opt/ThingsGateway/WatchDog
ExecStart=/opt/ThingsGateway/WatchDog/ThingsGatewayRuntime.Watchdog
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

Enable and start the service:

# Reload systemd configuration
sudo systemctl daemon-reload

# Enable auto-start on boot
sudo systemctl enable thingsgateway

# Start the service
sudo systemctl start thingsgateway

# View service status
sudo systemctl status thingsgateway

# View service logs
sudo journalctl -u thingsgateway -f

Configure as System Service (Windows)

Method 1: Using sc command (recommended)

Run PowerShell as administrator:

# Create Watchdog service
sc.exe create "ThingsGateway Watchdog" binPath= "D:\ThingsGateway\WatchDog\ThingsGatewayRuntime.Watchdog.exe" start= auto DisplayName= "ThingsGateway Watchdog Service"

# Create Studio service
sc.exe create "ThingsGateway Studio" binPath= "D:\ThingsGateway\Studio\ThingsGatewayStudio.exe" start= auto DisplayName= "ThingsGateway Studio Service"

# Start services
sc.exe start "ThingsGateway Watchdog"
sc.exe start "ThingsGateway Studio"

# View service status
sc.exe query "ThingsGateway Watchdog"
sc.exe query "ThingsGateway Studio"

Service management commands:

# Stop services
sc.exe stop "ThingsGateway Watchdog"
sc.exe stop "ThingsGateway Studio"

# Delete services
sc.exe delete "ThingsGateway Watchdog"
sc.exe delete "ThingsGateway Studio"


Studio Service Configuration (Linux)

If you need to configure Studio as a Linux system service:

sudo nano /etc/systemd/system/thingsgateway-studio.service

Studio service file content:

[Unit]
Description=ThingsGateway Studio Service
After=network.target

[Service]
Type=simple
User=root
WorkingDirectory=/opt/ThingsGateway/Studio
ExecStart=/opt/ThingsGateway/Studio/ThingsGatewayStudio
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

Enable and start the Studio service:

sudo systemctl daemon-reload
sudo systemctl enable thingsgateway-studio
sudo systemctl start thingsgateway-studio
sudo systemctl status thingsgateway-studio

Starting the Software

Software Components

The ThingsGateway platform includes the following core components:

ComponentPortFunction Description
Studio5100Provides project management, local runtime control, Watchdog connection, and remote deployment
GatewayRuntime6100Provides data collection, protocol conversion, scripts, rules, alarms, logs, and permission management
Watchdog6200Watchdog service, responsible for process management, health check, auto-restart, and project management
Important Note
  • Studio is used for project management, local runtime control, Watchdog connection, and remote deployment
  • GatewayRuntime provides gateway configuration and daily runtime operation functions, including data collection, forwarding, scripts, nodes, alarms, logs, and permissions

Accessing the Web Interface

Access Addresses:

ComponentAddressPurpose
Studiohttp://<Studio-server-IP>:5100Project management and deployment verification
GatewayRuntimehttp://<gateway-IP>:6100Production runtime
Watchdoghttp://<gateway-IP>:6200Watchdog management

Access Steps:

StepOperationDescription
1Open browserChrome, Edge, etc.
2Enter addresshttp://<Studio-server-IP>:5100, http://<gateway-IP>:6100, or http://<gateway-IP>:6200
3Enter username and passwordDefault: admin / 111111
4Click loginEnter the system

Login pages:

GatewayRuntime login page

Studio login page


Login Page

Login Modes

The system supports two login modes:

ModeDescriptionApplicable Scenarios
Studio LoginConnect to the Studio workspace (only supported by Studio Web)Project configuration and management
Gateway LoginDirectly connect to gateway runtime (only supported by Gateway Web interface)Production environment, standalone deployment
Tip

Studio Web, GatewayRuntime Web, and Watchdog Web are separate entry points. Open the address that matches the task you want to perform.

Login Configuration

Studio Login

FieldDescriptionValidation Rules
UsernameLogin account, default is admin3-20 characters
PasswordLogin password, default is 1111116-20 characters
Remember PasswordWhen checked, username and password will be auto-filled on next login-
Remember ConnectionWhen checked, gateway connection address will be auto-filled on next login-

Gateway Login

FieldDescriptionValidation Rules
IP AddressIP address of the gateway runtimeRequired, valid IP format (e.g., 192.168.1.100)
PortPort number of the gateway runtime1-65535, default 6100
UsernameLogin account, default is admin3-20 characters
PasswordLogin password, default is 1111116-20 characters
Remember PasswordWhen checked, username and password will be auto-filled on next login-
Remember ConnectionWhen checked, gateway connection address will be auto-filled on next login-

Standalone Gateway Login

In a standalone gateway deployment, the login page displays the gateway login form directly:

  • Hide the Studio login option
  • Directly connect to the gateway runtime
  • Suitable for standalone deployment in production environments
Tip

Use the standalone gateway login when you only need to maintain GatewayRuntime on the target device and do not need to enter Studio.

Default Login Credentials:

ItemValue
Usernameadmin
Password111111
Security Tip

After logging in for the first time, please change the default password immediately to ensure system security.

OAuth2 Login

The Gateway Web interface supports OAuth2 third-party login (such as GitHub, etc.). The specific supported external authentication services are determined by the system configuration.

Login Flow:

  1. Click the OAuth2 provider button on the login page
  2. Redirect to the third-party authentication page for authorization
  3. After successful authorization, callback to the gateway to automatically complete login
  4. Redirect to the gateway workspace

Demo Mode:

When the system is configured in Demo mode, the login page hides the username/password login form and only displays OAuth2 login options.


Initial Configuration After First Login

After logging in successfully, it is recommended to complete the following initial configuration:

StepConfiguration ItemDescription
1Change default passwordGo to user management to change the admin user password
2Check system statusView the system running status on the homepage
3Configure acquisition channelGo to data management, add a channel and select an acquisition plugin (such as Modbus, S7, etc.), and configure communication parameters
4Add deviceAdd a new device under the channel, set the device address and acquisition interval
5Configure variablesAdd new variables under the device, set the register address and data type
6Verify acquisitionEnable auto-refresh to check whether variable values are updating normally
7Configure business channelAdd a new business channel (such as MQTT, Kafka, etc.) to forward acquired data to external systems

After login, check the overview pages first:

GatewayRuntime overview page

Studio overview page


Next Steps

After completing the Quick Start, you can continue to explore the following features:

  • Data Management - Learn more about channel, device, and variable configuration
  • Alarm Management - Configure alarm rules and notifications
  • Rule Engine - Use visual flow orchestration for business logic
  • Script Management - Maintain and validate project scripts
  • Studio Usage - Manage projects, Watchdog connections, uploads, downloads, and local runtime control