[Deprecated] Multiple deployments for session-based games

4: Configure the Deployment Manager

There are three steps to configuring the Deployment Manager:

  • Edit the spatialos.json file
  • Build the Deployment Manager
  • Edit the config.json file

Step 1: Edit the spatialos.json file

Make sure you are editing the spatialos.json in the Deployment Manager repository, and not the one in the Example Project repository.
These are the same steps you took as part of Get started 3 - Set up the Example Project, but for the Deployment Manager, rather than the Example Project.

Every SpatialOS project has a spatialos.json file, so there may be several spatialos.json files on your machine.

When you signed up for SpatialOS, your account was automatically given a SpatialOS cloud organization name and a SpatialOS cloud project name, both of which are the same generated name.

  1. Find this name by going to the Console at The name should look something like beta_randomword_anotherword_randomnumber. In the example below, it’s beta_nuts_double_379. img Image: The SpatialOS Console with your SpaitalOS cloud project name highlighted.

  2. In File Explorer, navigate to \deployment-manager\config\ and open the spatialos.json file in a text editor of your choice.

  3. Replace the projectName field with the SpatialOS cloud project name shown in the Console. This tells SpatialOS which SpatialOS cloud project you intend to upload to.

Your spatialos.json file should look like this:

    "configurationVersion": "0.1",
    "projectName": "beta_nuts_double_379",
    "schemaDescriptor": "../tmp/schema.descriptor",
    "clientWorkers": [
    "serverWorkers": [

Where beta_nuts_double_379 is your SpatialOS cloud project name.

Step 2: Build the Deployment Manager

  1. In File Explorer, navigate to your Deployment Manager repository
  2. Select File > Open Windows Powershell > Open Windows Powershell as administrator.
  3. In Powershell, run the following commands:
    • .\build-nuget-packages.ps1
    • .\generate-service-account-token.ps1 <project name> <token life time in days>

Where <project name> is your SpatialOS project name and <token life time in days> is the the number of days you want your token to remain valid for.

Step 3: Edit the config.json file

Next, you configure the Deployment Manager.

In this example, you must tell the Deployment Manager:

  • the type of client-worker it can deploy - UnrealClient for this example, but this can be any client type you have set up for your project.
  • the number of deployments you want to run concurrently - 2 for this example.
  • the assembly you want to deploy - you created the name for this assembly when you ran spatial cloud upload <assembly_name> during 3: Build and upload workers.

Leave the other configuration file settings to the default, for this example. For more information about the other Deployment Manager configuration options, see the Deployment Manager documentation on GitHub.

To configure the Deployment Manager, you edit its configuration file. To do this,

  1. Navigate to the Deployment Manager repository you cloned in step 1.
  2. Using a text editor of your choice, open \deployment-manager\DeploymentManager\config.json.

In the config.json, you need to change the following lines:

  • "ClientType": "YourClient", to "ClientType": "UnrealClient",
  • "NumberOfDeployments": 1, to "NumberOfDeployments": 2,
  • "AssemblyName": "YourAssembly", to "AssemblyName": "<assembly_name>)", where <assembly_name> is the name you gave to your assembly when you uploaded your assembly.

Your config.json file should look like this:

  "TokenLifetimeDays": 7,
  "ClientType": "UnrealClient",
  "MaxNumberOfClients": 100,
  "DeploymentPrefix": "session",
  "NumberOfDeployments": 2,
  "AssemblyName": "<assembly_name>",
  "DeploymentTags": [ "dev_login", "ttl_1_hours" ],
  "RegionCode": "EU",
  "DeploymentIntervalSeconds": 5

When you are done, save and close your config.json file.

> Next: 5. Launch multiple session-based deployments

2019-05-21 Page added with editorial review

Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums