# Deploying Unattended Robots - Enterprise License

> Unattended robots are used in automating tasks that do not require human supervision, they usually run in virtual environments on dedicated machines and the automations are controlled from [Orchestrator](https://docs.uipath.com/orchestrator/v2022.4/docs/introduction).

Unattended robots are used in automating tasks that do not require human supervision, they usually run in virtual environments on dedicated machines and the automations are controlled from [Orchestrator](https://docs.uipath.com/orchestrator/v2022.4/docs/introduction).

An unattended automation can be started manually from Orchestrator when needed, but can also be scheduled if the task has to start at a specific interval (daily, hourly, weekly) or at a specific time and date (end of week).

This document guides you through the process of running your first unattended automation using the Enterprise Licensed Version of UiPath, starting with building the automation, setting up the environment and running the unattended process.

To run an unattended automation, the following steps need to be taken:

## 1. Create the automation and publish it to Orchestrator

To provide a real life example, let's suppose we need to make a backup of log files on a server every day at 9 AM. For that, we need to copy the log file from that day to another folder. In this example, we copy a file called "Logs.txt" from the "Logs" folder to the "Old Logs" folder, overwriting the backup each time.

1. Create a new process, add the [Copy File](https://docs.uipath.com/activities/docs/copy-file) activity, configure the fields/paths to the files, and select the **Overwrite** option so that the newly copied file can replace the previous file every day.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/robot/robot-102739-051ac0da.webp)
2. Publish the process to Orchestrator.
3. Click the **Publish** button to the right of the Studio ribbon,
4. In the **Publish properties** tab, enter a name for the package.
5. In the **Publish options tab**, for the **Publish to** option, select **Orchestrator Tenant Processes Feed**, the location where unattended robots can access the automation.
6. Click **Publish**.

   For more information, see [About Publishing Automation Projects](https://docs.uipath.com/studio/v2022.4/docs/about-publishing-automation-projects) in the Studio Guide.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/robot/robot-102243-61322b0d.webp)
7. In Orchestrator, create the process that the unattended robot uses for running the automation.
8. Access your Automation Cloud instance at https://cloud.uipath.com, and select your Orchestrator tenant.
9. In Orchestrator, select the **Shared** Folder &gt; **Processes**, and then click the **Plus** button on the right side to open the **Add Process** page.
10. Select the package and click **Create** to add the process to the Shared Folder.

    ![docs image](https://dev-assets.cms.uipath.com/assets/images/robot/robot-103730-d17746dd.webp)

    :::note
    Keep in mind that you are working with two entities in this process. The first entity is you, the developer who creates and publishes the process. The second one is the Unattended User that runs the automation and the Robot on the Unattended Machine.
    :::

## 2. Set up the Windows machine to run the unattended robot

Set up a Windows Machine that runs the Unattended Robot, ideally this would be a cloud virtual machine. Make sure that its screen saver functionality is disabled and matches the [Hardware and Software Technical Requirements](hardware-and-software-requirements.md#hardware-requirements).

For example, you can host your virtual machine on [Azure](robot-azure-marketplace-deployment.md), see the [Windows VMs Overview](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/overview) document for details on how to set up a Windows Virtual Machine in Azure.

Other environments such as AWS, VM Ware or Citrix are supported as well if they match the [Hardware and Software Technical Requirements](hardware-and-software-requirements.md#hardware-requirements).

## 3.Create the Unattended Robot in Orchestrator

The unattended robot has two components: the **account** and the **machine** on which a job runs. The account is the identity that provides permissions and is used to trigger jobs towards the robot, while the machine provides to computational power for executing the job.

1. Create and set up the account.
2. Creating the account: For **unattended** automations, we recommend [creating a robot account](https://docs.uipath.com/orchestrator/v2022.4/docs/managing-accounts#adding-a-robot-account), which is a service-type identity that does not require an email address. However, if the job must run under a particular user's identity (for permissions or audit purposes), you can opt for [creating a user account](https://docs.uipath.com/orchestrator/docs/managing-accounts#adding-a-user-account) instead.
3. [Assign roles to the account](https://docs.uipath.com/orchestrator/v2022.4/docs/assigning-roles#assigning-roles).
4. [Add the account to folders](https://docs.uipath.com/orchestrator/v2022.4/docs/managing-folders#managing-folder-access) which contain the jobs it needs to run.
5. Create a machine template.

   :::note
   While you could opt to create a single [standard machine](https://docs.uipath.com/orchestrator/v2022.4/docs/managing-machines#adding-a-standard-machine), for this example we are creating a [machine template](https://docs.uipath.com/orchestrator/v2022.4/docs/about-machines#machine-template) instead. Machine templates make it easier to deploy several machines by defining the configuration once and then using a single set of client credentials to allow multiple robots to connect to Orchestrator.
   :::
6. In Orchestrator, go to **Tenant** &gt; **Folders**.
7. Select the target folder from the list, and then select the **Machines** tab.
8. In the top right, click **Manage Machines in Folder**.
9. On the **Manage Machines in Folder** page, click the **Add machine** in the top right and select **Machine template**.
10. Configure the machine template and assign one unattended runtime only. For detailed instructions, see [Adding a machine template](https://docs.uipath.com/orchestrator/v2022.4/docs/managing-machines#adding-a-machine-template).
11. Copy the machine key for later use.

If this machine template should be used to run jobs from several folders, add the machine template you created to all the necessary folders. For instructions, see [Assigning machine objects to folders](https://docs.uipath.com/orchestrator/v2022.4/docs/assigning-machine-objects-to-folders).

## 4. Install the Robot on the Unattended machine

The `UiPathStudio.msi` installer is used to install Studio, the UiPath Assistant, or the Robot on your machine. Using the `.MSI` installer, the Robot is deployed in **Service-Mode** by default, meaning that it is available to all users on the machine. For running the installer administrator rights are needed.

The `UiPathStudio.msi` installer can be downloaded from the **Resource Center** or directly from the [Automation Cloud Home Page](https://cloud.uipath.com).

![docs image](https://dev-assets.cms.uipath.com/assets/images/robot/robot-102273-6be2efbc.webp)

Robot and Studio are installed by default in the following location - `C:\Program Files \UiPath\Studio`. You can change the install location by making use of [command line arguments](https://docs.uipath.com/installation-and-upgrade/v2022.4/docs/studio-command-line-parameters) or from the installer interface.

Step-by-step details on how to install the Robot are found in the [Installing the Robot](installing-the-robot.md) document.

## 5. Connecting the Robot to Orchestrator

:::note
If during the installation process you choose to only install the Robot, the connection to Orchestrator can only be configured [From the Command Line Interface](https://docs.uipath.com/orchestrator/v2022.4/docs/connecting-robots-to-orchestrator#from-the-command-line) (*admin rights are needed*) or from the UiPath Assistant . Otherwise, you can connect your Robot either from Studio or from the UiPath Assistant.
:::

**From Studio**

After the installation is completed, you are presented with the **Connect to Orchestrator** screen, which by default asks you to use the **Use Machine Key** as it's the recommended configuration for unattended robots. The machine name is taken automatically, all you have to do is type the Orchestrator URL plus the machine key you saved earlier.

![docs image](https://dev-assets.cms.uipath.com/assets/images/robot/robot-103177-e5db6c34.webp)

:::note
Using the `.MSI` installer, when connecting the Robot to Orchestrator, the entire machine connects, not just the user that's currently logged on the machine.
:::

**From the UiPath Assistant**

1. Open UiPath Assistant
2. On the **Preferences** menu, select **Preferences**. The **Preferences** window is displayed.
3. Navigate to **Orchestrator Settings**.
4. In the **Orchestrator URL** field, enter Orchestrator’s web address.
5. In the **Machine Key** field, enter the key you copied earlier.

[Click here](https://docs.uipath.com/orchestrator/v2022.4/docs/about-machines) for details about the different machine entities in Orchestrator and when to use each.

1. Click **Connect**. The status should show `Connected, Licensed`

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/robot/robot-102285-044c58ca.webp)

   :::note
   When setting up the machine using the Enterprise Installer (`.MSI`), you can sign out of the machine as the Robot is able to create its own Windows Session using the credentials provided in Step 3.
   :::

## 6. Test the Automation

In order to test the automation on the Unattended Robot, go to the **Automations** -&gt; **Processes** section of the **Shared Folder** in Orchestrator and look for the process deployed in step 1.

You can see the details of the process and, on the right side, you have the Start Job button.

![docs image](https://dev-assets.cms.uipath.com/assets/images/robot/robot-102699-da03e08d.webp)

When clicked, you are presented with the **Start Job** interface, choose the user and the machine configured earlier then click on **Start**.

This starts the selected unattended process on the selected machine and can be monitored in the **Jobs** section of the Shared Folder in Orchestrator.

![docs image](https://dev-assets.cms.uipath.com/assets/images/robot/robot-102599-baea48c0.webp)

## 7. Schedule the automation

For the example we provided in this guide, we can schedule it to run on a daily basis at 9 AM. This is configured from the **Trigger Section** of the Shared Folder in Orchestrator.

![docs image](https://dev-assets.cms.uipath.com/assets/images/robot/robot-102196-98e391fd.webp)

Setting the schedule as per the screenshot above triggers the `Logs.Backup` process to run on the unattended machine on behalf of the selected user every day at 9 AM UTC.
