## Upgrading Leapwork

This article talks about steps while executing the installation file of Leapwork for an upgrade on existing setup.

**Pre-requisites:**

**Access Required to Perform Installations**

- Ensure all local admin rights are available on the controller, agent, and studio machines.
- Ensure availability of access and authentication information like hostname/IP/credentials for connection to the on-prem/remote machines.
- Make sure you have credentials to log in to the Leapwork license engine.
- Contact your customer success manager if you don’t have one.
- Ensure proper back-up is taken. Please refer [this article](https://support.leapwork.com/s/article/Guide-to-upgrading-your-Leapwork-environment) for knowing the step-by-step procedure.

**Installing the 3 components:**

1. [Controller](https://support.leapwork.com/s/article/Upgrading-Leapwork#Controller)
2. [Agent](https://support.leapwork.com/s/article/Upgrading-Leapwork#Agent)
3. [Studio](https://support.leapwork.com/s/article/Upgrading-Leapwork#Studio)

### **Controller Installation**

1. Open the MSI file location and double-click the .msi-file to start the installation. The first screen will display the version number.
2. Click '**Next**' to begin the installation.

3. You _might_ be prompted to install the .NET 6 libraries, pls click on Install.

4. Once installation is complete, please click Ok on the pop-up and click Next on the installation screen.

5. Read the end user agreement, tick “I accept the terms in the License Agreement” checkbox and Click 'Next' button if you agree.

6. Choose Automation Controller and deselect other two; you can keep studio if you want to keep on controller machine (choose as your existing setup on controller).

7. **Port Selection:**
    
    **Controller Port**
    
    The Studio and the Controller always communicate using internal API calls, and this requires the use of a TCP port. The default is port 9000, which you can change to any other port number that is not in use by other software on your computer.
    
    **Controller API Port**
    
    For any integration effort, access Leapwork open REST API using the default port number 9001, which you can change to any other port number that is not in use by other software on your computer.
    
    **Note**: Unless it is necessary for any reason, we do not recommend changing either the Controller, Controller API port numbers.

8. Click **Install** on final warning screen to start the installation process.

9. Click on Finish to complete the installation.

Restart the controller machine once installed if the setup doesn’t initiate the restart itself.

### **Agent Installation**

1. Open the MSI file location and double-click the .msi-file to start the installation. The first screen will display the version number.
2. Click ' **Next**' to begin the installation.

3. You _might_ be prompted to install the .NET 6 libraries, pls click on Install.

4. Once installation is complete, please click Ok on the pop-up and click Next on the installation screen.

5. Read the end user agreement, tick “I accept the terms in the License Agreement” checkbox and Click 'Next' button if you agree.

6. Choose Automation Agent and deselect other two.

7. The configuration screen contains several settings that you can modify before completing the installation.

**Port:** Automation flows run in the Agent, which communicates with the Studio and Controller through a closed remote-control protocol on a specific TCP port. The default port is 6777, which you can change to any other port number not in use by other software on the computer. **NOTE**: Unless it is necessary for any reason, we do not recommend changing either the Controller, Controller API, or Agent port numbers.

**Windows login**: Agents include strong security feature to automate logging in and out of Windows. A user is not required to be logged into their machine to run a flow. Instead, Leapwork can be set up to log in on the user’s behalf. Users can also start testing single sign-on between Windows and any other application that reuses the same login credentials. The User must choose Windows login to be able to use Windows credentials to configure the Agent.

**Agent password**: In case you do not want to use Windows login feature then you should use the Agent password to secure your agents. Because the Agent uses a remote-control protocol, we advise that you set a password to prevent unauthorized parties from connecting to it.

Add exceptions for the Agent in Windows Firewall. A check in this box will direct the installation process to add a rule to the Windows Firewall to permit all incoming connections to the Agent.

Click Next after choosing your desired configuration.

8. Click on the install button to start the installation process.

9. Click on **Finish** to complete the installation.

### **Studio Installation**

3. You _might_ be prompted to install the .NET 6 libraries, pls click on Install.

4. Once installation is complete, please click Ok on the pop-up and click Next on the installation screen.

5. Read the end user agreement, tick “I accept the terms in the License Agreement” checkbox and Click 'Next' button if you agree.

6. Choose Automation Studio and deselect other two.

7. Click on install button to start the installation process.

8. Click on Finish to complete the installation.

9. Once you have completed the installation and launch Leapwork Studio, if there is a change in the License setup from your previous version, the Studio will prompt to enter the License Key. The same can be extracted from [Customer Portal](https://portal.leapwork.com/p/sso).

For any clarification, please contact our [Priority Support](mailto:prioritysupport@leapwork.com).
