Skip to main content

Dev Environment

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

tip

If you are looking for a ready-to-use Relay server, you can use the us1.sodot.dev as your Relay server address. This server does not validate API keys and is intended for testing purposes only.

Requirements

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

TLS certificate:

  • You should obtain a valid TLS certificate for the desired domain. Self signed certificates are not supported as the SDKs and Vertex wouldn't accept it.

You will also need to have the following credentials:

Registry Update

Sodot has migrated to a new Docker registry, so DockerHub credentials are no longer required and all new updates will be pushed to the new registry. If you can't access the new registry, please contact the Sodot team.


Setup Process

The setup process is made of the following steps:

  1. Login to the Sodot Docker registry using the generated user and token
  2. Pull the latest Relay Docker image
  3. Run the Relay Docker container with the TLS certificate and key mounted


1. Login to the Sodot Docker registry

To login to the Sodot Docker registry, run the following command:

docker login -u <ARTIFACTORY_USER> -p <ARTIFACTORY_TOKEN> repo.sodot.dev

2. Pulling the latest Relay Docker image

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

docker pull repo.sodot.dev/sodot-docker-oci/sodot-relay-server:latest

3. Running the Relay Docker container

docker run -d -p 443:443 -e "RUST_LOG=debug" \ 
-v ${TLS_CERT_LOCATION}:/etc/fullchain.pem \
-v ${TLS_PRIVKEY_LOCATION}:/etc/privkey.pem \
repo.sodot.dev/sodot-docker-oci/sodot-relay-server:latest \
/sodot-relay-server -c /etc/fullchain.pem --key-path /etc/privkey.pem --insecure-api-keys-not-enforced

Optional: Map the domain to localhost

To map the domain to localhost, you can add the following line to your /etc/hosts file (Linux/Mac) or C:\Windows\System32\drivers\etc\hosts file (Windows):

127.0.0.1 ${RELAY_DOMAIN}

You can now access the Relay at https://${RELAY_DOMAIN}.

Optional: Run the Relay as a http server

To run the relay as a http server , do not pass the RELAY_FULLCHAIN_PATH and RELAY_PRIVKEY_PATH cli arguments. This is for development purposes and not recommended for production.

SDKs do not support using a Relay without TLS at all. To setup a vertex to work with http Relay check out the Vertex Dev environment page.

If you followed this step you can now access the Relay at http://${RELAY_DOMAIN}.

Next Steps

Now that you have a running Relay instance, you can start integrating with it using the SDKs and Vertex.

Production Deployment

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