---
updatedAt: 2025-08-27T17:15:58.000Z
agentTools:
  projectIndex: https://documentation.bunnyshell.com/llms.txt
---

# Create & Destroy an Ephemeral Environment

## Pre-requisites

* Setting **Create ephemeral environments on pull request** is set to **ON**
* Setting **Destroy environment after merge or close pull request** is set to **ON**.

> 📘 Note
>
> Make sure these settings are set to ON, as they are OFF by default.

![3582](https://files.readme.io/c4913fa-create_an_ephemeral_1.png "create an ephemeral 1.png")

 

## Creating your first Ephemeral Environment

1. Make a change in the code. Let's take a simple change for the frontend, changing the navbar background. For this, you can edit the `frontend/src/App.css` file. Find the `.navbar-dark` selector and change the background colour.
2. Create a **Pull Request**.
3. The Bunnyshell Ephemeral Environment will now be automatically created.

![3582](https://files.readme.io/57e3a4b-create_an_ephemeral_2.png "create an ephemeral 2.png")

4. Open the `frontend` Application from the Github Pull Request comment added by Bunnyshell.

![1861](https://files.readme.io/df6994a-create_an_ephemeral_3.png "create an ephemeral 3.png")

5. Open the `frontend` Application from the UI by clicking the icon.
6. Observe the changes made. In our case, we removed the navbar gradient and made it blue.

![3582](https://files.readme.io/454b34a-create_an_ephemeral_4.png "create an ephemeral 4.png")

![3582](https://files.readme.io/6bff268-create_an_ephemeral_5.png "create an ephemeral 5.png")

 

## Automatically deleting your first Ephemeral

1. **Close** the **Pull Request** from Github.
2. Observe the Environment being deleted.

![3582](https://files.readme.io/1528f79-create_an_ephemeral_6.png "create an ephemeral 6.png")

> 👍 Note
>
> If the Pull Request would have been merged, the result would have been the same.
>
> On top of terminating the Ephemeral Environment, if the Primary Environment's Auto-Update setting was set to ON, this would have gotten auto-updated too.