# Environments

Learn how to use environments to safely test and deploy your game builds across different stages.

***

## What are Environments?

**Environments** are isolated deployment stages that allow you to test builds before releasing them to all players.

{% hint style="info" %}
**Think of it as**: Different "servers" or "channels" for your game, each serving a specific purpose in your deployment pipeline.
{% endhint %}

***

{% hint style="success" %}
**Beta Programs**: Great way to reward early supporters with early access!
{% endhint %}

### How Players Switch Environments

For **public** custom environments (like Staging[^1], Closed-Beta), players can switch in the launcher:

<figure><img src="https://4241524842-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnNH3XbUy7pSptjMVADb2%2Fuploads%2F3zDzQBLAWy5EswoDJ0Ye%2FSelect%20Environment%20in%20Launcher%20Desktop.gif?alt=media&#x26;token=ef3145d0-db71-4b04-8b9b-29d12d9bd92c" alt=""><figcaption><p>Player switching environment in Launcher Desktop</p></figcaption></figure>

## Default Environments

<figure><img src="https://4241524842-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnNH3XbUy7pSptjMVADb2%2Fuploads%2FsgF4oOlDDF6JscHMfs0G%2Fimage.png?alt=media&#x26;token=ac476d76-3138-4ec0-ba3f-6c36d37c47da" alt=""><figcaption><p>Default Environments</p></figcaption></figure>

Every application comes with two pre-configured environments:

**Production**

* Live environment accessible to all players. Stable, tested builds only.

**Staging**

* Private testing environment for internal use only. Perfect for debugging and testing new features.

***

## Creating Custom Environments

{% hint style="success" %}
**Pro Tip**: Use clear, descriptive alias like "Beta-Testing" or "QA-Team" to avoid confusion.
{% endhint %}

Need more control? Create custom environments for specific purposes.

**Example:** "Closed Beta" hidden environment with Access Code

<div align="left"><figure><img src="https://4241524842-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnNH3XbUy7pSptjMVADb2%2Fuploads%2Ffy6uvQcbaNaMEUarnGbq%2Fimage.png?alt=media&#x26;token=bf96a369-56f4-4b76-b54d-f41c2c1e4e88" alt=""><figcaption><p>Creating closed beta environment</p></figcaption></figure></div>

<div align="left"><figure><img src="https://4241524842-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnNH3XbUy7pSptjMVADb2%2Fuploads%2FLCx89zTm9h4XKbxxcqMy%2Fimage.png?alt=media&#x26;token=d5b7e736-88f1-4308-9a07-3fe55d51bace" alt=""><figcaption><p>Environment with Access Code</p></figcaption></figure></div>

***

## Best Practices

### ✅ Recommended Workflow

**Professional Pipeline**

**1. Development** → Internal testing, rapid iteration

**2. Staging** → QA testing, performance checks

**3. Beta (optional)** → Community testing, feedback

**4. Production** → Stable release to all players

***

### 🎯 Do's

* ✅ Always test in Dev before Staging
* ✅ Use Staging for final QA
* ✅ Keep Production stable
* ✅ Document environment purpose
* ✅ Use clear naming conventions
* ✅ Monitor each environment separately

***

### ❌ Don'ts

* ❌ Skip testing in Dev
* ❌ Upload untested builds to Production
* ❌ Mix environment purposes
* ❌ Give Production access to everyone
* ❌ Forget to update environment docs
* ❌ Create too many environments (keep it simple)

***

## Troubleshooting

**Problem**: Build uploaded but not showing in environment

**Solutions:**

* ✅ Make sure the Build is "Completed"
* ✅ Refresh the page

**Problem**: Players can't switch to Beta/Staging

**Solutions:**

* ✅ Ensure environment is not **Hidden**
* ✅ If the environment is **Hidden**, user needs to unlock the environment with the access code

**Problem**: Launcher downloads wrong build

**Solutions:**

* ✅ Check launcher environment setting
* ✅ Verify correct build is set as active
* ✅ Click refresh button to fetch the latest changes
* ✅ Restart launcher completely

***

## Next Steps

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>📦 Manage Builds</strong></td><td>Upload builds to environments</td><td><a href="https://github.com/GameLauncherCloud/GameLauncherCloud-Gitbook/blob/main/docs/apps/broken-reference/README.md">https://github.com/GameLauncherCloud/GameLauncherCloud-Gitbook/blob/main/docs/apps/broken-reference/README.md</a></td></tr><tr><td><strong>⚙️ App Settings</strong></td><td>Configure application settings</td><td><a href="app-settings">app-settings</a></td></tr><tr><td><strong>🚀 Create Launcher</strong></td><td>Build your custom launcher</td><td><a href="../launchers/create-launcher">create-launcher</a></td></tr></tbody></table>

***

{% hint style="success" %}
**Questions?** Contact <support@gamelauncher.cloud> or join our [Discord community](https://discord.com/invite/FpWvUQ2CJP)!
{% endhint %}

[^1]: Staging is an environment to test your game before placing it in your public Production environment.
