---
title: "Setting up environments"
description: "Build a reusable computer setup so a session can start with your application built, its services running, and its tests ready."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.indent.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Setting up environments

An environment defines the dependencies to install, the services to run, and a check that confirms
the setup works. You build and publish it once, then reuse it for any session.

There is one environment per repository.

## What an environment contains

- **Dockerfile** — starts from `indent/base` and installs your toolchain and dependencies.
- **Repositories** — the repositories Indent clones during the build, each at a branch you choose.
- **Environment variables** — build-time and runtime values. Indent never sees their values.
- **Background processes** — the services that make up your stack, such as a web server, a database,
  and a cache. Indent starts each one when the computer boots and restarts it if it exits.
- **Verification** — goals in plain language, such as "the app builds" and "the UI loads," and a
  script that checks them.

## Create an environment

Open the environment wizard from
[**Settings → GitHub Repositories**](https://app.indent.com/settings/github-repositories) — select
**Setup Environment** on a repository — or from the environment dropdown within a session.

1. **Set up**

   Name the environment, choose the repositories, and write the verification goals in plain
   language.
2. **Configure**

   Tell Indent what the application needs. Indent writes the Dockerfile, declares the services,
   sets the variables, and turns your goals into a verification script.
3. **Build**

   Indent builds the image and boots a computer. A first build can take several minutes.
4. **Verify**

   Indent runs the verification script and, for anything with a UI, opens it in the browser to
   confirm.
5. **Publish**

   When everything passes, publish the environment. New sessions can now start in it.

Indent rebuilds the environment when you push to the tracked branch.

## Run verification yourself

Select **Run verification** at any point after a successful build to re-run the checks — while
you're getting the setup right, or later when you want to confirm the environment still works. If no
computer is running, Indent boots one for the run.

The **Verify** step appears once there's something to verify, and stays inactive until a build has
succeeded.

## Work in an environment

Select an environment from the dropdown when you start a new session. The session starts in that
environment with your services already running. Without an environment, a session runs in a plain
sandbox.

## Test through the browser

Indent has a real web browser on its computer. Ask Indent to open your running application and click
through a flow. Indent navigates your pages, fills in forms, and captures screenshots.

## Secrets

When an environment needs a secret, such as an API key or a database password, Indent asks you to
provide it through the app. Indent doesn't see the secret value, only whether it's available. See
[Permissions and data](/administration/permissions-and-data).

Connect the code Indent works in before you build an environment:
[Connecting GitHub](/connecting/github).

Source: https://docs.indent.com/getting-started/environments/index.mdx
