> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreflux.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Updating Your Coreflux

> Upgrade the broker on Docker, Windows, or Linux. The Coreflux HUB desktop app updates itself.

## When to Update

Update Coreflux when a new release includes fixes or features you need. Check [Release Notes](https://docs.coreflux.org/product-updates/release-notes.md) for what changed in each version. The Coreflux HUB desktop app updates itself.

> [!TIP]
>
> **Keep your project files.** Docker named volumes, package install directories, and manual install folders retain LoT, connectors, and configuration when you upgrade only the broker runtime.

> [!NOTE]
>
> **LoT file names changed.** The files that store your Actions, Models, Connectors and Rules in `bin/` are now `actions.lot`, `models.lot`, `routes.lot` and `rules.lot`. The first start of the new version copies your existing files to these names and leaves the old ones in place, so nothing is lost. If you go back to an earlier version, it reads the old files, which do not contain changes made after the upgrade. If the broker cannot read or write one of these files, it exits with code `78` and names the file; see [Startup options](https://docs.coreflux.org/latest/mqtt-broker/startup-options.md).

***

## Update Coreflux

> [tab] Docker
>
> To run the latest image, stop and remove the existing container, then start a new one with the same `docker run` command from [Installation](https://docs.coreflux.org/latest/quick-start/installation.md). The `--pull=always` flag ensures Docker fetches the newest `latest` tag before each start.
>
> > [!WARNING]
> >
> > **Use your actual names.** The examples below use the default container name `coreflux_broker` and volume `project-volume`. If you chose different names when you first installed, replace them in every command.
>
> **1. Stop and remove the container**
>
> ```bash wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
> docker stop coreflux_broker
> docker rm coreflux_broker
> ```
>
> This stops the broker and removes the container. Named volumes (such as `project-volume`) are **not** deleted—your project files remain on disk.
>
> **2. Start a new container**
>
> Run the same command you used for installation. For the standard setup:
>
> ```bash wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
> docker run --pull=always -d --name coreflux_broker -p 1883:1883 -p 5000:5000 -p 9100:9100 -v project-volume:/etc/project coreflux/coreflux-mqtt-broker:latest
> ```
>
> If you use TLS ports, use the command from the [TLS/SSL accordion on Installation](https://docs.coreflux.org/latest/quick-start/installation.md)—still with `--pull=always`, the same container name, and the same `project-volume` mount.
>
> **3. Verify**
>
> Confirm the broker is up with `curl http://localhost:9100/health`, or subscribe to `$SYS/Coreflux/Version` from an MQTT client. The broker image does **not** include the HUB — if you also run the HUB container, open [Coreflux HUB](https://docs.coreflux.org/hub/overview.md) at `http://localhost:3000`.

> [tab] Docker Compose
>
> Pull the latest images and recreate the stack. Named volumes (`broker-data`, `hub-data`) are kept unless you pass `-v` to `docker compose down`.
>
> **1. Pull and recreate**
>
> From the directory that contains `docker-compose.yml`:
>
> ```bash wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
> docker compose --profile full pull
> docker compose --profile full up -d
> ```
>
> Both services use the `latest` tag, so `docker compose pull` fetches the newest broker and HUB images. See [Installation](https://docs.coreflux.org/latest/quick-start/installation.md) for the Compose file.
>
> **2. Verify**
>
> Open the [Coreflux HUB](https://docs.coreflux.org/hub/overview.md) at `http://localhost:3000` and connect with `mqtt://broker:1883`. Subscribe to `$SYS/Coreflux/Version` in the Data Viewer to confirm the broker version. You can also probe `http://localhost:9100/health`.

> [tab] Cloud Trial
>
> Cloud Trial environments are managed by Coreflux. When an update is available, your trial instance is upgraded on the hosted side—you do not run install or update commands locally.
>
> > [!NOTE]
> >
> > Open the broker from **Coreflux Fleet** at [portal.coreflux.org](https://portal.coreflux.org). If the HUB or an MQTT client fails right after a platform update, wait briefly and reconnect—the broker may still be restarting.
>
> See [Release Notes](https://docs.coreflux.org/product-updates/release-notes.md) for new features you can use once the trial environment is on the latest version.

> [tab] Windows
>
> Update a Windows service install by stopping the service, replacing the executable, and starting it again.
>
> > [!WARNING]
> >
> > **Use your actual service and paths.** Examples use the service name `CorefluxBroker` and install path `C:\Coreflux`. Change these if you registered the service differently—see [Installation](https://docs.coreflux.org/latest/quick-start/installation.md).
>
> **1. Stop the service**
>
> Open Command Prompt **as Administrator** and run:
>
> ```cmd wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
> sc stop CorefluxBroker
> ```
>
> **2. Replace the executable**
>
> Download the latest Windows package from the [Downloads page](https://portal.coreflux.org/downloads), extract it, and copy `CorefluxMQTTBroker.exe` over the file in your install folder (for example `C:\Coreflux`). Do not remove your existing config or project files in that folder.
>
> **3. Start the service**
>
> ```cmd wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
> sc start CorefluxBroker
> sc query CorefluxBroker
> ```

> [tab] Linux
>
> > [!TIP]
> >
> > **\~2 min** if you installed the Linux package from the [Downloads page](https://portal.coreflux.org/downloads) — refresh indexes and upgrade the `coreflux-broker` package.
>
> Use the tab that matches how you installed the broker. See [Installation](https://docs.coreflux.org/latest/quick-start/installation.md) if you still need to add the Coreflux repository.
>
> > [tab] Debian & Ubuntu (APT)
> >
> > **1. Refresh package lists**
> >
> > ```bash wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
> > sudo apt update
> > ```
> >
> > Optional — see which version is installed and what is available:
> >
> > ```bash wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
> > apt-cache policy coreflux-broker
> > ```
> >
> > **2. Upgrade coreflux-broker**
> >
> > ```bash wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
> > sudo apt upgrade coreflux-broker
> > ```
> >
> > To upgrade only the broker without touching other packages:
> >
> > ```bash wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
> > sudo apt install --only-upgrade coreflux-broker
> > ```
> >
> > **3. Verify**
> >
> > The package upgrade restarts `coreflux-broker` via systemd. Confirm it is running:
> >
> > ```bash wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
> > systemctl status coreflux-broker.service
> > ```
> >
> > Subscribe to `$SYS/Coreflux/Version` from an MQTT client, or open [Coreflux HUB](https://docs.coreflux.org/hub/overview.md) if you run it separately.
>
> > [tab] RPM (dnf)
> >
> > **1. Refresh the package cache**
> >
> > ```bash wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
> > sudo dnf makecache --refresh
> > ```
> >
> > Optional — list available versions:
> >
> > ```bash wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
> > dnf list --showduplicates coreflux-broker
> > ```
> >
> > **2. Upgrade coreflux-broker**
> >
> > ```bash wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
> > sudo dnf upgrade coreflux-broker
> > ```
> >
> > **3. Verify**
> >
> > The package upgrade restarts `coreflux-broker` via systemd. Confirm it is running:
> >
> > ```bash wrap theme={"theme":{"light":"css-variables","dark":"css-variables"},"languages":{"custom":["/languages/lot.json"]}}
> > systemctl status coreflux-broker.service
> > ```
> >
> > Subscribe to `$SYS/Coreflux/Version` from an MQTT client, or open [Coreflux HUB](https://docs.coreflux.org/hub/overview.md) if you run it separately.

> [tab] HUB desktop
>
> The Coreflux HUB desktop app updates itself. You choose when to apply the update.
>
> > [!NOTE]
> >
> > A HUB you open in the browser updates when you pull a new container image. Use the **Docker** or **Docker Compose** tab for that.

***

## Next Steps

> [card] [Release Notes](https://docs.coreflux.org/product-updates/release-notes.md)
>
> See what changed in recent releases.

> [card] [Installation](https://docs.coreflux.org/latest/quick-start/installation.md)
>
> Full install commands for every platform.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.