> For the complete documentation index, see [llms.txt](https://docs.remote.it/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.remote.it/software/cli/overview.md).

# CLI Installation

Install and register the Remote.It CLI on Linux, Raspberry Pi OS, macOS and Windows using the quick install command or a manual package download.

{% hint style="warning" %}
Install the CLI only if this device needs to **initiate** connections to other devices. In most cases, a [Device Package](/introduction/get-started/platforms-and-packages.md#available-packages-at-a-glance) or the [Desktop Application](https://remote.it/downloads) is the better choice. See [CLI](/software/cli.md) for help deciding.

Windows IoT single-board devices don't have a Device Package yet, so use the CLI on those devices.
{% endhint %}

## Before you begin

You'll need:

* A Remote.It account
* Access to the [Remote.It web portal](https://app.remote.it) or the latest [Desktop Application](https://remote.it/downloads)
* Administrator (root) access on the device you're installing on

{% hint style="info" %}
**Run CLI commands with administrator privileges.** The CLI behaves differently for root and non-root users. You'll usually want root, and the few exceptions are noted where they apply.

* **Linux and macOS:** Run any command that creates or manages a device or its services as root, using `sudo`.
* **Windows:** Open Command Prompt as an Administrator. Wherever an example shows `sudo remoteit`, use `remoteit.exe` instead.
* **OpenWrt:** The CLI isn't available for OpenWrt at this time.
  {% endhint %}

## Quick install and registration

Quick install is the recommended method. You paste one command into the device's terminal, and it downloads the CLI, installs it, and registers the device to your account.

{% hint style="warning" %}
Quick install is available for Linux (Debian, Raspberry Pi OS, and other distributions) and macOS. For Windows, use [Manual installation](#manual-installation).
{% endhint %}

{% stepper %}
{% step %}

### Open Remote.It

Open the [Desktop Application](https://remote.it/downloads) or the web portal at [app.remote.it](https://app.remote.it).
{% endstep %}

{% step %}

### Switch to the right account

Make sure you're working in the account you want to register the device to. If you belong to an organization, see [Organizations as Members](https://link.remote.it/support/organization-as-members).
{% endstep %}

{% step %}

### Copy your registration code

Click **Add Device**, select your device's operating system, and copy the registration 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&amp;token=f347e537-b8e3-472e-bed3-433c221db877" alt="The Add Device screen in the Remote.It Desktop app showing the registration code to copy"><figcaption><p>Copy the registration code from the Add Device screen.</p></figcaption></figure>
{% endstep %}

{% step %}

### Run the install command on the device

In the device's terminal, run the command below, replacing `YOUR-REGISTRATION-CODE` with the code you copied.

The script detects the device's platform and architecture, installs the matching CLI package, registers the device to your account, and sets up an SSH service.

{% 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="info" %}
**Setting the device name:** By default, the device registers under its hostname. To choose a different name, add `R3_DEVICE_NAME` to the start of the command, followed by a space:

{% code overflow="wrap" %}

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

{% endcode %}

You can also rename the device later in the Desktop Application, at app.remote.it, or in the mobile app. See [Editing a device name](https://link.remote.it/support/device-rename).
{% endhint %}
{% endstep %}
{% endstepper %}

The device is now registered to your account and ready to use. See [CLI Usage](/developer-tools/cli-usage.md) for what to do next.

If registration doesn't work, let us know on the community forum at [forum.remote.it](https://forum.remote.it).

## Manual installation

Use manual installation for Windows, or if you'd rather pick and install the package yourself. On Linux and macOS, quick install does the same steps for you automatically.

### 1. Download the CLI binary

Download the binary that matches your device's platform and architecture from [link.remote.it/download/cli](https://link.remote.it/download/cli).

{% hint style="warning" %}
Make sure you download the package for your device's exact architecture. The wrong package won't run.
{% endhint %}

### 2. Install the binary and the agent

{% tabs %}
{% tab title="Linux / Raspberry Pi OS" %}

1. Move the downloaded file to `/usr/bin` and rename it `remoteit`:

   ```sh
   sudo mv <downloaded-file> /usr/bin/remoteit
   ```
2. Make it executable:

   ```sh
   sudo chmod +x /usr/bin/remoteit
   ```
3. Install the agent:

   ```sh
   sudo remoteit install
   ```

The CLI is installed. See [CLI Usage](/developer-tools/cli-usage.md) to **register** the device and make connections.
{% endtab %}

{% tab title="macOS" %}

1. Move the downloaded file to `/usr/local/bin` and rename it `remoteit`:

   ```sh
   sudo mv <downloaded-file> /usr/local/bin/remoteit
   ```
2. Make it executable:

   ```sh
   sudo chmod +x /usr/local/bin/remoteit
   ```
3. Install the agent:

   ```sh
   sudo remoteit install
   ```

The CLI is installed. See [CLI Usage](/developer-tools/cli-usage.md) to **register** the device and make connections.
{% endtab %}

{% tab title="Windows" %}

1. Create a folder for the CLI, for example `C:\Program Files\remoteit\`.
2. Move the downloaded file into that folder and rename it `remoteit.exe`.
3. Add the folder (not the `.exe` file itself) to your system `PATH` environment variable, for example `C:\Program Files\remoteit\`.
4. Open Command Prompt as an Administrator and install the agent:

   ```
   remoteit.exe install
   ```

The CLI is installed. See [CLI Usage](/developer-tools/cli-usage.md) to **register** the device and make connections.
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.remote.it/software/cli/overview.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
