Skip to main content
Firmngin devices use a keys.h file so firmware can connect as the correct device. This file is generated for a specific device and should be treated as private device credentials. [image:device detail page showing the Keys (keys.h) card and Download File button]

What keys.h is for

keys.h helps your firmware identify itself to Firmngin and open a secure connection. In normal Arduino firmware, the file is placed next to your sketch and included before the Firmngin library starts. You do not need to edit the file manually. Download it from the dashboard, place it in the firmware project, then use it when uploading firmware to the matching device.

Secure connection

All communication between your devices, the dashboard, and Firmngin is encrypted with TLS (the same protection used by HTTPS websites). This keeps device data and commands private while they travel over the internet, and you do not need to set anything up.

How to download keys.h

  1. Open the Firmngin dashboard.
  2. Go to Devices.
  3. Select the device you want to connect.
  4. Find the Keys (keys.h) section.
  5. Click Download File.
  6. Place the downloaded keys.h file next to your Arduino sketch.
DEVICE_ID and DEVICE_KEY come from keys.h, so your sketch never contains the real values. See Installation for the full setup.

Important rules

  • Use the keys.h file only for the device it was downloaded from.
  • Do not reuse one device key across multiple physical devices.
  • Do not paste the file content into support chats, screenshots, documentation, or public examples.
  • Do not commit keys.h to GitHub or any public repository.
  • Store production keys only with the people or systems that need to upload firmware.
  • If you regenerate device credentials, download the new keys.h and upload firmware with the updated file.
If a production keys.h file is exposed, treat that device credential as compromised before using the device again in production.

When you need it

You usually need keys.h when:
  • Uploading firmware for the first time.
  • Moving the firmware project to another computer.
  • Rebuilding firmware after changing the sketch.
  • Preparing a production device before installation.
You do not need to share keys.h with dashboard users who only monitor devices, view logs, manage automations, or review Device Billing activity.

Good practice

Keep example firmware safe by using placeholders in public code. Show where keys.h is included, but never show real device credentials. For teams, keep each device’s file organized by device name or serial number outside the public source code folder. This makes it easier to avoid mixing credentials between devices.