[Node] Run your ZORA node

Node Science
7 min readFeb 9, 2024

--

Credits to Zora Labs.

Zora is one of the most popular L2 which is primarily known as a decentralized NFT marketplace protocol that enables creators to mint, price, and auction their NFTs directly on the blockchain and outside of centralized platformes like Opensea. Their valuation reached $600M following a $50M investment round in 2022, which attracted contributions from ten investors, including notable names like Kindred Ventures and Coinbase Ventures.

Welcome to Node Science! Here, you will learn and understand how to set up your node easily and quickly, without any prior technical knowledge.

Feel free to follow us on Twitter to stay updated on everything related to nodes and join our Discord for further discussion or any questions with our community!

VPS configuration

To run a node you’ll need a VPS (Virtual Private Server) and one of the most reliable and cheapest solution is Contabo. You can choose the CLOUD VPS 2 by clicking here (or higher if you want to run several nodes on it).

Don’t forget to choose a password.

Once payment is complete, you’ll receive an e-mail with your IP address entitled “Your login data!” . In order to connect to your VPS and run your node a secure manner, you must download and install the Putty software, which enables a secure connection.

Type your IP address, open and accept.

Before deploying your node, you need to create a free Alchemy account, which is a blockchain development platform that provides a suite of tools to simplify the process of building, deploying, and scaling decentralized applications.

Go to Alchemy and click on “sign up”.

  1. Click on “I’m not a developer”.
  2. Choose “Ethereum”.
  3. Choose “Free”.
  4. Skip the “Add payment info”.
  5. Go to your apps dashboard by clicking here.
  6. Create a new app on ethereum with the name of your choice.
  7. Click on “API key” and save the “HTTPS” link.

Going forward, the guides will be structured in two parts. The first part will present solely the necessary code lines for setting up the node and the steps needed throughout the deployment process. Following that, at the bottom of the page, a second, more informative section will provide an in-depth breakdown of each command line.

I. Node deployment

Make sure you copy (Ctrl+C) — paste (right-click your mouse) the command line into your terminal.

sudo apt-get update && sudo apt-get upgrade -y && \
sudo apt install curl build-essential git screen jq pkg-config libssl-dev libclang-dev ca-certificates gnupg lsb-release -y && \
sudo mkdir -p /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null && \
sudo chmod a+r /etc/apt/keyrings/docker.gpg && \
sudo apt-get update && \
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose && \
git clone https://github.com/conduitxyz/node.git && \
cd node && \
./download-config.py zora-mainnet-0 && \
export CONDUIT_NETWORK=zora-mainnet-0
cp .env.example .env
nano .env

Delete the http://llrpc commande and paste your HTTPS link previously saved in Alchemy (by clincking on shift + right click).

Then close your text file by clicking on CTRL+X then click on “Enter”.

screen -S zora
docker compose up --build

Congratulations, you’ve just deployed your first node on Zora! Simply press CTRL+A+D to detach from the screen session; your node will keep running. And if you to reattach to the existing screen session, just type screen -r zora.

Feel free to follow us on Twitter to stay updated on everything related to nodes and join our Discord for further discussion or any questions with our community!

II) Educational content

sudo apt-get update && sudo apt-get upgrade -y

Initiates an automatic update of the system’s package lists and then upgrades all installed packages to their latest versions without requiring manual confirmation.

sudo apt install curl build-essential git screen jq pkg-config libssl-dev libclang-dev ca-certificates gnupg lsb-release -y

Installs essential tools and libraries:

  • curl: A tool for downloading or sending data.
  • build-essential: Essential tools for compiling and building software.
  • git: A system for tracking changes in files, commonly used for collaborating on code.
  • screen: A program that allows you to use multiple windows in a single terminal session.
  • jq: A tool for processing JSON.
  • pkg-config: Helps find and use library files that software might depend on.
  • libssl-dev, libclang-dev: Development files used for secure communication and programming language tools, respectively.
  • ca-certificates: A set of trusted certificates that help verify the identity of websites and services.
  • gnupg: A security tool for encryption, helping keep data safe.
  • lsb-release: Shows information about the Linux distribution being used.
sudo mkdir -p /etc/apt/keyrings

Creates a new folder named keyrings inside the /etc/apt/ directory. The -p part means "make this folder and any other folders needed along the way." So, if /etc/apt/ doesn't have a keyrings folder yet, this command creates it to store special security keys for installing software safely.

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

This command utilizes curl to securely fetch Docker's GPG key from its official URL, applying options to silently follow redirects and fail on server errors. This key, crucial for verifying Docker's package authenticity, is then processed by gpg to remove ASCII armor, converting it into a binary format suitable for the system's package manager. The resulting binary key is saved to /etc/apt/keyrings/docker.gpg, a designated directory for trusted keys, ensuring subsequent Docker package installations are authenticated and secure, thereby maintaining system integrity.

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Adds a new Docker repository to the system’s package source list. It constructs the repository entry to include the system’s architecture, specifies the Docker GPG key for package verification, and points to the Docker packages for Ubuntu. It uses the lsb_release -cs command to automatically insert the codename of the Ubuntu release being used. The entry is saved in a new file named docker.list within /etc/apt/sources.list.d/. The output is silenced by redirecting it to /dev/null.

sudo chmod a+r /etc/apt/keyrings/docker.gpg

Modifies the permissions of the docker.gpg file located in /etc/apt/keyrings/ to make it readable by all users (a+r), ensuring that any user or process can verify Docker packages against this GPG key during installation or updates.

sudo apt-get update

Refreshes your system’s package index by reaching out to the configured repositories, including the newly added Docker repository if you’ve just set that up. This ensures your package management tool knows about the latest available versions of packages and their dependencies.

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose

Installs the Docker Engine (docker-ce), the Docker command-line interface (docker-ce-cli), the containerd.io container runtime, and docker-compose on your system. These components are necessary for creating and managing Docker containers and defining multi-container Docker applications.

git clone https://github.com/conduitxyz/node.git

Clone the repository located at https://github.com/conduitxyz/node.git into a local directory named node. This action creates a copy of the repository's files and history on your local machine, allowing you to work with the code or content from the conduitxyz/node repository.

cd node

Changes the current directory to node, which is the directory that was likely created when you cloned the node repository in the previous step.

./download-config.py zora-mainnet-0

Executes the download-config.py script with the argument zora-mainnet-0. download-config.py is a Python script designed to download or configure certain settings or data, specifying zora-mainnet-0 likely refers to a specific configuration set or data for the Zora environment. This execution would initiate whatever process the script is designed to perform, such as downloading, configuring, or setting up certain parameters for the Zora mainnet identified by 0.

export CONDUIT_NETWORK=zora-mainnet-0

Sets an environment variable named CONDUIT_NETWORK to the value zora-mainnet-0. Environment variables are used to influence the behavior of software applications. In this context, setting CONDUIT_NETWORK likely configures the current shell session to use the zora-mainnet-0 network configuration, possibly for blockchain or network-related operations.

cp .env.example .env

Copies the file named .env.example to a new file named .env in the same directory. The .env file is commonly used to store environment variables and configuration settings for applications, and the .env.example file often serves as a template with example or default values. By copying this template to .env, you can then customize the .env file with specific settings for your environment or application.

nano .env

Opens the .env file in the Nano text editor within the terminal. Nano is a simple, user-friendly text editor designed for Unix-like operating systems. In this editor, you can modify environment variables and configuration settings that your application will use. Remember to save your changes before exiting Nano (usually done by pressing Ctrl + O to save and Ctrl + X to exit).

screen -S zora

Starts a new screen session named "zora." The screen utility allows you to create multiple terminal sessions within a single terminal window, letting you run multiple programs in parallel without needing to open new terminal windows. Naming the session "zora" makes it easier to identify and reattach to this session later if you detach from it or log out from the terminal.

docker compose up --build

Instructs Docker Compose to start and run all the services defined in your docker-compose.yml file. The --build option ensures that Docker Compose builds or rebuilds images before starting the containers. This is particularly useful if you have made changes to the Dockerfile or the build context specified in the docker-compose.yml.

--

--

Node Science
Node Science

Written by Node Science

Learn how to easily set up your node with Node Science ! https://discord.gg/XCWThSXzZp

Responses (1)