webserver.js Setup

Set up webserver.js as the web server backend for your WinCC OA project, including the manager entry and basic configuration.

Before setting up webserver.js, ensure the following prerequisites are met:

webserver.js serves as a backend for the WinCC OA Dashboard and web applications. The following sections describe how to add the manager entry and configure the server for your project.

  1. Open the WinCC OA Console.
  2. Add a JavaScript Manager to your project.

    In the Console, add a new manager with the following settings:

    • Manager type: node
    • Script: webserver-js/run.js

    Additional parameters must be placed before the script path. For example:

    -num 4 webserver-js/run.js
  3. Configure the [webserverjs] section in your project configuration file.

    Add a [webserverjs] section to your project config file. The default HTTPS port is 8443. To use a different port, specify it explicitly:

    [webserverjs]
    httpsPort = 8443

    The default port is 8443. This port is different from the default port of webclient_http.ctl, so both can run in parallel without port conflicts.

  4. Start the JavaScript Manager.

    Start or restart the manager from the Console. Once running, access the Dashboard by navigating to https://<hostname>:8443 in a web browser.

webserver.js is now running and serving the WinCC OA Dashboard. You can verify by opening the configured URL in a web browser.

Migration from Older Components

If you are migrating from an existing dashboard.ctl or HTTP Server setup, note the following changes:

Table 1. Migration from dashboard.ctl / HTTP Server to webserver.js
Setting dashboard.ctl (old) webserver.js (new)
Manager type WCCOActrl node
Script dashboard.ctl webserver-js/run.js
Config section (WSS) [wssServer] [webserverjs]
Config section (Dashboard) [httpServer] [webserverjs]
Default port 8448 8443
Parameter position After script name Before script path

The following example shows the required changes in the config/progs file.

Before (dashboard.ctl):

WCCOActrl        | always |      30 |        3 |        1 |webclient_http.ctl -num 2
WCCOActrl        | always |      30 |        3 |        1 |dashboard.ctl

After (webserver.js):

WCCOActrl        | always |      30 |        3 |        1 |webclient_http.ctl -num 2
node             | always |      30 |        3 |        1 |webserver-js/run.js
Note:
The CTRL manager running webclient_http.ctl is still required for ULC UX forwarding and other purposes not covered by webserver.js. Do not remove it. It is possible to run both managers in parallel as long as they use different port numbers.