# Installation

The ObX installer streamlines the installation process of various server components within the ObX platform by enabling users to install them with a single click. However, prior to installation, certain hardware and software prerequisites must be met to ensure smooth deployment.

{% hint style="danger" %}
Before you install any ObX components, make sure you don't have any existing ObX components installed on your machine. [Uninstall ](/obx-r3-manual/installation/uninstalling.md)all existing components first.
{% endhint %}

## ObX Components

The ObX platform comprises five distinct components, serving as fundamental elements for constructing a comprehensive ObX platform tailored for efficiently executing data collection, historicization, and visualization across various processes. Among these components, four function as server-side components, while one operates as a client-side component.

| Component Name  | Component Type | Description                                                                                                                        |
| --------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| ObX Historian   | Server         | This is where all our datasources are stored, archived and maintained.                                                             |
| ObX WebUI       | Server         | Web based applications for dashboarding, reports and alerting.                                                                     |
| ObX Collector   | Server         | Provides functionality for collection of data from various sources such as MQTT, modbus and opcua. It has data buffering features. |
| ObX Sound Alert | Server         | Provides functionality of audible alarm when alarm condition is triggered in WebUI.                                                |
| Excel Addin     | Client         | An excel addin to easily generated dynamic templated report in excel.                                                              |

{% hint style="info" %}
Server components must be installed on a PC or server computer to enable it to provide services or resources to other devices on a network. In contrast, client components do not require installation and typically access the services provided by servers over the network.
{% endhint %}

## Hardware Pre-requisites

Although ObX is capable of functioning on low-end hardware configurations, the following specifications are advised for optimal performance in a production environment. However, for testing purposes, any available hardware specifications can be utilized with ObX.

{% hint style="info" %}
For testing or production setup, you can also install ObX on a Virtual machine (VMware or VirtualBox)
{% endhint %}

### Recommended Hardware Specification

For production environment

* Processor: Intel Xeon, i5 or more
* Memory (RAM): 8GB or more
* Disk: 100 GB or more SSD/HDD
* Operation System: Any Windows client or server OS

## Software  Pre-requisites

The ObX components rely on various communication ports to function correctly. It is essential that these ports remain unobstructed and accessible for the proper operation of the components. Depending on where you deploy the ObX components, ensure that the specified ports are available and unoccupied.

| ObX Component |      Port     |             Description             |
| :-----------: | :-----------: | :---------------------------------: |
| ObX Collector |      1881     | Port for access the UI of collector |
| ObX Historian |   8086, 8088  |     Database ports for historian    |
| ObX Historian |      5050     |               API port              |
|   ObX WebUI   | 443, 4545, 80 |             Web UI ports            |
|   ObX-sound   |      1880     |           For sound alarm           |

{% hint style="warning" %}
Disable the Internet Information Services (IIS) as it conflicts with the WebUI component.
{% endhint %}

## Installation Type

The choice of installation method for the ObX Platform depends on how you plan to configure it. If you're a system integrator, you should already be aware of the installation type specified in your functional design specification (FDS).

It is advantageous to have a clear understanding of the setup you intend to deploy. Below, you'll find various installation types along with concise descriptions.

### Standalone&#x20;

All ObX's server components are installed on a single computer.

{% hint style="info" %}
This configuration requires no additional setup after installation. However, due to the presence of the ObX collector alongside the ObX historian, data buffering in the ObX collector will be disabled. Please take this into consideration.
{% endhint %}

<figure><img src="/files/8sJqfg5Zu1gOZFUSw17l" alt=""><figcaption><p>Standalone</p></figcaption></figure>

### Enhanced Standalone

In contrast to the standalone configuration where the ObX collector and ObX historian are co-located, this setup involves installing the ObX collector on a separate server. This arrangement enables data buffering in instances of network interruptions or downtime of the ObX historian, ensuring continuous data capture and storage capability.

<figure><img src="/files/leK6c1QXxkJ9dc6l7Iiu" alt=""><figcaption><p>Enhanced Standalone</p></figcaption></figure>

{% hint style="info" %}
The good thing about this setup is you can also put a firewall in between so you can add some layer of security between the two servers or networks.

And of course, it free-ups computing resources on different machines, rather than installing all components on a single computer.
{% endhint %}

<figure><img src="/files/IoNkHZCfKg8o2pLvcYjN" alt=""><figcaption><p>Enhanced Standalone with Firewall</p></figcaption></figure>

### Dedicated

All server components of ObX are installed on a dedicated computer server.

<figure><img src="/files/xUbC5XXMXcrkwdvwEMKu" alt=""><figcaption><p>Dedicated</p></figcaption></figure>

{% hint style="info" %}
It gives you the same benefit of Enhanced standalone, but with added layer of security by putting two (2) firewalls. With this setup, giving you more security and highly compliant to Purdue model [ISA-95](https://en.wikipedia.org/wiki/ANSI/ISA-95#:~:text=ANSI%2FISA%2D95%2C%20or,been%20developed%20for%20global%20manufacturers.) philosophy.
{% endhint %}

<figure><img src="/files/K1IVV5OXXmHT87wD1IoY" alt=""><figcaption><p>Dedicated with two(2) Firewall</p></figcaption></figure>

## Step-by-Step&#x20;

Once you have considered all [hardware](#hardware-pre-requisites) and [software](#software-pre-requisites) pre-requisites, and [installation type](#installation-type) you may now install the ObX's Server components.

<details>

<summary>Installing ObX Historian component</summary>

1. Make sure no other applications are running on the computer.
2. Right-click on the installer and **Run as administrator.**
3. Click next until you see the selection of ObX components to install.
4. Select the **ObX historian** component to install on your server.
5. Accept and check the terms and conditions.
6. Select the directory where to install the ObX component you have selected on step 2. If ask to create the folder just simply select **Yes.**
7. Click **Start** to install the component and wait for it to finish.

</details>

<figure><img src="/files/nSCdUMdyjODDpn0oadWw" alt=""><figcaption><p>Installing ObX Historian</p></figcaption></figure>

{% hint style="warning" %}
When installing ObX historian, the installer will automatically restart the computer, so make sure to save all your works before installing it.
{% endhint %}

<details>

<summary>Installing ObX WebUI Component</summary>

1. Make sure no other applications are running on the computer.
2. Right-click on the installer and **Run as administrator.**
3. Click next until you see the selection of ObX components to install.
4. Select the **ObX WebUI** component to install on your server.
5. Accept and check the terms and condition.
6. Select the directory where to install the ObX component you have selected on step 2. If ask to create the folder just simply select **Yes.**
7. Click **Start** to install the component and wait for it to finish.

</details>

<figure><img src="/files/TTItEQ2uYrEZ8kHzf4X3" alt=""><figcaption><p>Installing ObX WebUI</p></figcaption></figure>

<details>

<summary>Installing ObX Collector Component</summary>

1. Make sure no other applications are running on the computer.
2. Right-click on the installer and **Run as administrator.**
3. Click next until you see the selection of ObX components to install.
4. Select the **ObX Collector** component to install on your server.
5. Accept and check the terms and condition.
6. Select the directory where to install the ObX component you have selected on step 2. If ask to create the folder just simply select **Yes.**
7. Click **Start** to install the component and wait for it to finish.

</details>

<figure><img src="/files/8peCOhTkWAUbokF7aqAX" alt=""><figcaption><p>Installing ObX Collector</p></figcaption></figure>

## Post installation check

Ensure that all post-installation checks are conducted to verify the absence of any issues following the installation of ObX components.

### Check ObX Services

There are multiple services that should be running automatically when we installed the ObX components. Depends on what ObX components did you install, below are the services that we need to check per component installed.

| Service Name   | Description             | Component     |
| -------------- | ----------------------- | ------------- |
| obx-db1        | Historian service       | ObX Historian |
| obx-node1      | Backend service         | ObX Historian |
| obx-ui9        | Frontend service        | ObX WebUI     |
| obx-rp         | Web server              | ObX WebUI     |
| obx-collector3 | ObX Collector service   | ObX Collector |
| obx-sound      | ObX Sound Alarm service | ObX Sound     |

<details>

<summary>Using ObX Admin Tool</summary>

The ObX administration tool offers various sets of engineering utilities for the convenient management of the ObX platform. It is automatically deployed alongside the ObX historian component during installation.

1. Go to Desktop and run the **ObX Admin Tool** by double-clicking it.
2. On the left side tab, expand the **Services** and make sure all services related to ObX is up and running.

</details>

{% hint style="warning" %}
Upon accessing the ObX Administration tool with a demo license, a notification will prompt, indicating the current license type as a demo license. To proceed, simply acknowledge the notification by clicking the "OK" button.
{% endhint %}

<figure><img src="/files/howGWScm4nZpFWC8WJyt" alt=""><figcaption><p>Using ObX Admin Tool</p></figcaption></figure>

<details>

<summary>Using Window Services Tool</summary>

If the ObX admin Tool is inaccessible on your server (for instance, if you install the ObX collector or WebUI on a different machine), it will only be present where the ObX historian is installed. Consequently, in such scenarios, you can utilize the native Windows built-in tool instead.

1. On your keyboard, press **CTRL+R,** this opens up the run services.
2. **type** in the window `services.msc` and press enter.
3. This will open the windows service tool, and look for services related to ObX.
4. Make sure all the services are up and with status running.

</details>

<figure><img src="/files/GAQFhdDTJrMtfoVXfiCE" alt=""><figcaption><p>Using built-in Window Service Tool</p></figcaption></figure>

{% hint style="warning" %}
If for some reasons, if either of the components is not running, please make sure that there are no conflicting port numbers on your computer. Please see [here ](#software-pre-requisites)for the required port number used by different ObX components. Make sure these ports are FREE before the installation of ObX components.

If the issue persist, please email or contact **<henjoe@obxhistorian.com>** for FREE support.
{% endhint %}

### Setting Domain for WebUI Components

The domain configuration within the WebUI components serves as the central access point for all WebUI clients to reach the Dashboards. It is crucial to configure this aspect meticulously to ensure that all associated links, such as those embedded in email alerts, public dashboards, shared dashboards, etc., are accurately aligned with the specifications set for the domain.

{% hint style="info" %}
All links sent by the WebUI components will be based on the following:\
`https://{your_domain_config}`

By default, the domain is set to `localhost`, this is okay when in test mode, but in production mode, you have to set this to IP or the domain (if it is in Cloud deployment) of the computer hosting the WebUI component.
{% endhint %}

1. Open File Explorer and Go to -> WebUI component installation path. Make sure you know where you install the WebUI component. default installation path is `C:\ObX\WebUI`
2. Go to folder -> `ui9` -> `conf` , and open the `custom.ini` file using your preferred text editor.
3. In the custom.ini file, look for configuration related to `domain`, it is located under the `[server]` section.

<figure><img src="/files/2I8wXWuSCpBbqXgeroMG" alt=""><figcaption><p>Server section -> domain</p></figcaption></figure>

4. Change the `localhost` value of domain to either of the following:

   `IP address` - The ip address of the computer hosting the computer. e.g. (192.168.1.23), make sure that the ip you will input here is the ip accessible to all WebUI clients.

   `Domain` - If the WebUI component is deployed on cloud where most likely you have specific domain associated to it. e.g. (obxdomain.com)
5. Click `Save` once finished and **Restart** the `obx-ui9` component services in the ObX Admin Tool to take effect the changes.

<figure><img src="/files/sMfK2y3jLCwnkHxhoSdZ" alt=""><figcaption><p>Sample domain configuration using IP Address</p></figcaption></figure>

<figure><img src="/files/APWykkJupAnuP4hsM7bA" alt=""><figcaption><p>Sample domain configuration using domain.</p></figcaption></figure>

### Edit Historian Instance config file

The default configuration of the Historian instance in the config file restricts access to the local machine only, as it assumes that the initial installation is intended for standalone use. However, when the ObX WebUI and ObX Historian are deployed on separate machines, additional configuration is necessary to ensure seamless communication between the ObX Excel add-in and the ObX historian.

{% hint style="warning" %}
This work is **NOT** necessary anymore when the ObX WebUI and ObX historian is on the same computer.
{% endhint %}

1. Go to the computer where ObX WebUI installed.
2. From the computer, goto -> installation path folder of the ObX WebUI (default: C:\ObX\WebUI)
3. From the Folder, Go to -> `rp` -> `conf`, and open the `nginx.conf` file using your preferred text editor.
4. From the file, look for the config related to upstream db.

```
 upstream db {
    server 127.0.0.1:8086;
}
```

5. From the file, edit the 127.0.0.1:8086 to -> {{IP\_address of computer hosting the ObX historian component}}:8086
6. Then just save the file.
7. [Restart](/obx-r3-manual/installation/installation.md#check-obx-services) the **obx-rp** services in the ObX Admin tool to take effect.

<figure><img src="/files/9x4wUPgf2nQvCGnYq0rI" alt=""><figcaption><p>Example configuration  where ObX historian IP is 172.17.1.16</p></figcaption></figure>

{% hint style="warning" %}
Make sure that you have input the correct and valid IP address of the ObX historian, failure to do so, the configuration will NOT work.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://obx-organization.gitbook.io/obx-r3-manual/installation/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
