Version: Next

Manual Setup

This documents describes how to install the trustlines relay server for local development.

The relay server provides a REST API. Please visit the REST API Documentation page for more information.



An installation of the relay server requires at least the following components:

  • PostgreSQL header files
  • Python 3.6 or up
  • pip

Installation on Ubuntu#

To install the relay server on Ubuntu 18.04, start by installing the pre-requisites with the following command

sudo apt install build-essential python3-dev libsecp256k1-dev python3-virtualenv virtualenv pkg-config libssl-dev automake autoconf libtool git libpq-dev


To install the relay, start by cloning the repository

git clone
cd relay

Then create and activate a fresh virtualenv::

virtualenv -p python3 venv
source venv/bin/activate

Finally, to install all needed dependencies to run the relay, use the following command

pip install -r requirements.txt -e .

You can verify that the relay is correctly installed by running tl-relay --help to get an overview of available options.

Additional Dependencies#

In addition to having installed the relay, you will need a blockchain node connected to a chain with deployed trustlines contracts to interact with. You can go to the contracts repository to see how to deploy new trustlines contracts, or you may use the provided addresses.json files in config/ containing addresses of deployed contracts on the Trustlines Blockchain by copying them here

cp config/addresses_tlbc.json addresses.json

You may use the blockchain repository to get a Trustlines Blockchain node running.

The relay also uses a py-eth-index instance that index events that the relay will be able to process and serve to its users.