> For the complete documentation index, see [llms.txt](https://doc.wearepatchworks.com/product-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.wearepatchworks.com/product-documentation/virtual-environments/implementing-virtual-environments/configuring-a-virtual-environment-version.md).

# Configuring a virtual environment version

## Introduction

To configure a virtual environment, you [define a set of replacement rules](/product-documentation/virtual-environments/implementing-virtual-environments/configuring-a-virtual-environment-version/configuring-virtual-environment-replacements.md) for components used in any process flows that run in the environment. For example:

* *If a process flow running in this environment includes Connector Instance X, then replace Connector Instance X with Connector Instance Y.*
* *If a script running in this environment includes Script X, then replace Script X with Script Y.*

These replacements are configured in a virtual environment [version](/product-documentation/virtual-environments/implementing-virtual-environments/configuring-a-virtual-environment-version/understanding-virtual-environment-versions.md), and each version has its own lifecycle.

To start, you add your required replacements to a `draft` version; when you're ready, the draft version is `deployed`, and if the existing `deployed` version is updated, it becomes `inactive`. For detailed information about this lifecycle, please refer to [Understanding virtual environment versions](/product-documentation/virtual-environments/implementing-virtual-environments/configuring-a-virtual-environment-version/understanding-virtual-environment-versions.md).

## Accessing the draft version for a new virtual environment

Having [created a virtual environment](/product-documentation/virtual-environments/implementing-virtual-environments/creating-a-virtual-environment.md), a `draft` version is generated automatically, ready for you to configure. To configure this draft with your required replacements, follow the steps below.

{% stepper %}
{% step %}
**Open the draft version**

If you're not already working in the required virtual environment, [log in to the dashboard](https://app.wearepatchworks.com/virtual-environments) and select `virtual environments` | `overview` from the left-hand navigation menu, then select the environment to update.
{% endstep %}

{% step %}
**Select the draft version**

Move down to the `versions` panel and click `id` associated with the `draft` version - for example:

<div align="left"><figure><img src="/files/KaElcl5Y4q2i5mEjgiip" alt="" width="375"><figcaption></figcaption></figure></div>

Alternatively, click the ellipsis associated with the draft version and select edit configuration - for example:

<figure><img src="/files/dLclPfqHtpC7fd5rBAAj" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Configure replacements for the draft version**

You can now [configure replacement components](/product-documentation/virtual-environments/implementing-virtual-environments/configuring-a-virtual-environment-version/configuring-virtual-environment-replacements.md) for this version.

{% hint style="info" %}
These instructions assume that you're accessing an existing `draft` version, having just [created a new virtual environment](/product-documentation/virtual-environments/implementing-virtual-environments/creating-a-virtual-environment.md). However, if you're updating an existing virtual environment, you might want to create a new draft - in this case, please refer to [Updating a virtual environment version](/product-documentation/virtual-environments/managing-virtual-environments-versions-and-flows/managing-virtual-environment-configuration-versions/updating-a-virtual-environment-version.md).
{% endhint %}
{% endstep %}
{% endstepper %}
