> For the complete documentation index, see [llms.txt](https://documentation.hak5.org/lan-turtle-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.hak5.org/lan-turtle-hub/upgrading-and-recovery/firmware-updates.md).

# Firmware Updates

## Firmware Updates

From time to time, new firmware may be released for your LAN Turtle Hub.&#x20;

Firmware updates typically include bug fixes, new features, or updated components.

Firmware updates will be announced on the [Hak5 Discord](https://discord.com/invite/hak5), the [Hak5 Product Forums](https://forums.hak5.org/), and can be found on the [Hak5 Download Portal](https://downloads.hak5.org/).

## Checking for Upgrades

<figure><img src="https://1990822252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F378Pamwi1kPq8YWam8pQ%2Fuploads%2FNsPofeKoKyWPANSknIIx%2Fimage.png?alt=media&amp;token=c0cd7523-2240-4af1-880a-14e619fbeadc" alt=""><figcaption><p>Settings page</p></figcaption></figure>

The Settings panel of the LAN Turtle Hub UI contains the firmware update controls.

### Automatic Checking

If your LAN Turtle Hub is online, can access the Internet, and has a proper system time set (via browser sync or via automatic time set over NTP), it can automatically check for firmware upgrades directly.

Click the `Check for Updates` button in the Settings panel, and your device will automatically query the Hak5 Download Portal.

If a new update is available, you will be given the option to download it directly.

If the LAN Turtle Hub is unable to connect to the Hak5 Download Portal directly, you will be offered a link to compare firmware versions and download an upgrade file using your browser.

### Manual Checking

If the LAN Turtle Hub is not online, automatic checking does not succeed, or you would simply prefer to download the firmware manually, firmware images are available from the [Hak5 Download Portal](https://downloads.hak5.org/turtle).&#x20;

<figure><img src="https://1990822252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F378Pamwi1kPq8YWam8pQ%2Fuploads%2Fc7HbVa2p1AYQy3a8Oacp%2Fimage.png?alt=media&amp;token=e0bdd543-3b17-414f-a808-905175f387b1" alt=""><figcaption><p>Local firmware prepared for uploading</p></figcaption></figure>

A locally stored firmware file can be by clicking `Choose Local Firmware File`, selecting the file, and then choosing `Upload Local Firmware & Install`.&#x20;

<figure><img src="https://1990822252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F378Pamwi1kPq8YWam8pQ%2Fuploads%2Flyn1kPG8AtmdpKTPfDvx%2FScreen%20Shot%202024-11-25%20at%2009.24.49.png?alt=media&amp;token=e3c9dd25-5c11-43ab-9acd-a2104a5b4152" alt=""><figcaption><p>Uploading a local firmware file</p></figcaption></figure>

## Updating

Once the firmware upgrade file is transferred to your LAN Turtle Hub (either by downloading it automatically or by uploading a local file), you will be prompted to confirm the upgrade.

<figure><img src="https://1990822252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F378Pamwi1kPq8YWam8pQ%2Fuploads%2FgyJXWaYSRXWysAWBegNb%2Fimage.png?alt=media&amp;token=39131840-c0f4-4843-9e0d-570eeb4673e7" alt=""><figcaption><p>Update confirmation</p></figcaption></figure>

### Data

The LAN Turtle Hub is able to retain the majority of your configuration and data during an upgrade, unless the `Factory Reset during upgrade` option is selected.

Specifically, an upgrade will preserve:

* Cloud C² configurations
* Network and WiFi configurations
* Admin firewall settings
* OpenVPN settings
* Wireguard settings&#x20;
* AutoSSH settings
* SSH identities
* Data and payloads stored in `/root`

If you have made modifications to your LAN Turtle Hub outside of the management UI, or placed files elsewhere on your device, **they will not be saved** during a system upgrade.

If `Factory Reset during upgrade` is selected, the LAN Turtle Hub will perform a full reset of the device.  **All data** will be lost.

### Performing the update

<figure><img src="https://1990822252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F378Pamwi1kPq8YWam8pQ%2Fuploads%2Fe9v0z5zqIyaR0MdPJZz7%2FScreen%20Shot%202024-11-25%20at%2009.25.05.png?alt=media&amp;token=110721ac-0333-4fef-8de6-7cd87c2df9c8" alt=""><figcaption><p>An update in progress</p></figcaption></figure>

It is important to note:  **Once an upgrade has been started it can not be cancelled and the LAN Turtle Hub must not be unplugged until the upgrade is complete**.  Disconnecting your device during an upgrade may render it unusable!

The upgrade process typically takes up to 10 minutes.

During the upgrade process, the device LEDs will flash **red** and **blue**. &#x20;

Once the upgrade process is complete, your device will automatically reboot.  The LEDs will flash green as the device boots and performs maintenance on the flash filesystem.

If you chose `Factory Reset during upgrade` the LAN Turtle Hub will regenerate the SSH identity and other keys, and provision the flash.  This will take several minutes for the first boot, subsequent boots will be faster.

{% hint style="danger" %}
**Never unplug during an upgrade!**

Remember - **never** unplug your LAN Turtle Hub, or the device it is plugged in to, during an upgrade.  Interrupting the upgrade process can break your LAN Turtle Hub!
{% endhint %}

## Firmware Signing

For many companies, firmware signing is implemented to prevent modification of the device by the owner.  In contrast, the LAN Turtle Hub uses firmware signing to simply to ensure that an upgrade file matches the hardware, and that the download of the firmware file completed successfully.

Firmware uploaded via the management UI must be signed by Hak5, and is automatically validated.

If you wish to upload unsigned firmware, you **do so at your own risk** and Hak5 can not guarantee functionality, however the process is simple:

* Upload the firmware to the LAN Turtle Hub using `scp`
* Connect to the LAN Turtle Hub with a `ssh` client
* Move the firmware to `/tmp`.  Firmware files MUST be in `/tmp` for the upgrade process to begin.
* Initiate an upgrade process manually: \
  `root@turtlehub:~# sysupgrade /tmp/custom_firmware.bin`

{% hint style="danger" %}
**Here Be Dragons**

This feature is intended for expert users developing custom firmware.

Under normal operation, **there is no need to ever bypass the firmware signing process**, and no advantage to doing so, however we want to enable expert users interested in using Hak5 hardware in ways we did not anticipate.
{% endhint %}
