> 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/reference-documentation/environment-presets.md).

# Environment presets

Create custom, unique resource pools for your environments.

Environment presets are preconfigured templates that encapsulate the necessary configurations required for a specific development setup. These presets streamline the process of setting up a development environment by eliminating the need for manual configuration, thus saving time and ensuring consistency across applications. For example, you can use an environment preset to create deterministic URLs for your environments for different applications.

In Release, Professional account-holders can create a preset and specify the number of resource URLs to use it with. One of these resource handles can be "checked out" by an environment, which will then display the handle in its domain name.

For example, the end result of your environment handle being inserted into an environment's domain URL would look something like this:

`https://service-${env_id}-appname.releaseapp.io`

This is no different to a regular ephemeral environment space, except that your environment handle `${env_id}` is allocated from the handle pool.

## Create an environment handle

Select the **Environment Presets** tab in **Configuration**. On the Environment Presets page, click the **Create Environment Preset** button.

![List of Environment Handles](https://585411240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1neGLLQ0sDXeK6ooSo%2Fuploads%2Fgit-blob-a2858f4c3f326ab2ed70b62a3e74c365a73badf4%2Fview-presets.png?alt=media)

Enter a name for your handle and how many handles you need as well as the item checkout strategy. Click **Create Environment Preset**.

![Create Handle modal window](https://585411240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1neGLLQ0sDXeK6ooSo%2Fuploads%2Fgit-blob-c6f59bcd33c0bdc2fff2134cb815bdeb4a24356f%2Fcreate-preset-modal.png?alt=media)

## Unique Presets

You can also create up to 50 unique resource URLs for a given preset. Release will automatically increment the number at the end of the handle name to ensure that each environment has a unique URL.

Alternatively, you can choose a theme for your environment handle, such as "Cats" or "Dogs". Release will then automatically assign a unique number to the end of the handle name, such as "persian" or "labrador".

![Preset Theme](https://585411240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1neGLLQ0sDXeK6ooSo%2Fuploads%2Fgit-blob-1c478164c4362bc0d1f480b63e096c9948348a01%2Funique-presets.png?alt=media)

## View Unique Present Handles

In the Environment Preset Details page, you can see the name of each resource handle and which environment currently has it checked out. Notice how each resource handle name is assigned a unique name that relates to the chosen theme. This is what will appear in the environment's URL.

![View Unique presets](https://585411240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1neGLLQ0sDXeK6ooSo%2Fuploads%2Fgit-blob-23f87211c8a20a085c68386fea30268576870b21%2Fview-unique-presets.png?alt=media)

## Add the environment handle to your Application Template

In order for an environment to check out a unique handle, add the following to your [Application Template](https://docs.releasehub.com/reference-documentation/application-settings/application-template):

````
environment_templates:
- name: ephemeral
  datasets:
  - name: handle_name
```<div data-gb-custom-block data-tag="hint" data-style='info'>URL handle pools are only applied during environment creation and cannot be changed or applied retroactively to an existing environment.</div>

## Environment-specific environment variables

Environment presets allow you to set specific environment variables for each unique environment. For example, you may have a set of third-party service tokens that require a unique ID for each environment for testing purposes. This is a common pattern for services like Firebase or Twilio. You can provide each environment with a specific set of environment variables to be applied to that environment.

To add an environment variable to a unique preset, click the **Edit** button. 

![Click "Edit" to add/modify environment variables.](../.gitbook/assets/environment-presets/environment-variables.png)

In the Environment Preset Details page, click the **Add Environment Variable** button. Insert the key and value in the relevant fields and click the check mark to save your changes. 

![Adding a new environment key:value pair.](../.gitbook/assets/environment-presets/environment-specific-variable-create.png)
````


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.release.com/reference-documentation/environment-presets.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
