> For the complete documentation index, see [llms.txt](https://help.security.gallagher.com/knowledge-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.security.gallagher.com/knowledge-hub/products/cc-software/reference/app-host-and-message-bus.md).

# App Host and Message Bus

Understand the App Host and Message Bus services behind the Command Centre modular platform.

**Applies to:** Command Centre vEL9.40 and later (Message Bus) · vEL9.50 and later (App Host; compatible with vEL9.40 for out-of-band installation where required)

The App Host and Message Bus are two Windows services on the Command Centre Server. Together they are the foundation of Command Centre's modular platform.

### Why they exist

* Command Centre has shipped as one large application on a long release cadence.
* Gallagher is moving to a modular platform, so capabilities can be delivered as independent modules and released more frequently.
* The App Host and Message Bus are the foundations: a common place for modules to be hosted, and a common way for them to communicate.

The App Host is a key building block in Command Centre's transition toward a modular, distributed system architecture. It runs next-generation Gallagher services alongside the existing application, helping sites modernise their Command Centre deployment without disruption. Both services run entirely in the background and do not require operator interaction.

### Which version introduced each service

| Service     | Windows service name                     | First installed with | Install behaviour                                                                                                                                                                 |
| ----------- | ---------------------------------------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Message Bus | Gallagher Command Centre Message Bus     | vEL9.40              | Installed automatically as part of the Command Centre server installation package from vEL9.40 onwards. No separate installer.                                                    |
| App Host    | Gallagher Command Centre AppHost Service | vEL9.50              | Installed automatically as part of the Command Centre server installation package from vEL9.50 onwards. No separate installer. Compatible with vEL9.40 (see the version history). |

#### App Host version history

| App Host Version | Installed with Command Centre Version | Compatibility    | Changes                             |
| ---------------- | ------------------------------------- | ---------------- | ----------------------------------- |
| 3.1.2            | vEL9.50                               | vEL9.40, vEL9.50 | Initial release                     |
| 3.4.6            | vEL9.50 MR1 onwards                   | vEL9.40, vEL9.50 | Stability fixes and REST API bridge |

#### Message Bus version history

| Message Bus Version | Installed with Command Centre Version | Changes                                                                    |
| ------------------- | ------------------------------------- | -------------------------------------------------------------------------- |
| 0.8.3               | vEL9.40                               | Initial release                                                            |
| 0.9.0               | vEL9.40 MR1                           | <p>FIPS140 compliance<br>Fixed cert issue when Command Centre upgrades</p> |
| 0.9.2               | <p>vEL9.40 MR2 onwards<br>vEL9.50</p> | Update to prevent logging of sensitive data                                |

### How it fits together

![Architecture diagram. A customer-hosted environment holds the Command Centre Client on an operator workstation and the Command Centre Server host machine. On the host, the Command Centre Server (existing application and database), the App Host service (gateway, reverse proxy and permission resolution, hosting Module A and Module B in-process) and the Message Bus service (internal messaging between platform services, TLS encrypted). The client keeps its existing connection to the Command Centre Server and connects to the App Host over HTTPS (TLS) with an operator token; the App Host sends module data to the Command Centre Server; the server and the App Host each connect to the Message Bus over TLS.](https://328339335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6bM8WhlBE9BYizPWJaPN%2Fuploads%2Fgit-blob-d062feb2cd1b5eebb4a5d8504b691c186ae4e3a3%2FTIP-apphost-msgbus-02-figure-1-architecture-edition-1.png?alt=media)

* Both services run on the Command Centre Server and install with Command Centre. They are customer-hosted: they run in your own Command Centre environment, whether that is on your premises, in your data centre or in your own cloud infrastructure, rather than being hosted by Gallagher.
* **App Host** is a single Windows service that currently hosts modules in-process and acts as the gateway. It loads modules, routes Command Centre Client requests, resolves operator permissions, and makes module admin UIs discoverable. Modules are loaded from a directory within its installation folder and run with the privileges of the App Host service account.
* The App Host exposes an HTTPS endpoint on TCP port `8910` that Command Centre Client workstations (and other applications acting for an operator) connect to. Port 8910 must be reachable from Client workstations. The Command Centre installer creates an inbound firewall rule for the App Host, and firewall scoping may need to be reviewed.
* **Message Bus** is a separate Windows service (local, port `8444`, mutually authenticated TLS) for decoupled, subject-based messaging between the Command Centre Service, the App Host and each App Host module. It is built on NATS, an open-source messaging system, and supports high-volume communication while keeping services independent from one another.
* The Command Centre Client connects to the App Host over HTTPS/TLS with a short-lived, Command Centre-signed operator token (ECDSA P-384, default lifetime five minutes, configurable to a maximum of sixty minutes). The client keeps its existing connection to the Command Centre Server.
* Modules store their data in their own schema in the Command Centre database, so it is covered by standard Command Centre backup and disaster recovery.
* Modules are typically packaged with Command Centre. They can also be installed independently of the Command Centre installer, so a module can be released out of band where there is a reason to do so.
* The App Host and Message Bus do not, of themselves, require or establish any connection to a service outside your own environment.

{% hint style="info" %}
In the current App Host a module cannot be restarted on its own. To restart a module, **restart the App Host service**. This restarts every module it hosts.
{% endhint %}

For security, authentication and data handling detail, see the [App Host and Message Bus technical information paper](https://app.gitbook.com/s/eem9HLOjc53n2VxEz3Cq/app-host-and-message-bus-technical-information-paper).

### Install and upgrade

Both services are installed automatically as part of the Command Centre server installation package (the Message Bus from vEL9.40, the App Host from vEL9.50), and upgraded automatically as part of a Command Centre upgrade. No separate installer, upgrade or configuration is required.

After Command Centre installation completes, each service becomes available once its Windows service has started successfully.

{% hint style="warning" %}
Both services **must be running** for Command Centre to run correctly. Stopping either may lead to undefined or unstable system behaviour and/or performance issues.
{% endhint %}

### Service account

Both services are designed to run under a low-privilege Windows account, a standard user account. Each requires:

* The "Log on as a service" right, the only additional right required beyond standard user rights
* No elevated or administrative privileges at runtime

Supported runtime identities:

* **Local Service**, the default if no custom account is selected during the Command Centre installation
* **A custom domain account**, inherited automatically if a custom account is chosen during Command Centre installation

During installation, Command Centre configures all installed services to run under the service account selected in the installer, or the default account if none is specified. It grants the account the permissions each service needs, such as its Command Centre database login, file and registry permissions, and access to the private key of the certificate it uses to authenticate to the Message Bus. After installation, you may change the service account for individual services if your security or operational policies require it. Services do not depend on a shared Windows service account identity, provided each service account has the permissions that service needs.

Gallagher recommends following the principle of least privilege. Make sure any modified service account keeps access to the files, directories, certificates and network resources it needs:

| App Host needs                                   | Message Bus needs                                         |
| ------------------------------------------------ | --------------------------------------------------------- |
| Locations configured in `appsettings.json`       | Locations configured in `MessageBus.conf`                 |
| Log directory (write access)                     | JetStream storage directory (write access)                |
| Machine Certificate Store                        | Log directory (write access)                              |
| Application Host Service (access to private key) | Machine Certificate Store                                 |
|                                                  | Gallagher Message Bus certificate (access to private key) |

Service-account guidance is also covered in the Command Centre Hardening Guide.

### Message Bus storage

To support reliable delivery, the Message Bus retains messages on disk (using NATS JetStream) under `%ProgramData%\Gallagher\Message Bus\Command Centre`. Under normal operation the volume is small, because messages are removed once every subscriber has received them. Storage use can grow in some circumstances, for example if a subscribing service is stopped or cannot process messages.

{% hint style="warning" %}
Retained messages are stored **unencrypted at the application level**. Protect them with full-disk encryption, as recommended in the Command Centre Hardening Guide, and monitor free space on the server's system volume.
{% endhint %}

### Events

The App Host generates no events. The Message Bus can raise the events below.

{% hint style="warning" %}
Contact Gallagher Technical Support if any of these events occur.
{% endhint %}

| Event                       | Message                                   | Explanation                                                                                                                                                                                                                                  | Group               | Generated by   |
| --------------------------- | ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | -------------- |
| System Error Detected       | System error detected                     | A single message sent through the Message Bus could not be processed and has been moved to a protected 'poisoned' queue.                                                                                                                     | Message Bus Warning | Command Centre |
| System Error Flood          | Multiple system errors have been detected | A high number of message failures occurred within a short time period. Rather than raising many individual events, they are grouped together. This event remains active until no further failures are encountered for a predefined interval. | Message Bus Error   | Command Centre |
| System Error Flood (Ceased) | System errors have ceased                 | Enough time has passed without encountering failed messages that the previously raised flood condition has ended.                                                                                                                            | Message Bus Event   | Command Centre |

To find log files, raise the log level or check installed versions, see [Find App Host and Message Bus logs and versions](https://help.security.gallagher.com/knowledge-hub/products/cc-software/troubleshoot/command-centre-diagnostic-logs/find-app-host-and-message-bus-logs-and-versions.md).

### Changing the server name

On Command Centre 9.40 and later, renaming the server needs extra steps because of these two services: their certificates hold `localhost` and the server IP addresses present when each service was installed, not a new host name. See [Changing the Command Centre server name](https://help.security.gallagher.com/knowledge-hub/products/cc-software/configure/server-configuration/server-changing-the-command-centre-ser.md).

### Where it is heading

* A gradual migration. Existing functionality keeps working while capabilities move onto the platform over time.
* Future direction: process-level isolation of modules, independent per-module supervision and restart, and running multiple instances of a module across multiple machines, with the gateway as a separate component that routes and load-balances across them.

Today, scale and availability are those of the single Command Centre Server. None of this is in the current release. It is a direction, not a commitment to any capability or timeframe.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.security.gallagher.com/knowledge-hub/products/cc-software/reference/app-host-and-message-bus.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
