> ## 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 Coreflux on your platform — Docker, Docker Compose, Cloud Trial, DigitalOcean, Windows, or Linux (APT and DNF packages).

## When to Update

Update Coreflux when a new release includes fixes or features you need. Check [Release Notes](/product-updates/release-notes) for what changed in each version.

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

***

## Update Coreflux

**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](/v2.14/quick-start/installation). 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":"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":"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](/v2.14/quick-start/installation)—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](/hub/overview) at `http://localhost:3000`.

**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":"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](/v2.14/quick-start/installation) for the Compose file.

**2. Verify**

Open the [Coreflux HUB](/hub/overview) 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`.

**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]
>
> Continue using the **URL and credentials** from your trial email. If the HUB or MQTT client fails right after a platform update, wait up to 60 seconds and reconnect—the broker may still be restarting.

See [Release Notes](/product-updates/release-notes) for new features you can use once the trial environment is on the latest version.

**DigitalOcean**

Coreflux on a DigitalOcean droplet runs as a **systemd** service. SSH into the droplet and replace the broker binary, then restart the service.

> [!WARNING]
>
> **Use your actual paths and service name.** Marketplace images typically use the `coreflux` systemd unit and install under `/opt/coreflux`. Adjust commands if you changed these during setup.

**1. Connect to the droplet**

```bash wrap theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
ssh root@<your-droplet-ip>
```

**2. Stop the broker**

```bash wrap theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
sudo systemctl stop coreflux
```

**3. Download and replace the binary**

Download the latest Linux build from [coreflux.org/start-for-free](https://www.coreflux.org/start-for-free), extract it, and replace `CorefluxMQTTBroker` in your install directory (for example `/opt/coreflux`). Keep existing configuration and project files in that directory.

**4. Start the broker**

```bash wrap theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
sudo systemctl start coreflux
sudo systemctl status coreflux
```

**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](/v2.14/quick-start/installation).

**1. Stop the service**

Open Command Prompt **as Administrator** and run:

```cmd wrap theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
sc stop CorefluxBroker
```

**2. Replace the executable**

Download the latest Windows zip from [coreflux.org/start-for-free](https://www.coreflux.org/start-for-free), 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":"css-variables","languages":{"custom":["/languages/lot.json"]}}
sc start CorefluxBroker
sc query CorefluxBroker
```

**Linux**

> [!TIP]
>
> **\~2 min** if you installed from [packages.coreflux.org](https://packages.coreflux.org) — refresh indexes and upgrade the `coreflux-broker` package.

Use the tab that matches how you installed the broker. See [Installation](/v2.14/quick-start/installation) if you still need to add the Coreflux repository.

**Debian & Ubuntu (APT)**

**1. Refresh package lists**

```bash wrap theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
sudo apt update
```

Optional — see which version is installed and what is available:

```bash wrap theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
apt-cache policy coreflux-broker
```

**2. Upgrade coreflux-broker**

```bash wrap theme={"theme":"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":"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":"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](/hub/overview) if you run it separately.

**RPM (dnf)**

**1. Refresh the package cache**

```bash wrap theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
sudo dnf makecache --refresh
```

Optional — list available versions:

```bash wrap theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
dnf list --showduplicates coreflux-broker
```

**2. Upgrade coreflux-broker**

```bash wrap theme={"theme":"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":"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](/hub/overview) if you run it separately.

***

## Next Steps

> **[Release Notes](/product-updates/release-notes)**
>
> See what changed in recent releases.

> **[Installation](/v2.14/quick-start/installation)**
>
> Full install commands for every platform.


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