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

# Development Environment Setup

> Set up your development environment for contributing to Temporal Server

This guide will help you set up your local development environment for contributing to Temporal Server.

## Prerequisites

### Build Prerequisites

<Steps>
  <Step title="Install Go">
    Temporal Server requires Go 1.26.0 or later (check `go.mod` for the current minimum version).

    **macOS:**

    ```bash theme={null}
    brew install go
    ```

    **Ubuntu:**

    ```bash theme={null}
    sudo apt install golang
    ```

    Verify installation:

    ```bash theme={null}
    go version
    ```
  </Step>

  <Step title="Install Protocol Buffers Compiler (Optional)">
    Only required if you plan to modify `.proto` files.

    **macOS:**

    ```bash theme={null}
    brew install protobuf
    ```

    **Other platforms:**
    Download from the [protoc release page](https://github.com/protocolbuffers/protobuf/releases).
  </Step>

  <Step title="Install Temporal CLI">
    The Temporal CLI is used for interacting with the server during development.

    **Homebrew:**

    ```bash theme={null}
    brew install temporal
    ```

    **Manual install:**
    Download from [github.com/temporalio/cli](https://github.com/temporalio/cli)
  </Step>

  <Step title="Install Docker">
    Docker is required for running runtime dependencies (databases, Elasticsearch, etc.).

    Follow the [Docker installation guide](https://docs.docker.com/engine/install/) for your platform.

    <Note>
      It's possible to run dependencies directly on the host OS instead of Docker. See the [run dependencies on host](/development/dependencies-host) guide for details.
    </Note>
  </Step>
</Steps>

### Windows Development

For Windows developers, install [Windows Subsystem for Linux 2 (WSL2)](https://aka.ms/wsl) and [Ubuntu](https://docs.microsoft.com/en-us/windows/wsl/install-win10#step-6---install-your-linux-distribution-of-choice), then follow the Ubuntu instructions above.

## Clone the Repository

Temporal uses Go modules, so there's no dependency on the `$GOPATH` variable. Clone the repository to your preferred location:

```bash theme={null}
git clone https://github.com/temporalio/temporal.git
cd temporal
```

## Start Runtime Dependencies

The Temporal server can run with SQLite as an in-memory database, making runtime dependencies optional. However, for full-featured development and testing, start the optional dependencies:

```bash theme={null}
make start-dependencies
```

This starts the following services via Docker Compose:

* Cassandra (database)
* PostgreSQL (database)
* MySQL (database)
* Elasticsearch (visibility)
* Temporal Web UI (available at `localhost:8080`)
* Grafana (metrics, available at `localhost:3000`)

To stop the dependencies:

```bash theme={null}
make stop-dependencies
```

## Verify Your Setup

Verify your environment is correctly configured:

```bash theme={null}
# Check Go version
go version

# Check Docker is running
docker ps

# Verify you can access the repository
ls -la
```

## Next Steps

Once your environment is set up:

* [Build Temporal Server from source](/development/building)
* [Run the test suite](/development/testing)
* Review the [development guidelines](/development/guidelines)

## Troubleshooting

### Docker Performance on macOS

If you experience slow Docker performance on macOS, consider running dependencies directly on your host system. See [run dependencies on host](https://github.com/temporalio/temporal/blob/main/docs/development/run-dependencies-host.md) for database-specific setup instructions:

* [Cassandra on macOS](https://github.com/temporalio/temporal/blob/main/docs/development/macos/cassandra.md)
* [MySQL on macOS](https://github.com/temporalio/temporal/blob/main/docs/development/macos/mysql.md)
* [PostgreSQL on macOS](https://github.com/temporalio/temporal/blob/main/docs/development/macos/postgresql.md)

### Go Module Issues

If you encounter Go module-related errors:

```bash theme={null}
go mod tidy
go mod download
```
