> ## Documentation Index
> Fetch the complete documentation index at: https://docs.directgvr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure the scripts for your server or CDN

> Set up credentials so the deployment scripts can read from and deploy to your server, S3 bucket or CDN.

The DirectGVR Console tools can read from and deploy to these locations:

* Local folder path
* SSH URL
* S3 URL
* FTP URL
* LLNW URL (Limelight Networks Orchestrate Storage API)
* NS URL (Akamai NetStorage API)

You add an entry for each location to a JSON configuration file, then use the matching URL when you deploy.

> [!WARNING]
>
> Whenever you deploy to a new domain or subdomain, add the full domain to `HostnameWhitelist` in your launcher's `app.json` or `app.yaml`. See [Host configuration](https://docs.directgvr.com/reference/client-skin-system/host-configuration.md).

## Configuration file format

The file is JSON. Name it and put it anywhere the scripts can read it. Each entry looks like this:

```json theme={null}
{
  "protocol": {
    "host": {
      "option": "value"
    }
  }
}
```

For every protocol's options, see [Deployment Console tools](https://docs.directgvr.com/reference/deployment-console-tools.md).

Pass the file to any script with `--console_config`.

## Example: deploy to Akamai NetStorage

The upload account must have API access set up in the Akamai Control Center.

```json theme={null}
{
  "ns": {
    "<your-upload-host>.akamaihd.net": {
      "user": "<upload-user>",
      "key": "<api-key>",
      "debug": false
    }
  }
}
```

1. Save the file, for example to `c:\ssn\config\ns_config.json`.

2. Pass it with `--console_config`:

   ```bash theme={null}
   release_deploy.py --config=mygame_deployment.json --console_config=c:\ssn\config\ns_config.json
   ```

3. Set `--sync_directory` to the NetStorage URL for those credentials, such as `ns://<your-upload-host>.akamaihd.net/<cp-code>/<path>/`.

4. Set `--base_url` to the HTTP or HTTPS delivery URL for that folder.

You can put all of these in your deployment configuration file instead of on the command line:

```json mygame_deployment.json theme={null}
{
  "base_url": "https://<your-delivery-host>/<path>/",
  "sync_directory": "ns://<your-upload-host>.akamaihd.net/<cp-code>/<path>/",
  "console_config": "c:/ssn/config/ns_config.json",
  "repository": "mygame",
  "source": "c:/ssn/mygame/version_01/"
}
```

Then run:

```bash theme={null}
release_deploy.py --config=mygame_deployment.json
```

## Example: read source files from an S3 bucket

The user for the access key needs read permission on the bucket's files.

```json theme={null}
{
  "s3": {
    "bucket_name": {
      "accessKey": "<access-key-id>",
      "secretKey": "<secret-access-key>"
    }
  }
}
```

Save it, for example to `c:\ssn\config\s3_config.json`, and use the bucket URL as the source:

```bash theme={null}
release_deploy.py --source=s3://bucket_name/mygame/versions/01/ --config=mygame_deployment.json --console_config=c:\ssn\config\s3_config.json
```

## Use several protocols

One configuration file can hold several protocols and several accounts per protocol:

```json theme={null}
{
  "ns": {
    "<your-upload-host>.akamaihd.net": { "user": "<user>", "key": "<key>", "debug": false }
  },
  "ssh": {
    "<ssh-host>": {
      "port": 22,
      "hostKey": ["<host-key-lines>"],
      "privateKey": ["<private-key-lines>"],
      "compression": "none",
      "user": "<user>"
    }
  },
  "s3": {
    "bucket_1": { "accessKey": "<access-key-id>", "secretKey": "<secret>" },
    "bucket_2": { "accessKey": "<access-key-id>", "secretKey": "<secret>" }
  },
  "ftp": {
    "ftp1.example.com": { "user": "<user>", "password": "<password>", "dataConnectionType": "passive" },
    "ftp2.example.com": { "user": "<user>", "password": "<password>", "dataConnectionType": "pasv" }
  }
}
```

## Related

* [Use SFTP for uploads](https://docs.directgvr.com/release-automation/sftp-uploads.md)
* [Deploy a release](https://docs.directgvr.com/release-automation/deploy-a-release.md)
* [Deployment Console tools](https://docs.directgvr.com/reference/deployment-console-tools.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.