> For the complete documentation index, see [llms.txt](https://wiki.datadike.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.datadike.com/sonar/get-started/first-device.md).

# Onboard your first device

From an empty console to a first device online: create a client and a site, generate the agent installer, run it, and confirm the device reports.

## What this is and when to use it

A device appears in SONAR once the agent is installed on it, and the agent is always installed into a **site** of a **client**. This page takes you through the whole path once — client, site, installer, installation, verification — so that you know each screen before you deploy agents at scale.

## Before you start

* A SONAR user whose role grants **Manage Clients** and **Manage Sites** (to create the client and site), **Install Agents** (to generate the installer) and **List Agents** (to see the device in Sysadmin). If your role is limited to some clients, a client you create is added to your role's **Allowed Clients**.
* One computer running a supported version of Windows, Linux or macOS, and an account with administrator rights on it (root on Linux and macOS). See [Endpoint requirements](https://wiki.datadike.com/sonar/deploy-operate/requirements.md).
* That computer can open outbound HTTPS connections on port 443 to your SONAR addresses. See [Network requirements](https://wiki.datadike.com/sonar/deploy-operate/network-requirements.md).

## Steps

1. Open **Management › Create › Client**.
2. In **Name**, type the client's name, for example `CLIENT-A`.
3. In **Default first site**, type the name of its first site, for example `SITE-01`, and click **Save**. The client and its site are created together.
4. To add more sites later, open **Management › Create › Site**, choose the **Client**, type the **Name**, and save.
5. Open **Agents › Install Agent**. The **Add an agent** window opens.
6. Choose the **Client** and the **Site** the device belongs to.
7. Choose the **Operating system**, the **Agent type** — **Workstation** or **Server** — and the **Architecture** of the computer.
8. On Windows, review the **Optional features** and choose the **Installation method**. **Dynamic (.exe)** is the simplest.
9. Leave **Enable token expiration (hours)** off for a first test, or turn it on and set how many hours the installer stays valid.
10. Click the button at the bottom of the window — for example **Download Windows installer (.exe)** — and take the file or the command to the computer.
11. Run the installer on the computer with administrator rights. The steps for each system are in [Install the agent on Windows](https://wiki.datadike.com/sonar/deploy-operate/install-agent-windows.md), [Install the agent on Linux](https://wiki.datadike.com/sonar/deploy-operate/install-agent-linux.md) and [Install the agent on macOS](https://wiki.datadike.com/sonar/deploy-operate/install-agent-macos.md).
12. In the console, open **Dashboard › Sysadmin** and click the card of your client in the **Clients overview**.
13. Find the device by its hostname, or type it in **Search devices...**, and select the row.

{% hint style="info" %}
If the console has no client at all yet, opening **Dashboard › Sysadmin** shows **Initial Setup** instead of the Clients overview. It creates the first client and site in one form: fill in **Add Client** and **Add Site**, choose the **Default timezone for agents**, and click **Finish**. Then continue from step 5.
{% endhint %}

## What you should see

* After **Save**, the message `CLIENT-A was added`, and the client appears as a card in the **Clients overview**. A site added on its own returns `Site SITE-02 was added!`.
* With **Dynamic (.exe)**, a message that the installer for your client and site will now be downloaded, whether it expires, and that no command line arguments are needed. The file is named after the client, the site, the agent type and the architecture, for example `sonar-clienta-SITE-01-workstation-amd64.exe`.
* With the other methods, a script to download or a command to copy.
* In Sysadmin, the client card counts one device, and the device list shows a row for the new computer.

## How to verify it worked

In **Dashboard › Sysadmin**, on the device's row:

* **Agent Status** shows **ONLINE**.
* **Last Response** shows a time from the last minute or two, and **First Seen** shows when the agent registered.
* **Client**, **Site** and **Type** match what you chose in the installer.

Select the row. On the device panel's **Home** tab:

* the bar at the top shows **Online** and, once the remote access agent has connected, **Remote Online**;
* **Hardware Details** is filled in — model, processor, operating system, memory, network — within a few minutes of the installation. On Linux and macOS, fields the system does not report show `Not available`.

Then open **Reports & Audits › Audits**: there is an **Agent Install** entry for the device's hostname.

On the computer itself, the agent service is running: **Sonar Agent Service** (`sonarrmm`) on Windows, `sonaragent` on Linux and macOS.

The **Home** dashboard counts the new device within a few minutes, when its figures are next recalculated.

## Common errors

| Symptom                                                                                                                    | Cause                                                                     | Fix                                                                                                                                                                                               |
| -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Create** › **Client**, **Install Agent** or **New Agent** is greyed out with `You don't have permission for this action` | The role lacks **Manage Clients**, **Manage Sites** or **Install Agents** | Ask an administrator to grant the permission in **Admin Center › Roles**                                                                                                                          |
| `client with this name already exists.`                                                                                    | Client names are unique across the console                                | Choose another name, or add a site to the existing client                                                                                                                                         |
| `Client name cannot contain the \| character` or `Site name cannot contain the \| character`                               | The name contains a vertical bar                                          | Remove the character                                                                                                                                                                              |
| The download button stays disabled                                                                                         | No client or site is selected                                             | Choose both in the **Add an agent** window                                                                                                                                                        |
| `Please enter a valid number of hours`                                                                                     | Token expiration is on with an invalid number of hours                    | Enter a whole number of hours, or turn expiration off                                                                                                                                             |
| `Installer token has expired. Please generate a new one.` on the computer                                                  | The installer was generated with an expiration that has passed            | Generate a new installer                                                                                                                                                                          |
| `Old installer detected` on the computer                                                                                   | The installer was generated before the agents on the server were updated  | Generate a new installer                                                                                                                                                                          |
| `Existing installation found` on a Windows computer                                                                        | The agent is already installed on it                                      | Remove the existing agent first — see [Remove agents](https://wiki.datadike.com/sonar/deploy-operate/remove-agents.md) — then run the installer again                                             |
| The installation finished, but no device appears                                                                           | The computer cannot reach the SONAR addresses on port 443                 | Check [Network requirements](https://wiki.datadike.com/sonar/deploy-operate/network-requirements.md) and [Troubleshoot agents](https://wiki.datadike.com/sonar/deploy-operate/troubleshooting.md) |
| The device appears but shows **Remote Offline**                                                                            | The remote access agent has not connected yet                             | Wait a few minutes; if it stays offline, see [Remote control](https://wiki.datadike.com/sonar/administration/remote-access/remote-control.md)                                                     |

## Field reference

### Create Client

| Field                  | What it does                                                                                             | Accepted values                   | Default   |
| ---------------------- | -------------------------------------------------------------------------------------------------------- | --------------------------------- | --------- |
| **Name**               | The client's name, shown in the tree, the cards and every list                                           | Required. Unique. No vertical bar | —         |
| **Default first site** | The name of the site created together with the client                                                    | Required. No vertical bar         | —         |
| **Custom Fields**      | Values for the client custom fields, when any are defined in **Admin Center › Settings › Custom Fields** | Depends on the field              | Per field |

### Create Site

| Field             | What it does                                            | Accepted values                                     | Default   |
| ----------------- | ------------------------------------------------------- | --------------------------------------------------- | --------- |
| **Client**        | The client the site belongs to                          | An existing client                                  | —         |
| **Name**          | The site's name                                         | Required. Unique within the client. No vertical bar | —         |
| **Custom Fields** | Values for the site custom fields, when any are defined | Depends on the field                                | Per field |

### Add an agent

| Field                                               | What it does                                                                                                                                                                                                                             | Accepted values                                                                                                                            | Default                                |
| --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------- |
| **Client**                                          | The client the new device belongs to                                                                                                                                                                                                     | A client your role allows                                                                                                                  | —                                      |
| **Site**                                            | The site the new device belongs to                                                                                                                                                                                                       | A site of the chosen client                                                                                                                | —                                      |
| **Operating system**                                | The system the installer is built for                                                                                                                                                                                                    | **Windows**, **Linux**, **macOS**                                                                                                          | **Windows**                            |
| **Agent type**                                      | Whether the device is a workstation or a server. Decides which workstation or server automation policy applies to it                                                                                                                     | **Workstation**, **Server**                                                                                                                | **Workstation**                        |
| **Architecture**                                    | The processor architecture of the computer                                                                                                                                                                                               | Windows: **64-bit**, **32-bit**. Linux: **64-bit**, **32-bit**, **ARM 64-bit**, **ARM 32-bit**. macOS: **Intel 64-bit**, **Apple Silicon** | **64-bit** (**Intel 64-bit** on macOS) |
| **Optional features** › **Sessions**                | Windows. Installs the productivity module, which records user activity and enforces access policies                                                                                                                                      | On, off                                                                                                                                    | On                                     |
| **Optional features** › **Geolocation**             | Windows. The device reports its position, shown in the **Location** tab and in **Observability › Geolocation**                                                                                                                           | On, off                                                                                                                                    | On                                     |
| **Optional features** › **Remote access**           | Windows. Turns on Windows Remote Desktop on the computer                                                                                                                                                                                 | On, off                                                                                                                                    | On                                     |
| **Optional features** › **Ping**                    | Windows. Allows the computer to answer ping through the Windows firewall                                                                                                                                                                 | On, off                                                                                                                                    | On                                     |
| **Optional features** › **Disable sleep/hibernate** | Workstations. Turns off sleep and hibernation so the device stays reachable. Applies on Windows                                                                                                                                          | On, off                                                                                                                                    | On                                     |
| **Installation method**                             | Windows. How the installer is delivered: **Dynamic (.exe)**, a ready-to-run installer; **PowerShell**, a script; **Manual**, a command to run yourself. Linux gets an install script (`.sh`) and macOS a command, with no choice to make | **Dynamic (.exe)**, **PowerShell**, **Manual**                                                                                             | **Dynamic (.exe)**                     |
| **Enable token expiration (hours)**                 | Limits how long the installer can register new devices. Off, the installer does not expire                                                                                                                                               | Off, or a number of hours                                                                                                                  | Off; 24 hours when turned on           |

## Related pages

* [Clients and sites](https://wiki.datadike.com/sonar/administration/devices/clients-and-sites.md)
* [Install the agent on Windows](https://wiki.datadike.com/sonar/deploy-operate/install-agent-windows.md)
* [Deploy agents at scale](https://wiki.datadike.com/sonar/deploy-operate/mass-deployment.md)
* [The device list](https://wiki.datadike.com/sonar/administration/devices/device-list.md)
* [Troubleshoot agents](https://wiki.datadike.com/sonar/deploy-operate/troubleshooting.md)
