> ## 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 — Cloud Trial, Docker, DigitalOcean, Windows, Linux, or Raspberry Pi.

## When to Update

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

<Tip>
  **Keep your project files.** Docker named volumes and binary install directories retain LoT, routes, and configuration when you stop the broker and replace only the runtime.
</Tip>

***

## Update Coreflux

<Tabs>
  <Tab title="Cloud Trial" icon="sparkles">
    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.
    </Note>

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

  <Tab title="Docker" icon="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](/latest/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.
    </Warning>

    <Steps>
      <Step title="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.
      </Step>

      <Step title="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 8080:8080 -p 8443:8443 -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](/latest/quick-start/installation)—still with `--pull=always`, the same container name, and the same `project-volume` mount.
      </Step>

      <Step title="Verify">
        Open the [Coreflux HUB](/latest/coreflux-hub/overview) at `http://localhost:8080` (or your mapped HTTPS port) and confirm routes and LoT definitions are present. Subscribe to `$SYS/Coreflux/Version` in the Data Viewer to confirm the broker version.
      </Step>
    </Steps>
  </Tab>

  <Tab title="DigitalOcean" icon="cloud">
    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.
    </Warning>

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

      <Step title="Stop the broker">
        ```bash wrap theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
        sudo systemctl stop coreflux
        ```
      </Step>

      <Step title="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.
      </Step>

      <Step title="Start the broker">
        ```bash wrap theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
        sudo systemctl start coreflux
        sudo systemctl status coreflux
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="Windows" icon="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](/latest/quick-start/installation).
    </Warning>

    <Steps>
      <Step title="Stop the service">
        Open Command Prompt **as Administrator** and run:

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

      <Step title="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.
      </Step>

      <Step title="Start the service">
        ```cmd wrap theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
        sc start CorefluxBroker
        sc query CorefluxBroker
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="Linux" icon="linux">
    <Tabs>
      <Tab title="Foreground">
        If you run the broker directly (not as a service):

        <Steps>
          <Step title="Stop the broker">
            Stop the running process (`Ctrl+C` in the terminal where `CorefluxMQTTBroker` is running).
          </Step>

          <Step title="Replace the binary">
            Download the latest Linux zip from [coreflux.org/start-for-free](https://www.coreflux.org/start-for-free), extract it, and replace `CorefluxMQTTBroker` in your install directory. Keep your existing config and project files.
          </Step>

          <Step title="Start the broker">
            ```bash wrap theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
            cd coreflux
            chmod +x CorefluxMQTTBroker
            ./CorefluxMQTTBroker
            ```
          </Step>
        </Steps>
      </Tab>

      <Tab title="systemd service">
        For production installs using systemd (see [Installation](/latest/quick-start/installation)):

        <Warning>
          **Use your actual paths.** Examples assume `WorkingDirectory=/opt/coreflux` and service name `coreflux`. Adjust if your unit file differs.
        </Warning>

        <Steps>
          <Step title="Stop the service">
            ```bash wrap theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
            sudo systemctl stop coreflux
            ```
          </Step>

          <Step title="Replace the binary">
            Download the latest Linux zip from [coreflux.org/start-for-free](https://www.coreflux.org/start-for-free), extract it, and replace `CorefluxMQTTBroker` under your service working directory (for example `/opt/coreflux`).
          </Step>

          <Step title="Start the service">
            ```bash wrap theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
            sudo systemctl start coreflux
            sudo systemctl status coreflux
            ```
          </Step>
        </Steps>
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="Raspberry Pi" icon="raspberry-pi">
    <Tabs>
      <Tab title="Foreground">
        If you run the broker directly (not as a service):

        <Steps>
          <Step title="Stop the broker">
            Stop the running process (`Ctrl+C` in the terminal where `CorefluxMQTTBroker` is running).
          </Step>

          <Step title="Replace the binary">
            Download the latest Raspberry Pi zip from [coreflux.org/start-for-free](https://www.coreflux.org/start-for-free), extract it, and replace `CorefluxMQTTBroker` in your install directory. Keep your existing config and project files.
          </Step>

          <Step title="Start the broker">
            ```bash wrap theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
            cd coreflux
            chmod +x CorefluxMQTTBroker
            ./CorefluxMQTTBroker
            ```
          </Step>
        </Steps>
      </Tab>

      <Tab title="systemd service">
        For production installs using systemd (see [Installation](/latest/quick-start/installation)):

        <Warning>
          **Use your actual paths.** Examples assume `WorkingDirectory=/home/pi/coreflux` and service name `coreflux`. Adjust if your unit file differs.
        </Warning>

        <Steps>
          <Step title="Stop the service">
            ```bash wrap theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
            sudo systemctl stop coreflux
            ```
          </Step>

          <Step title="Replace the binary">
            Download the latest Raspberry Pi zip from [coreflux.org/start-for-free](https://www.coreflux.org/start-for-free), extract it, and replace `CorefluxMQTTBroker` under your service working directory (for example `/home/pi/coreflux`).
          </Step>

          <Step title="Start the service">
            ```bash wrap theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
            sudo systemctl start coreflux
            sudo systemctl status coreflux
            ```
          </Step>
        </Steps>
      </Tab>
    </Tabs>
  </Tab>
</Tabs>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Release Notes" icon="list" href="/latest/product-updates/release-notes">
    See what changed in recent releases.
  </Card>

  <Card title="Installation" icon="download" href="/latest/quick-start/installation">
    Full install commands for every platform.
  </Card>
</CardGroup>
