Register a device

Golioth allows you to bring your own device and securely use device services. When starting from scratch there are two things you need to do first so that Golioth knows about a device:

  • Create a project
  • Provision the device

Create a Project#

A project is a core concept in Golioth as it is where related devices live and are managed. How a "project" is defined is up to you - it might represent a product and all instances in the field, or a customer or something different entirely.

To create a project, use goliothctl project create command with a --name parameter.

goliothctl project create --name "My first project"

You can list your projects with the list command:

$ goliothctl project list
[ ] id:"my-first-project" name:"My first project"

Provision the Device#

You may add new devices through a process called provisioning. Provisioning securely associates a device and it's credentials with a Project in Golioth.

To provision a device, use goliotctl provision with the following parameters:

goliothctl provision --hwId "DE:AD:BE:EF" \
--name "My first device" \
--credId "deadbeef-id" \
--psk "supersecret"
note

Hardware ID (hwID) & Credential ID (credId) must be globally unique.

Now your device can securely communicate with Golioth and is associated with the your project. You can view more commands to provision devices here.