interface OPCUAServerOptions {
    allowAnonymous?: boolean;
    alternateEndpoints?: OPCUAServerEndpointOptions[];
    alternateHostname?: string | string[];
    buildInfo?: {
        buildDate?: Date;
        buildNumber?: string;
        manufacturerName?: string;
        productName?: string;
        productUri?: null | string;
        softwareVersion?: string;
    };
    capabilitiesForMDNS?: string[];
    certificateFile?: string;
    defaultSecureTokenLifetime?: number;
    disableDiscovery?: boolean;
    discoveryServerEndpointUrl?: string;
    endpoints?: OPCUAServerEndpointOptions[];
    host?: string;
    hostname?: string;
    isAuditing?: boolean;
    maxAllowedSessionNumber?: number;
    maxConnectionsPerEndpoint?: number;
    nodeset_filename?: string | string[];
    onCreateMonitoredItem?: CreateMonitoredItemHook;
    onDeleteMonitoredItem?: DeleteMonitoredItemHook;
    port?: number;
    privateKeyFile?: string;
    registerServerMethod?: RegisterServerMethod;
    resourcePath?: string;
    securityModes?: MessageSecurityMode[];
    securityPolicies?: SecurityPolicy[];
    serverCapabilities?: Partial<IServerCapabilities>;
    serverCertificateManager?: OPCUACertificateManager;
    serverInfo?: ApplicationDescriptionOptions;
    skipOwnNamespace?: boolean;
    timeout?: number;
    transportSettings?: IServerTransportSettings;
    userCertificateManager?: OPCUACertificateManager;
    userManager?: UserManagerOptions;
}

Hierarchy (view full)

Properties

allowAnonymous?: boolean

tells if the server default endpoints should allow anonymous connection.

true
alternateEndpoints?: OPCUAServerEndpointOptions[]
alternateHostname?: string | string[]

alternate hostname or IP to use

buildInfo?: {
    buildDate?: Date;
    buildNumber?: string;
    manufacturerName?: string;
    productName?: string;
    productUri?: null | string;
    softwareVersion?: string;
}
capabilitiesForMDNS?: string[]

supported server capabilities for the Multicast (mDNS)

["NA"]
the possible values are any of node-opcua-discovery.serverCapabilities)
certificateFile?: string

the server certificate full path filename

the certificate should be in PEM format

defaultSecureTokenLifetime?: number

the default secure token life time in ms.

disableDiscovery?: boolean

true, if discovery service on secure channel shall be disabled

discoveryServerEndpointUrl?: string
"opc.tcp://localhost:4840"]
host?: string

Host IP address or hostname where the TCP server listens for connections. If omitted, defaults to listening on all network interfaces:

  • Unspecified IPv6 address (::) if IPv6 is available,
  • Unspecified IPv4 address (0.0.0.0) otherwise. Use this to bind the server to a specific interface or IP.
hostname?: string

the primary hostname of the endpoint.

getFullyQualifiedDomainName()
isAuditing?: boolean

if server shall raise AuditingEvent

true
maxAllowedSessionNumber?: number

the maximum number of simultaneous sessions allowed.

10

use serverCapabilities: { maxSessions: } instead

maxConnectionsPerEndpoint?: number

the maximum number authorized simultaneous connections per endpoint

10
nodeset_filename?: string | string[]

the nodeset.xml file(s) to load

node-opcua comes with pre-installed node-set files that can be used

example:

import { nodesets } from "node-opcua-nodesets";
const server = new OPCUAServer({
nodeset_filename: [
nodesets.standard,
nodesets.di,
nodesets.adi,
nodesets.machinery,
],
});
onCreateMonitoredItem?: CreateMonitoredItemHook
onDeleteMonitoredItem?: DeleteMonitoredItemHook
port?: number

the TCP port to listen to.

26543
privateKeyFile?: string

the server private key full path filename

This file should contains the private key that has been used to generate the server certificate file.

the private key should be in PEM format

registerServerMethod?: RegisterServerMethod

strategy used by the server to declare itself to a discovery server

  • HIDDEN: the server doesn't expose itself to the external world
  • MDNS: the server publish itself to the mDNS Multicast network directly
  • LDS: the server registers itself to the LDS or LDS-ME (Local Discovery Server)
.HIDDEN - by default the server
will not register itself to the local discovery server
resourcePath?: string

resource Path is a string added at the end of the url such as "/UA/Server"

securityModes?: MessageSecurityMode[]

the possible security mode that the server will expose

[MessageSecurityMode.None, MessageSecurityMode.Sign, MessageSecurityMode.SignAndEncrypt]
securityPolicies?: SecurityPolicy[]

the possible security policies that the server will expose

[SecurityPolicy.None, SecurityPolicy.Basic128Rsa15, SecurityPolicy.Basic256Sha256, SecurityPolicy.Aes128_Sha256_RsaOaep, SecurityPolicy.Aes256_Sha256_RsaPss  ]
serverCapabilities?: Partial<IServerCapabilities>
serverCertificateManager?: OPCUACertificateManager

Server Certificate Manager

this certificate manager will be used by the server to access and store certificates from the connecting clients

the server Info

this object contains the value that will populate the Root/ObjectS/Server/ServerInfo OPCUA object in the address space.

skipOwnNamespace?: boolean

skipOwnNamespace to true, if you don't want the server to create a dedicated namespace for its own (namespace=1). Use this flag if you intend to load the server own namespace from an external source.

false
timeout?: number

the HEL/ACK transaction timeout in ms.

Use a large value ( i.e 15000 ms) for slow connections or embedded devices.

10000
transportSettings?: IServerTransportSettings
userCertificateManager?: OPCUACertificateManager

user Certificate Manager this certificate manager holds the X509 certificates used by client that uses X509 certificate token to impersonate a user

userManager?: UserManagerOptions

an object that implements user authentication methods