# RudderStack Developer Machine Setup

This guide lists the steps to set up the RudderStack data plane in your development environment.

## Prerequisites

- [Go 1.17](https://golang.org/dl/) or above.
- [Node.js 14.17](https://nodejs.org/en/download/) or above.
- [PostgreSQL 11](https://www.postgresql.org/download/) or above.

## Data plane setup

{{< warning >}}
RudderStack **recommends** using the latest `rudder-server` and `rudder-transformer` versions to avoid any breaking changes to your pipelines. 

See the [Server-Transformer Compatibility]({{< ref "get-started/rudderstack-open-source/server-transformer-compatibility/" >}}) guide for more information.
{{< /warning >}}

1. Log in to your RudderStack Open Source dashboard.
2. Copy your [workspace token]({{< ref "dashboard-guides/_index.md#workspace-token" >}}) from **Settings** > **Workspace**:

{{< image src="images/rs-cloud/workspace-token.webp" alt="Workspace Token" >}}

3. Set up the database in your preferred directory using the following commands:

```bash
createdb jobsdb
createuser --superuser rudder
psql "jobsdb" -c "alter user rudder with encrypted password 'rudder'";
psql "jobsdb" -c "grant all privileges on database jobsdb to rudder";
```

4. Clone the [`rudder-server`](https://github.com/rudderlabs/rudder-server) repository:

```bash
git clone https://github.com/rudderlabs/rudder-server.git
```

5. Run the following commands to fetch the `rudder-transformer` repository.

```bash
git submodule init
git submodule update
```

6. Navigate to the `rudder-transformer` directory using the `cd rudder-transformer` command.
7. Install the dependencies using the `npm i` command.
8. Start the destination transformer:

```bash
node destTransformer.js
```

9. Navigate back to the main directory using the `cd rudder-server` command.
10. Copy `sample.env` to the main directory:

```bash
cp config/sample.env .env
```

11. Update `WORKSPACE_TOKEN` in this file with the workspace token you copied in Step 2.
12. Start the RudderStack server:

```bash
go run main.go
```

## Self-hosted control plane

If you are self-hosting your control plane using [Control Plane Lite]({{< ref "get-started/rudderstack-open-source/control-plane-lite.md" >}}), see [Developer Machine Setup instructions]({{< ref "get-started/rudderstack-open-source/control-plane-lite.md#developer-machine-setup" >}}) to set up the data plane.

## Verify installation

To verify if the setup is successful, follow the steps listed in [Verify installation]({{< ref "get-started/rudderstack-open-source/sending-test-events.md" >}}).
