Skip to main content
Fortytwo Relay Installing Launching Updating Stopping
This program has not commenced yet. The Fortytwo Relay Setup repository is remaining private and you will not be able to perform an installation until the first wave of invitations reaches first participants.
Get Relay Access
Please ensure you have received an acceptance email containing your whitelisted public wallet address before attempting to launch the Relay Node. A unique whitelisted wallet address is required for each device on which the Relay Node is installed.

Recommendations

  • It is recommended to have previous experience of operating relay or being Validator/Operator on a blockchain with knowledge of Docker .
  • It is best to run Fortytwo Relay on a dedicated server. Both Relay Node and Inference Node can run on the same server if set up correctly (read more here).
  • Staying online 24/7 will greatly affect the node’s quality and rewards.

1. Installing the Relay Node

1

Review the requirements

Being a Relay Noderunner has specific’Relay Node Requirements’.Make sure that your system/virtual machine meets all requirements before proceeding.
Requirements:
hardware
CPU on x86_64 architecture
software
OS: Windows or Linux
Installed Docker
Installed Git
Private key from an EVM-Compatible Web3 account
2

Get the repository

This program has not commenced yet. The Fortytwo Relay Setup repository is remaining private and you will not be able to perform an installation until the first wave of invitations reaches first participants.

Fortytwo Relay Setup

Clone the repository
Note: We don’t recommend downloading and setting up the repository archive manually as it will be harder to keep the Fortytwo Container up to date.
1
If you have previously removed git (git comes preinstalled on macOS):Install Git
or install Xcode Command Line Tools:
xcode-select --install
2
Open the Terminal.
3
Navigate to your preferred installation directory with cd command, or run the following command to continue installation in the default location in your home directory:
mkdir -p ~/FortytwoRelay && cd ~/FortytwoRelay
4
Run the following commands to clone the node package and enter the folder:
git clone https://github.com/Fortytwo-Network/fortytwo-relay-setup
cd fortytwo-relay-setup
3

Setup the `.env` file

Create an .env file from the .env.example reference file and update environment variables:
cp .env.example .env
Open the .env file and specify the unique credentials for the node:
  • FT_ACCOUNT_PRIVATE_KEY — Unique Web3 account private key
  • HOST_PUBLIC_IP — Your IP/your server IP address
    Your private key must be different from the account that you use with your Inference Node.
FT_ACCOUNT_PRIVATE_KEY=$YOUR-UNIQUE-PRIVATE-KEY
FT_RPC_SERVICE_PORT=42420
FT_NODE_LISTENER_PORT=42042

IPFS_SWARM_PORT=4001
IPFS_DATA_PATH=/data/ipfs
IPFS_MOUNT_PATH=/data/ipfs_ipns
HOST_PUBLIC_IP=$YOUR-IP-ADDRESS
Read the ‘Environment Setup’ page for more details.
4

Set up the ports

Check the .env file and ensure that the ports defined with the FT_NODE_LISTENER_PORT and IPFS_SWARM_PORT are publicly accessible over both TCP and UDP. Static public IP is required.Ports Availablity Verification’ can help you check if the Swarm will be able to see your node.
5

Set up the folders

Inside the repository, create the following folders, which should match with the IPFS_DATA_PATH and IPFS_MOUNT_PATH defined in the .env:
mkdir -p /data/ipfs
mkdir -p /data/ipfs_ipns

How To Run a Relay Node Alongside an Inference Node

To run your Inference and Relay Nodes on the same machine at the same time, you need to:
1

Edit the .env file

  • Change the default FT_NODE_LISTENER_PORT and FT_RPC_SERVICE_PORT. They have to be different from the Inference Node ports, which by default are 42042 and 42420 respectively.
  • Define a unique FT_ACCOUNT_PRIVATE_KEY, it must be different from the account that you use with your Inference Node.
Read the ‘Environment Setup’ page for details.
2

Ensure that FT_NODE_LISTENER_PORT is publicly accessible over both TCP and UDP

Note that static public IP is required.Ports Availablity Verification’ can help you check if the Swarm will be able to see your node.

2. Launching Fortytwo Relay

If restarting your node after relaunching the terminal/OS, don’t forget that the following should be executed from the node repository folder, where your .env and docker-compose.yml are located.
1

Update the repository

To make sure that your repo is up to date, before each start, get the latest updates with the git pull command:
git pull
2

Launch Docker

Launch Docker and wait until its interface says “Engine running”.
3

Build the Docker Compose services

docker compose build
4

Run the services in the background

docker compose up -d

How to Make Sure it Works?

If everything went successfully, you should now be able to open Docker application and see the fortytwo-relay-setup process running. If you unwrap it and go to fortytwo-relay container, you can see the logging of the node running successfully. The node periodically tests its health and reports on your relay address status, like in this example:
fortytwo-relay  | UTC 20XX-XX-25 14:25:14.520081  INFO Check health
fortytwo-relay  | UTC 20XX-XX-25 14:25:14.520106  INFO Relay address is public. Current address /ip4/X.XXX.XXX.XX/tcp/42042
The most common error you might encounter is an issue with closed ports:
WARN Relay address status is unknown (attempt X/3). Please ensure that your node listener port is accessible from the outside.
ERROR Failed to determine NAT status after 3 attempts.
In this case, please refer to the ‘Environment Setup’ page.

3. Operating Your Node

The node will remain fully operational until it is terminated by the user or the system restarts.

Updating Fortytwo Relay

The node components update automatically every time it is launched and while operational. However, you need to manually update the repository to get the latest evniroment updates. At every start, execture the following command.
git pull
If running stable, check for the updates on the Changelog page. When you see [|] Fortytwo Relay update available, stop your node, run the git pull command, and then restart the node. Here are the commands that will help you to compare your current commit version versus the remote version:
git fetch
git log -1 origin/main --format="Remote: %h %ci"
git log -1 --format="Local:  %h %ci"

Stopping Fortytwo Relay

To stop the running container, either stop it from the Docker interface, or execute the following command from the same folder where the docker-compose.yml is located:
docker compose down