# System requirements

> The software, network ports and resources the Proxus hub and its edge gateways need, as set by the Docker Compose stack.

Source: https://proxus.io/docs/get-started/system-requirements

This page lists what the Proxus hub and its edge gateways need to run. It follows the Docker Compose stack
that [Install Proxus with Docker](https://proxus.io/docs/get-started/install) uses. Proxus does not set a minimum machine size:
the memory, processor and disk a hub needs depend on how many values per second it receives and how long you
keep them. [Size the machines](#size-the-machines) shows how to work that out for your site.

## Software

| Component | Needs |
| --- | --- |
| Hub host | Docker Engine with the Docker Compose plugin (`docker compose`). |
| Edge gateway host | Docker Engine for the Docker install, where a remote gateway runs as a container next to a small message server container of its own. [Install an edge gateway](https://proxus.io/docs/connect/edge-gateways/install-a-gateway) describes the options. |
| Users | A current web browser. Nothing is installed on the user's computer. |

The compose file uses these images:

| Service | Image |
| --- | --- |
| `proxus-ui` (the hub) | `proxusplatform/proxus-ui` |
| `proxus-server` (the SYSTEM gateway) | `proxusplatform/proxus-server` |
| `hub-server` (message server) | `nats` (Alpine variant) |
| `postgresql` (configuration database) | `postgres:16` |
| `clickhouse` (historian) | `bitnamilegacy/clickhouse` |

## Network ports

The ports the compose file publishes on the hub host:

| Port | Service | Used for |
| --- | --- | --- |
| `8443` | `proxus-ui` | The hub's web interface over HTTPS. Users need it. |
| `8080` | `proxus-ui` | The hub's web interface over HTTP, for local access. |
| `8083` | `proxus-server` | The SYSTEM gateway's HTTP endpoint (health check, values sent over HTTP). |
| `1883` | `proxus-server` | The SYSTEM gateway's MQTT broker: devices that publish over MQTT, and applications that subscribe to the Unified Namespace. |
| `8883` | `proxus-server` | The same MQTT broker over TLS. |
| `7422` | `hub-server` | Remote edge gateways connect here, over TLS. Open it from every gateway's network to the hub. |
| `4222` | `hub-server` | Message server clients inside the stack, over TLS. |
| `8222` | `hub-server` | The message server's monitoring page. |
| `5442` | `postgresql` | The configuration database. |
| `8123`, `9000`, `9004`, `9005` | `clickhouse` | The historian over HTTP, its native protocol, and its MySQL and PostgreSQL protocols. |

Only `8443` is needed by users, `7422` and `8443` by remote gateways, and `1883` by MQTT devices and subscribers.
Remote gateways also listen on `8883` for MQTT over TLS. The
others can stay closed to the network; [Security hardening](https://proxus.io/docs/operate/security) explains how.
[Network ports](https://proxus.io/docs/reference/ports) lists every port, including those of remote gateways.

## Resources

- **Memory.** The compose file limits the ClickHouse container to 8 GB of memory and gives PostgreSQL 1 GB of
  shared memory. The host needs room for both, plus the hub, the gateway and the message server. On a smaller
  host, lower the ClickHouse limit (see [Docker](https://proxus.io/docs/operate/docker#adjust-the-stack-for-your-site)).
- **Disk for the images.** The first download of the images is about 2 to 3 GB.
- **Disk for the historian.** The historian keeps every value until you set a retention period, so its volume
  grows with your data rate. [Configuration](https://proxus.io/docs/administer/configuration) explains the retention settings.
- **Disk on remote gateways.** A gateway keeps values it cannot deliver to the hub, for 48 hours by default
  (**Buffer Retention (hours)** on the gateway, from 1 to 720). It needs disk for that many hours at its data
  rate. See [How data flows](https://proxus.io/docs/concepts/data-flow).
- **No internet access.** The hub and the gateways run without it. See
  [Install without internet access](https://proxus.io/docs/operate/offline-install).

## Size the machines

The size of a Proxus installation follows from one number: how many values per second (dp/s) your devices
produce. Work it out, check it against the license, then measure the disk on a running system.

### 1. Count the values per second

For each device, divide the number of tags by how often they are read. 600 tags read every second give at most
600 dp/s; 600 tags read every 10 seconds give at most 60 dp/s. Add up the devices of each gateway, and of the
whole site.

A day has 86,400 seconds, so 1,000 dp/s is up to 86.4 million values a day.

### 2. Check the rate against the license

Each gateway may pass on a sustained number of values per second, set by its capacity tier, with a short burst
reserve for peaks. Values above the limit are dropped. If a gateway's devices add up to more than its tier allows,
spread the devices over more gateways or choose a larger tier. [License](https://proxus.io/docs/administer/license) explains the
limits; [Pricing](/pricing) lists the tiers and their rates.

### 3. Measure the disk, then multiply

How much disk a value takes depends on the data: the historian compresses values, and values that change little
compress well. Measure it on your own data instead of guessing.

1. Run the hub with the real devices, or with a representative part of them, for a day.
2. Open **Platform > Database Health**. **Database Summary** shows the size of the stored values on disk.
3. Multiply the growth of one day by the number of days you keep values, and leave free space on top. When the disk
   is full, new values can no longer be stored.

To stop the volume growing without limit, set `[ClickHouse] ClickHouseTTLExpression`, for example to one year.
See [Configuration keys](https://proxus.io/docs/reference/configuration#clickhouse).

### 4. Watch it after go-live

- **Platform > License Info** shows each gateway's **Observed dp/s** against its licensed rate. See
  [Monitoring](https://proxus.io/docs/operate/monitoring).
- **Connect > Edge Gateways** shows the **CPU** and **Memory** each gateway process uses on its machine.
- **Platform > Database Health** shows the free space on the historian's disk.

> **Tip:**
Bring your device and tag counts to a 30-minute technical session and size the hub and gateways with a Proxus
engineer. [Book a demo](/demo)

## Time

The hub and the gateway take their time zone from the `TZ` setting in the compose file. Values are stored in
UTC; the hub shows them in the user's time zone.

## What's next

- [Install Proxus with Docker](https://proxus.io/docs/get-started/install): run the hub on one machine.
- [Network ports](https://proxus.io/docs/reference/ports): every port, including those of remote gateways.
- [Security hardening](https://proxus.io/docs/operate/security): close the ports you do not use and change the default passwords.
