> For the complete documentation index, see [llms.txt](https://docs.i3d.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.i3d.net/game-hosting/processes/deployment-process.md).

# Deployment Process

This chapter describes the process of deploying an [ApplicationInstance](https://docs.i3d.net/game-hosting/elements/application/applicationinstance.md).

## Prerequisites

Before an ApplicationInstance can be deployed, you must first create a [Deployment Configuration](https://docs.i3d.net/game-hosting/processes/deployment-configuration.md). This ensures you have a [DeploymentEnvironment](https://docs.i3d.net/game-hosting/elements/deploymentenvironment.md) with [Fleet](https://docs.i3d.net/game-hosting/elements/deploymentenvironment/fleet.md)s and [Region](https://docs.i3d.net/game-hosting/elements/deploymentenvironment/deploymentregion.md)s. Hosts (bare metal servers in your account or VMs) onto which ApplicationInstances are deployed will automatically become part of a region based on their geographical location.

Here is a schematic overview of the resulting structure:

![](https://3255620342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTxqXHcEUC6lhXmjD6wE0%2Fuploads%2Fgit-blob-3c788cb465e4f3c62877b74663fc5e067ffb5edc%2FApplicationInstanceDeployments.png?alt=media)

Figure 1: Deployment (environment) structure with ApplicationInstances

## Manual deployments

ApplicationInstances will normally be deployed dynamically and automatically by the platform. You can however deploy them manually as well, e.g. if you just want to test a build.

Manually deploying new ApplicationInstances is a two-step process:

### Creating the instance entity

The first step into deploying a new ApplicationInstance is to create an entity for it. From that moment on it exists in our system (but is not yet deployed):

[`POST /v3/applicationInstance/fleet/{fleetId}/host/{hostId}`](https://docs.i3d.net/api/api_one.md#v3-applicationinstance-fleet-fleetid-host-hostid)

JSON request data [ApplicationInstance](https://docs.i3d.net/game-hosting/elements/application/applicationinstance.md):

```
{
  "labelPublic": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "metadata": [
    {
      "key": "string",
      "value": "string"
    }
  ]
}
```

Parameter `fleetId` can be obtained from [GET /fleet](https://docs.i3d.net/api/api_one.md#v3-fleet)\
Parameter `hostId` can be obtained from [GET /host](https://docs.i3d.net/api/api_one.md#v3-host)

[`labelPublic` usage explained](https://docs.i3d.net/game-hosting/elements/application/label.md)\
[`metadata` usage explained](https://docs.i3d.net/game-hosting/elements/application/metadata.md)

### Deploying a software build

With the entity created, you can now deploy an [ApplicationBuild](https://docs.i3d.net/game-hosting/elements/application/applicationbuild.md) for it:

[`POST /v3/applicationInstance/{applicationInstanceId}/deploy`](https://docs.i3d.net/api/api_one.md#v3-applicationinstance-applicationinstanceid-deploy)

JSON request data:

```
{
  "applicationBuildId": {applicationBuildId}
}
```

Parameter `applicationInstanceId` is the ID of the previously created ApplicationInstance.\
Parameter `applicationBuildId` can be obtained from [GET /applicationBuild](https://docs.i3d.net/api/api_one.md#v3-applicationbuild)

This call will trigger the [deployment process](#the-deployment-process) for the ApplicationInstance.

## Automatic deployments

ApplicationInstances are normally deployed automatically by the platform. This would at least be the case for the live environment of your game. For this to happen, all you have to do is enable automatic deployment and / or automatic scaling in the Fleet(s) created for your live environment. Please see the [Fleet's Operational Status](https://docs.i3d.net/game-hosting/elements/deploymentenvironment/fleet.md#operational-status) documentation.

For the complete documentation on automatic deployment and scaling, please see the [Automatic Deployment](https://docs.i3d.net/game-hosting/processes/automatic-deployment.md) chapter.

## The deployment process

Below is a schematic overview of the (automatic) deployment process for an ApplicationInstance:

![](https://3255620342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTxqXHcEUC6lhXmjD6wE0%2Fuploads%2Fgit-blob-e4ff67170f39a907037e0209a117638a86f1da05%2FDeploymentProcess.png?alt=media)

Figure 2: ApplicationInstance deployment process

The default `installPath` and `instancesPath` on Linux are:

* installPath: /home/gameinstalls
* instancesPath: /home/gameinstances

The default `installPath` and `instancesPath` on Windows are:

* installPath: C:\localuser\gameinstalls
* instancesPath: C:\localuser\gameinstances


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.i3d.net/game-hosting/processes/deployment-process.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
