> For the complete documentation index, see [llms.txt](https://docs.release.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.release.com/getting-started/create-an-environment.md).

# Create an environment

When you [create a new Release application](https://github.com/releasehub-com/docs/blob/main/getting-started/broken-reference/README.md), Release automatically creates your first ephemeral environment. To view an application's environments or to create new environments, navigate to the application's **Environments** tab.

![Environments page](https://585411240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1neGLLQ0sDXeK6ooSo%2Fuploads%2Fgit-blob-a9386e467dd0fa4217cb974d1a943a1400e74cd6%2Fcreate-an-environment-environments-page.png?alt=media)

{% hint style="info" %}
Free accounts are limited to two environments at a time. If you're on a free account and already have two environments, you'll need to delete one before proceeding with this guide. To create more than two environments, [upgrade your account](https://releasehub.com/pricing).
{% endhint %}

## How to create a new environment

On the Environments page, click the **Create environment** button. This takes you to the create environment page where you can configure your new environment.

![New environment settings](https://585411240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1neGLLQ0sDXeK6ooSo%2Fuploads%2Fgit-blob-fa34a4867a19a50fd78b881e1dab9da98649c31a%2Fcreate-an-environment-environment-settings.png?alt=media)

Let's take a look at each of these options:

1. Select an **environment type**: Choose whether the new environment should be *ephemeral* (lasting for a limited time – seven days by default) or *permanent* (lasting until manually destroyed). To learn more about ephemeral and permanent environments, see our page about [environment expiration](/reference-documentation/environment-expiration.md). If you're creating a permanent environment, enter an **environment name**. Release will convert this name to lowercase and remove spaces. Ephemeral environments get an autogenerated name.
2. Select a **branch** from your application's repository to deploy to your new environment.
3. Select if you want the environment to deploy automatically.
4. Select the **cluster** for this environment where this environment will live.
5. Select any other applications that you want to **import** into this environment.
6. Under **Override Build Images**, you can enter specific Docker images to deploy to your services. By selecting a specific Docker image for a service, the image for this service will not be updated when you push new code to your branch. By default, Release will pull the latest image for each service.

Lastly, click **Create environment**.

Release will now create your new environment and redirect you to a page that shows you deployment progress in real time.

## What happens after you create an environment

Release goes through four stages for each new environment.

### 1. Build

During the build stage, Release pulls a branch from your application's repository, then runs `docker build` for each service. After building new Docker images, Release pushes the images to a private container registry.

### 2. Setup

Next, Release sets up your new environment by creating the required nodes and other resources, setting quotas, pulling Docker images, and deploying containers, and starting services with `docker run`.

### 3. Diagnostics

Release then sets up a health checker to monitor your deployed services.

### 4. Traffic routing

Finally, Release routes network traffic to your new environment by updating a routing table for your application.

## How to use your new environment

Your environment should now be deployed and ready to use.

To view the environment's details page, visit your application's Environments page and click on the new environment you created.

From the Environment Details page, you can view URLs for your services, change settings for your environment, and see details about running instances.

{% hint style="info" %}
**Test it out:** To see how Release builds and redeploys your application, push a code update to your repository in the branch tracked by this environment, then visit the **Deployments** tab in Release.
{% endhint %}


---

# 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.release.com/getting-started/create-an-environment.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.
