> ## Documentation Index
> Fetch the complete documentation index at: https://infisical-devin-1781641701-docs-github-pat-fine-grained.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Local development

> This guide will help you set up and run the Infisical platform in local development.

## Fork and clone the repo

[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the [repository](https://github.com/Infisical/infisical) to your own GitHub account and then [clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) it to your local device.

Once, you've done that, create a new branch:

```console theme={null}
git checkout -b MY_BRANCH_NAME
```

## Set up environment variables

Start by creating a `.env` file at the root of the Infisical directory then copy the contents of the file linked [here](https://github.com/Infisical/infisical/blob/main/.env.dev.example). View all available [environment variables](https://infisical.com/docs/self-hosting/configuration/envars) and guidance for each.

## Starting Infisical for development

We use Docker to spin up all required services for Infisical in local development. If you are unfamiliar with Docker, don’t worry, all you have to do is install Docker for your
machine and run the command below to start up the development server.

#### Start local server

```bash theme={null}
docker compose -f docker-compose.dev.yml up --build --force-recreate
```

#### Access local server

Once all the services have spun up, browse to [http://localhost:8080](http://localhost:8080).

#### Local SMTP with Mailhog

The dev Docker Compose includes [Mailhog](https://github.com/mailhog/MailHog), a local SMTP server that captures all outgoing emails. This is useful for testing email-based flows like user invitations, password resets, and other notifications without sending real emails.

The `.env.dev.example` file already includes the SMTP variables pre-configured for Mailhog — no extra setup is needed.

| Variable            | Value                  |
| ------------------- | ---------------------- |
| `SMTP_HOST`         | `host.docker.internal` |
| `SMTP_PORT`         | `1025`                 |
| `SMTP_FROM_ADDRESS` | `dev@infisical.local`  |
| `SMTP_FROM_NAME`    | `Infisical Local`      |
| `SMTP_REQUIRE_TLS`  | `false`                |
| `SMTP_USERNAME`     | `you@example.com`      |
| `SMTP_PASSWORD`     | *(empty)*              |

To view captured emails, open the Mailhog web UI at [http://localhost:8025](http://localhost:8025).

#### Queue Management with BullBoard

The dev Docker Compose includes [BullBoard](https://github.com/felixmosh/bull-board), a web UI for monitoring and managing BullMQ job queues. This is useful for debugging async job processing, viewing queue status, and inspecting failed jobs during development.

To start BullBoard, use the `queue` profile:

```bash theme={null}
docker compose -f docker-compose.dev.yml --profile queue up
```

Once running, access the BullBoard UI at [http://localhost:3008](http://localhost:3008) to view and manage queues in real-time.

#### Shutdown local server

```bash theme={null}
# To stop environment use Control+C (on Mac) CTRL+C (on Win) or
docker compose -f docker-compose.dev.yml down
```

## Starting Infisical docs locally

We use [Mintlify](https://mintlify.com/) for our docs.

#### Install Mint CLI.

```bash theme={null}
npm i -g mint
```

or

```bash theme={null}
yarn global add mint
```

#### Running the docs

Go to `docs` directory and run `mint dev`. This will start up the docs on `localhost:3000`

```bash theme={null}
# From the root directory
cd docs; mint dev;
```
