This guide lists the steps required to set up the RudderStack data plane (backend) in your development environment.
Setup prerequisites
To set up RudderStack, you will need to set up and install the following tools:
- Go 1.17 or above.
- Node.js 14.17 or above.
- PostgreSQL 11 or above
RudderStack-hosted control plane
If you're using a RudderStack-hosted control plane, follow these steps to set up the data plane in your development environment:
- Log into your RudderStack Open Source dashboard.
- Copy your workspace token from Settings > Company, as shown:
- Then, set up the database in your preferred directory using the following commands:
createdb jobsdbcreateuser --superuser rudderpsql "jobsdb" -c "alter user rudder with encrypted password 'rudder'";psql "jobsdb" -c "grant all privileges on database jobsdb to rudder";
- Next, clone the RudderStack server repository:
git clone https://github.com/rudderlabs/rudder-server.git
- Then, run
git submodule init
andgit submodule update
to fetch therudder-transformer
repository. - Next, navigate to the
rudder-transformer
directory using the following command:
cd rudder-transformer
- Install the dependencies using the command
npm i
. Then, start the destination transformer using the following command:
node destTransformer.js
- Navigate back to the main directory using the command
cd rudder-server
. - Copy
sample.env
to the main directory using the following command:
cp config/sample.env .env
- Update the
WORKSPACE_TOKEN
environment variable in this file with the workspace token you copied in Step 2. - Finally, run the RudderStack server using the following command:
go run main.go
Self-hosted control plane
If you have self-hosted the control plane using the open-source Control Plane Lite utility, follow the Developer Machine Setup instructions to set up the RudderStack data plane in your development environment.
Sending test events
Once you have successfully performed the steps above, follow the Sending Test Events guide to verify the installation.
Contact us
If you come across any issues while setting up RudderStack in your development environment, you can contact us or start a conversation in our Slack community.