# Installation

{% hint style="warning" %}
Only install CLI if you need to make a connection from the device to another device directly (Initiator connection). Most of the time you need a [device package](https://docs.remote.it/introduction/get-started/platforms-and-packages#device-package) or the [Desktop Application](https://remote.it/downloads). &#x20;

At this time Windows single board for IoT devices does not have a device package and you should install the CLI.
{% endhint %}

{% hint style="info" %}
The remote.it CLI has slightly different behavior if you are running as a root user versus a non-root user. In general, you will want to run as a root user,  though there are a couple cases where you don't.  These will be made clear.

* On Windows, you will need to open a "Command Prompt" as an Administrator and replace any example you see as `sudo remoteit` by `remoteit.exe`
* On Mac and Linux, you must run any commands related to creating/managing a Device or Services as a root user (e.g. `sudo`)
* OpenWRT is not available at this time
  {% endhint %}

## Quick Install & Registration

This quick install allows you to just paste a single command into the terminal of the target device. You must have the Desktop App or access to <https://app.remote.it> installed and a remote.it account created before proceeding.

{% hint style="warning" %}
Quick install only is available for Linux based systems such as Debian, Raspberry Pi OS, MacOS, and Linux at this time. If you have Windows, please refer to [manual installation ](#manual-installation)below.&#x20;

The quick install script tries to determine the correct CLI package to download based on your system architecture. It then downloads the CLI package, installs it, and registers it to your account. You can do the same with the manual install instructions below as long as you pick the right CLI package to download and install.
{% endhint %}

### 1. Open the remote.it Desktop App or <https://app.remote.it>

If using the desktop app, it must be version 3.5.2 or greater.&#x20;

### 2. Ensure that you are in the context of the account you wish to register the device. See [Organizations as Members](https://link.remote.it/support/organization-as-members)

### 3. Click add device, select your system, then copy the code.

<figure><img src="https://413684331-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LUSyCxfB8Qr7Kz5eeQu%2Fuploads%2FhlTCBgE9DiPyAAJsXDhj%2FRemote_It_Application.png?alt=media&#x26;token=f347e537-b8e3-472e-bed3-433c221db877" alt=""><figcaption></figcaption></figure>

### 4. Use the code in command to install the CLI

This command will automatically detect the platform and architecture of your device. It will install the CLI, register it to your account and set up the SSH service.&#x20;

{% hint style="info" %}
Replace YOUR-REGISTRATION-CODE with the registration code you copied from the Remote.It Add Device Page.
{% endhint %}

{% code overflow="wrap" lineNumbers="true" %}

```sh
R3_REGISTRATION_CODE="YOUR-REGISTRATION-CODE" sh -c "$(curl -L https://downloads.remote.it/cli/install_cli.sh)"
```

{% endcode %}

{% hint style="warning" %}
Devices are registered using the Host name of the device. You can add a variable to the command to override this before you run the command by adding the following before the the R3\_REGISTRATION\_CODE plus a space.

R3\_DEVICE\_NAME="Your device name"

Otherwise, you can rename the device after in the RemoteIt Desktop, app.remote.it or Mobile application. [See documentation on devices and Editing Device Name](https://link.remote.it/support/device-rename)
{% endhint %}

Your new device should register to your account and it is ready for use. [See Usage.](https://docs.remote.it/developer-tools/cli-usage)

If you have issues with registration, we want to hear from you. Please post on our community at [forum.remote.it](https://forum.remote.it)&#x20;

## Manual Installation

We recommend using the quick install method above since it will download the package and install it automatically. You can use this method if you prefer to select the package and install it manually.

### 1. Download the Binary

Download the binary for the platform and Architecture/Distribution to the device. Find the binaries here: <https://link.remote.it/download/cli>

Please be sure to download the correct package for your device.

### 2. Run commands

{% tabs %}
{% tab title="Debian/Linux/Raspberry Pi OS" %}
Place the file in /usr/bin and rename to "remoteit"

You will need to change permissions on the file to make it executable by opening Terminal

```
sudo chmod +x /usr/bin/remoteit
```

After placing the binary and making it executable, you will need to install the agent using the following command

<pre><code><strong>sudo remoteit install
</strong></code></pre>

You can now start using CLI. See [Usage](https://docs.remote.it/developer-tools/cli-usage) for **registration** and connection information
{% endtab %}

{% tab title="MacOS" %}
Place the file in /usr/local/bin and rename to "remoteit"

You will need to change permissions on the file to make it executable by opening Terminal

```
sudo chmod +x /usr/local/bin/remoteit
```

After placing the binary and making it executable, you will need to install the agent using the following command

```
sudo remoteit install
```

You can now start using CLI. See [Usage](https://docs.remote.it/developer-tools/cli-usage) for registration and connection information
{% endtab %}

{% tab title="Windows" %}
Place the file in your drive which has "Program Files" typically your "C" drive and rename to "remoteit.exe"

You will need to update your PATH environmental variables to add the full path to the exe. e.g. C:\Program Files\remoteit.exe

You will need to install the agent using the following command as an Administrator in command line

```
remoteit install
```

You can now start using CLI. See [Usage](https://docs.remote.it/developer-tools/cli-usage) for registration and connection information
{% endtab %}
{% endtabs %}
