.fw files — ZIP-based archives that carry a cryptographic signature alongside the filesystem image. Before a device applies an update, it verifies the signature against a trusted public key registered with NervesHub. This end-to-end signing chain ensures that no untrusted firmware can be installed on your devices, even if your update infrastructure is compromised.
A firmware entry’s UUID is derived from the content of the
.fw file. Uploading the same binary twice produces the same UUID, and NervesHub will skip the upload on the second attempt. This makes CI pipelines idempotent — re-running a failed upload job is always safe.Build Firmware
Build your Nerves firmware with the standard Mix workflow. SetMIX_TARGET to your hardware target before running mix firmware:
.fw file is written to ./_build/${MIX_TARGET}_dev/nerves/images/my_project.fw by default. Adjust the path to match your application name and MIX_ENV.
Create a Signing Key
If you have not yet created a signing key for your product, create one now. Thenh key create command generates a signing keypair and registers the public key with NervesHub:
Sign Firmware
You can sign a firmware file independently of uploading it — useful when the signing step runs on a separate secure host or HSM, and the resulting signed file is then passed to a build or deployment system:.fw archive in place. The signing key’s private key material must be accessible to the host running this command.
Upload Firmware
Upload a firmware file to NervesHub. The CLI signs the firmware with your registered key before uploading:List and Inspect Firmware
List all firmware binaries uploaded to the current product:Download and Delete Firmware
Download a firmware binary to inspect it locally or re-sign it with a different key:CI/CD Pattern
Automate firmware builds and uploads in your CI/CD pipeline using environment variables. The example below builds firmware and uploads it, optionally shipping it to a named deployment group in a single command:NERVES_HUB_TOKEN is a personal access token or CI token generated in the NervesCloud UI under Account → API Tokens. Store it as a protected secret in your CI/CD system — never commit it to source control.
The --deploy flag creates a release against the existing deployment group named "production" with the newly uploaded firmware, combining the upload and rollout steps into one command.
