Skip to main content
Version: 1.2.2

Dev Environment

In this guide, we will walk you through the process of setting up a development environment for Sodot MPC Vertex.
Its purpose is to allow you to run the Vertex locally, with minimal resources and effort, so you can start integrate with it using your code without the need to deploy it to a cloud provider.

Requirements

Before starting the setup process, make sure you have the following installed:

You will also need to have the following credentials provided by Sodot:

  • DockerHub token - allows you to access the Vertex image.


Setup Process

The setup process is made of the following steps:

  1. Login to DockerHub using the provided token
  2. Pull the latest Vertex Docker image
  3. Create a Docker Volume so the Vertex can persist its data (only needed if you want to persist the vertex DB between runs)
  4. Run the Vertex Docker container


1. Login to DockerHub

To login to DockerHub, run the following command:

docker login -u sodot -p <DOCKERHUB_TOKEN>

2. Pulling the latest Vertex Docker image

To pull the latest Vertex Docker image, run the following command:

docker pull sodot/vertex:latest

3. Creating a Docker Volume

To create a Docker Volume, run the following command:

docker volume create vertex-db

4. Running the Vertex Docker container

To run the Vertex Docker container, you will first need to create a vertex.env file with the following content:

RUST_LOG=info
VERTEX_LISTEN_ADDR=0.0.0.0:80

# token to access admin API
VERTEX_ADMIN_TOKEN=VERY_SECRET_TOKEN

# listen on HTTP
VERTEX_HTTP=true

# non-production relay server you can use for testing
VERTEX_RELAY_ADDRESS=us1.sodot.dev
# us1.sodot.dev does not validate API keys
VERTEX_RELAY_API_KEY=aaaa

VERTEX_SQLITE=sqlite:///app/vertex.db?mode=rwc

# 32 bytes hex encoded key to encrypt/decrypt DB keys
# This method is not recommended for production use
VERTEX_BASIC_ENCRYPTION_KEY=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Then, run the following command:

docker run -d -p 80:80 -v vertex-db:/app/db.sqlite --env-file vertex.env sodot/vertex:latest

You can now access the Vertex at http://localhost:80.


Next Steps

Now that you have a running Vertex instance, you can start integrating with it using the Vertex API Reference.

Production Deployment

For production deployment, you can follow the deployment guide of the supported cloud providers: