> 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/oem-and-bulk-provisioning/auto-registration-into-your-account/field-production.md).

# Field Production

This is a method to register multiple devices into your account with a pre-defined set of services. This is the easiest method.

**One-line command**\
Run a command on each device to install, which will allow a custom name, pre-defined services (device template), and optionally, a fixed version.

## 1. Create a Product

[Follow the steps to create a product](/oem-and-bulk-provisioning/auto-registration-into-your-account/create-a-product.md) which defines the services which you want on your devices

## 2. Run your installation

Using the code you created in the previous step, run the one line code. Optionally add the arguments for the device name and software version.

| Variable Name          | Option Type | Description                                                                                                                                   |
| ---------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| R3\_REGISTRATION\_CODE | String      | Registration Code which defines the account and services for the device                                                                       |
| R3\_DEVICE\_NAME       | String      | (Optional) Device name to appear in Remote.It. If not defined, then R3\_DEVICE\_NAME environment variable followed by device HOSTNAME is used |
| R3\_VERSION            | String      | (Optional) Device package version to install. If not defined, then the latest release is used.                                                |

Run the code on each device (example shows all 3 options). If an option is not needed, remove it.

{% code overflow="wrap" %}

```bash
R3_REGISTRATION_CODE="YOUR-REGISTRATION-CODE" R3_VERSION="XXX" R3_DEVICE_NAME="My Device" sh -c "$(curl -L https://downloads.remote.it/remoteit/install_agent.sh)"
```

{% endcode %}

{% hint style="success" %}
As an alternative to using variables as command-line arguments as shown above, Device Package version 5.4.2 and later supports overriding device name, model name, and serial number values using an env file (/etc/remoteit/r3.env). By preparing this file before you run the installation command, you can override each piece of information.
{% endhint %}

```bash
sudo mkdir -p /etc/remoteit
sudo vi /etc/remoteit/r3.env
```

Example contents of r3.env:

```
R3_DEVICE_NAME=sample_device
R3_DEVICE_MODEL=sample_model
R3_DEVICE_SERIAL=sample_serial
```

Using a file with the example above and running the one-line installation command (shown below), the following device will be created. The R3\_REGISTRATION\_CODE is the Registration Code which defines the account and services for the device.

{% code overflow="wrap" %}

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

{% endcode %}

<figure><img src="/files/N4SIRQHh043h1GUkXN2i" alt=""><figcaption></figcaption></figure>


---

# 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/oem-and-bulk-provisioning/auto-registration-into-your-account/field-production.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.
