Device Key Management

An easy step-by-step walkthrough of Particle CLI commands to BACKUP, RESTORE and CHANGE Keys.

particle keys doctor]

How to Backup/Save your Key:

  1. Place your Photon into DFU mode by holding Mode and tapping Reset, then continue holding Mode for about 3 seconds until the LED starts flashing Yellow.

  2. Run the particle keys save mykey.der command. This will backup the key on your Photon to the Home folder on your computer. You can substitute your own naming convention for the *.der file if you wish.

How to Restore/Load your Key:

  1. Place your Photon into DFU mode by holding Mode and tapping Reset, then continue holding Mode for about 3 seconds until the LED starts flashing Yellow.

  2. Run the particle keys load mykey.der command. This will restore the key you saved previously to your Home directory to your Photon. The file may not necessarily be named mykey.der, substitute whatever you backed it up as previously with the particle keys save command.

How to Change your Key:

If you have physical access to the Photon in question, here's how to change the Key on it. Once you do that you can share the Public key with us and we'll get you up and running again on that Photon. You may not even need to share the key with us if it your Photon connects to the Cloud after following this procedure.

Bare with me for these next steps! This is slightly complicated because of the great security implemented on the Photon.

  1. Before we can start, you're going to want to install the Particle CLI tool to make life easier! Particle CLI

  2. Once the CLI tool is installed the first thing you should do is login to your Particle account. If you do not have an account yet, please set one up at https://build.particle.io/build .

  3. To login on the Particle CLI, run the command particle login and follow the prompts for email and password.

  4. Next we need to get the Device ID of your Photon. Start by putting the Photon into Listening Mode by resetting it, and then holding the Mode button for about 3 seconds until it starts blinking BLUE.

  5. Next run the following command to get the ID of your Photon: particle serial identify. It should reply "Your device id is: xxxxxxxxxxxxxxxxxx". Copy the number down or to your clipboard for later.

  6. View the key commands and example output here for the next steps: particle keys doctor

  7. Place your Photon into DFU mode by holding Mode and tapping Reset, then continue holding Mode for about 3 seconds until the LED starts flashing Yellow.

  8. Run the particle keys doctor xxxxx command, where xxxxx is the device ID you copied just earlier. This will generate a new public/private key pair and automatically download it to your device, and also send the public key up to the Cloud.

  9. If particle keys doctor fails to send the keys to the cloud please contact Particle support.

Congrats, you made it to the end! now your Photon should be connected to the Cloud... or will be just as soon as we add your Key to the server.

For more help join our community forums and post in the troubleshooting section.