# Raspberry Pi

Prepare a card image that registers itself on first boot, for units you will not have hands on again.

## Prerequisites

- A [provisioning key](https://docs.shellhub.io/manage/devices/provisioning-keys). Pairing waits for someone to accept each device in the browser, so it does not suit an image
- A reference card you will re-image

## Installing the agent

```bash
$ curl -sSf https://cloud.shellhub.io/install.sh | PROVISIONING_KEY=<your-provisioning-key> INSTALL_METHOD=standalone sh
```

## Removing the device key before imaging

```bash
$ sudo systemctl stop shellhub-agent
$ sudo rm -f /etc/shellhub.key
```

The device key is the identity of the device. An image containing one assigns the same identity to every card written from it.

## Verifying

Write two cards and start both.

Expected result: Two devices appear in the console, each carrying the tags configured on the provisioning key.

## Where to go next

- [Using provisioning keys](https://docs.shellhub.io/manage/devices/provisioning-keys)
- [Yocto project](https://docs.shellhub.io/get-started/install/yocto)
