> For the complete documentation index, see [llms.txt](https://docs.tailent.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tailent.com/getting-started/tailent-gateway-agent/installing-gateway-agent.md).

# Installing Gateway Agent

Tailent Gateway Engine is deployed as a self-hosted Windows service-grade application. The following prerequisites must be met:

1. Tailent Gateway Agent installation kit (zip) - <https://tailent-share.s3.eu-central-1.amazonaws.com/Orch/TailentGatewayAgent_1.3.3.0.zip>
2. TAP Bundle (TAP Studio + TAP Assistant) builds with TGA functionality enabled
3. Dedicated Windows User account belonging to the Administrators group (we'll assume it's called **TGAUser** for this exercise)
4. Microsoft Terminal Services / Remote Desktop installed and configured for all target users
5. Microsoft Visual C++ Redistributable 2013 (64 bit) must be installed on the Windows host environment. This can be obtained at <https://www.microsoft.com/en-us/download/details.aspx?id=40784>

The following steps must be followed in order:

1. The installation kit needs to be unzipped in a location where the user mentioned at #1 above has full read/write privileges (for reference, we'll assume that we'll be installing Tailent Gateway Agent to &#x43;**:\Tailent\TGA** for this exercise)
2. Open a **Command Prompt** (as Administrator) and type the following command:\
   \
   **sc create "TAP Gateway Agent" binPath= "C:\Tailent\TGA\TailentGatewayAgent.exe"**\
   \
   The following message should be displayed, signaling the Windows service has been successfully created and is ready to be configured.<br>

   <figure><img src="https://649489153-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MSSr3DfBuOYIkk2T9ec%2Fuploads%2FRLsKGEtDl3gHTGsXJDGz%2Fimage.png?alt=media&amp;token=a4c3b47b-6654-40ff-9911-53ee3795b23f" alt=""><figcaption></figcaption></figure>
3. Next, run **services.msc** from the Start Menu -> Run command and you should be able to see the recently created service listed:\ <br>

   <figure><img src="https://649489153-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MSSr3DfBuOYIkk2T9ec%2Fuploads%2F3C8eg9WtA0ZKtw7V4ys7%2Fimage.png?alt=media&amp;token=0b85905e-2726-488e-a101-2dafe37c1d64" alt=""><figcaption></figcaption></figure>
4. This service needs to be configured to run automatically:

<figure><img src="https://649489153-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MSSr3DfBuOYIkk2T9ec%2Fuploads%2FaOYOOxxT8YNPlv71br95%2Fimage.png?alt=media&amp;token=ad1935b9-f47e-45e9-9a15-66e6b97b8634" alt=""><figcaption></figcaption></figure>

5. Aditionally, in order for TGA to be able to create Windows user session for unattended use, it also needs to be configured to run under the dedicated Windows user:<br>

<figure><img src="https://649489153-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MSSr3DfBuOYIkk2T9ec%2Fuploads%2F0txyTgCvg5bTAyxbGPzt%2Fimage.png?alt=media&amp;token=93360e8d-2242-468b-88dc-939fea79a524" alt=""><figcaption></figcaption></figure>

6. Before starting this service, certain configuration parameters need to be set. This can be done by editing the configuration file found under the TGA folder, called **appsettings.json**. It should look something like this:\ <br>

   <figure><img src="https://649489153-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MSSr3DfBuOYIkk2T9ec%2Fuploads%2FhJ5kDxnqs2sDREck8XYz%2Fimage.png?alt=media&amp;token=e72d4819-71ac-41cc-ba20-e5d5a8cb5637" alt=""><figcaption></figcaption></figure>

**AllowedHosts -** controls which addresses the TGA service will accept incoming requests. \
**ListenPort** - controls the port under which the TGA service will accept incoming requests.\
**Token** - represent a security token that must be used under all operational requests with TGA. Failure to provide this security token will lead to 403 Forbidden responses. This is a secret and should be changed to a randomly generated and secure string. For this setup exercise, we'll be leaving this token unaltered.\
**Timeout** - the timeout, in seconds, over which operational requests will fail. The default value of 120 seconds is a very safe setting and can usually be left unaltered.     &#x20;

7. After reviewing all the above steps, start the service so incoming requests can be accepted.
