Instructions for setting up a Resource Provider (node) on the public Lilypad testnet using Docker, including obtaining necessary funds and installing required software.
Lilypad RPs currently only support Linux installs. Running a RP on Windows is currently experimental.
Linux (Ubuntu 22.04 LTS)
Nvidia GPU
Docker (Ubuntu install)
Nvidia Docker drivers
For a more in-depth look at the requirements to run a Lilypad node, please refer to the hardware requirements documentation.
The testnet has a base currency of ETH, as well as a utility token called LP. Both are used for running nodes. To add a node to the testnet, follow these steps:
We recommend using MetaMask with custom settings to make things easier. Once you have it installed and setup, here are the settings you need to use:
Network name: Arbitrum Sepolia
New RPC URL: https://sepolia-rollup.arbitrum.io/rpc
Chain ID: 421614
Currency symbol: ETH
Block explorer URL: (leave blank)
For a step by step guide on adding the network, please refer to our Setting up MetaMask documentation.
To obtain testnet LP, use the Lilypad faucet and enter your ETH address.
To obtain testnet ETH, use a third party Arbitrum Sepolia testnet faucet and enter your ETH address.
The Arbitrum Sepolia faucet provides 0.0001 tokens per request. If you need more tokens and already have Sepolia ETH, you can use the official Arbitrum bridge to transfer it over to Arbitrum Sepolia.
The faucet will give you both ETH (to pay for gas) and LP (to stake and pay for jobs).
The Lilypad Network uses the Arbitrum Sepolia Testnet to settle compute transactions. When a transaction is ready to be saved on-chain, Lilypad cycles through a list of public Arbitrum Sepolia RPC endpoints using the endpoint that settles first to save the compute transaction.
Resource Providers have the option to setup their own Arbitrum RPC endpoint using Alchemy instead of using the default public RPC endpoints.
A personal RPC endpoint helps RPs to avoid reliability issues with the public RPC endpoints used by Lilypad ensuring rewards can be earned and jobs can be run consistently. RPs running a personal RPC endpoint contribute to the fault tolerance and decentralization of the Lilypad Network! Read more in the Alchemy Arbitrum docs.
Before we start the Docker setup, you'll need to retrieve the private key from the wallet you set up earlier in this guide. For guidance on exporting your private key, refer to this official MetaMask guide. Once you’ve securely copied your private key, proceed to initialize the Docker containers using the commands provided below.
You have two options to start the Lilypad setup: using Docker Compose or directly pulling the image. Both methods will run the containers in the background, allowing you to continue using your terminal while the setup operates.
Use curl
to download the docker-compose.yml
file from the Lilypad GitHub repository.
If any containers named resource-provider
, ipfs
, or watchtower
are already in use, they will need to be stopped before running this setup to avoid naming conflicts.
You can check if these containers are running with:
If they are running, stop them with:
If there are still conflicts when trying to running with the docker-compose file, remove the containers:
Once any existing conflicts are resolved, start the Lilypad containers by providing your Web3 private key:
Use the following command to check the status of the Lilypad Resource provider.
The pre-built Docker image is a crucial component in setting up your Lilypad Resource Provider with this approach. It encapsulates the environment in which your node will operate, including all necessary dependencies, configurations, and commands to run the Lilypad services.
Before pulling the image, you must be logged in to Docker by running docker login
and follow the prompts.
In the root directory of the Lilypad repo, run the following command to pull the pre-built Docker image:
Important: Safeguard your private key with proper key management practices. This key is crucial for managing resource providers' proof of work, tracking rewards, and other vital functions. Never share or expose it.
To run the Lilypad services in a container as a background process, replace <your_private_key_here> with your actual private key and execute the following command:
To add your own RPC URL, run add the WEB3_RPC_URL
as an environment variable and set the URL:
To automatically monitor and update the Lilypad resource provider container, you can use lilypad-watchtower. It ensures the container is kept up to date by periodically checking for new image versions.
Run the following command to start lilypad-watchtower:
When you want to check the logs, run the following command:
If everything has ran successfully, you will see logs from your terminal. You can copy your web3 public address from MetaMask and paste it in to the Lilypad Leaderboard or GPU dashboard to view if your node is online and running!
Use the following command to check the status of the Lilypad Resource provider.
To view your Lilybit_ rewards, visit one of the following dashboards and paste your node's public address into the input:
Here are some common troubleshooting techniques when it comes to your resource provider using Docker:
Checking Docker Runtime
To verify your Docker runtime configuration: sudo docker info | grep Runtimes
You should see the NVIDIA runtime listed. If you only see: Runtimes: io.containerd.runc.v2 runc
you will need to configure the NVIDIA runtime.
Configuring NVIDIA Runtime If the NVIDIA runtime is not showing up or you're experiencing issues, try the following:
1. Configure the NVIDIA Container Toolkit runtime: sudo nvidia-ctk runtime configure --runtime=docker
2. Restart the Docker service: sudo systemctl restart docker
Overview of Docker setup
For a comprehensive overview of your Docker setup, use: docker info
. This command provides detailed information about your Docker daemon configuration.
Instructions for setting up a Resource Provider (node) on the public Lilypad testnet using Linux, including obtaining necessary funds, installing required software, and ensuring security measures.
Lilypad RPs currently only support Linux installs. Running a RP on Windows is currently experimental.
Linux (Ubuntu 22.04 LTS)
Nvidia GPU
Docker (Ubuntu install)
Nvidia Docker drivers
For a more in-depth look at the requirements to run a Lilypad node, please refer to the hardware requirements documentation.
The testnet has a base currency of ETH, as well as a utility token called LP. Both are used for running nodes. To add a node to the testnet, follow these steps:
We recommend using MetaMask with custom settings to make things easier. Once you have it installed and setup, here are the settings you need to use:
Network name: Arbitrum Sepolia
New RPC URL: https://sepolia-rollup.arbitrum.io/rpc
Chain ID: 421614
Currency symbol: ETH
Block explorer URL: (leave blank)
For a step by step guide on adding the network and importing the LP testnet token, please refer to our Setting up MetaMask documentation.
To obtain testnet LP, use the Lilypad faucet and enter your ETH address.
To obtain testnet ETH, use a third party Arbitrum Sepolia testnet faucet and enter your ETH address.
The Arbitrum Sepolia faucet provides 0.0001 tokens per request. If you need more tokens and already have Sepolia ETH, you can use the official Arbitrum bridge to transfer it over to Arbitrum Sepolia.
The faucet will give you both ETH (to pay for gas) and LP (to stake and pay for jobs).
To set up your environment for using Lilypad with GPU support, you need to install several key components. This guide will walk you through installing Docker, the Nvidia Container Toolkit, Bacalhau, and Lilypad. You'll also configure systemd to manage these services efficiently.
Docker is a platform that allows you to automate the deployment of applications inside lightweight, portable containers.
To install Docker Engine, follow the steps specific to your operating system from the official Docker documentation:
Linux - Docker Engine
To ensure proper operation of your graphics cards and Lilypad, follow these steps to install the Nvidia Toolkit Base Installer: Nvidia Container Toolkit download page
Configure the container runtime by using the nvidia-ctk
command:
The nvidia-ctk
command modifies the /etc/docker/daemon.json
file on the host. The file is updated so that Docker can use the NVIDIA Container Runtime.
Restart the Docker daemon:
Run a local ipfs node on the Lilypad RP.
If permissions errors are encountered when trying to run ipfs init
, ensure the ipfs node is not setup in the root user and is accessible by Bacalhau.
Bacalhau is a peer-to-peer network of nodes that enables decentralized communication between computers. The network consists of two types of nodes, which can communicate with each other.
Bacalhau versions newer than v1.3.2
are not currently supported but will be in the future. Please pin to Bacalhau v1.3.2
for now.
To install Bacalhau, run the following in a new terminal window (run each command one by one):
To check your Bacalhau version use:
The expected output is:
If the Bacalhau CLIENT
version is not v1.3.2, it will need to be replaced. Follow the steps here to uninstall and reinstall Bacalhau.
The installation process for the Lilypad CLI involves several automated steps to configure it for your specific system. Initially, the setup script identifies your computer's architecture and operating system to ensure compatibility. It will then download the latest production build of the Lilypad CLI directly from the official GitHub repository using curl
and wget
.
Once the CLI tool is downloaded, the script sets the necessary permissions to make the executable file runnable. It then moves the executable to a standard location in your system's path to allow it to be run from any terminal window.
The resource provider version of Lilypad is not supported on Darwin/macOS.
Via official released binaries
To verify the installation, run lilypad
in the terminal to display the version and a list of available commands, indicating that Lilypad CLI is ready to use.
You will need to create an environment directory for your node and add an environment file that contains your node's private key.
To do this, run the following in your terminal:
Next, add your node's private key into /app/lilypad/resource-provider-gpu.env
:
A WEB3_PRIVATE_KEY
can be retrieved from the Metamask account details menu. For more info, check out this official guide from Metamask on viewing a wallet's private key.
This is the key where you will get paid in LP tokens for jobs run on the network.
You must not reuse your compute node key as a client, even for testing: this will result in failed jobs and will negatively impact your compute node since the wallet address is how nodes are identified on the network.
The Lilypad Network uses the Arbitrum Sepolia Testnet to settle compute transactions. When a transaction is ready to be saved on-chain, Lilypad cycles through a list of public Arbitrum Sepolia RPC endpoints using the endpoint that settles first to save the compute transaction.
Resource Providers have the option to setup their own Arbitrum RPC endpoint using Alchemy instead of using the default public RPC endpoints.
A personal RPC endpoint helps RPs to avoid reliability issues with the public RPC endpoints used by Lilypad ensuring rewards can be earned and jobs can be run consistently. RPs running a personal RPC endpoint contribute to the fault tolerance and decentralization of the Lilypad Network! Read more in the Alchemy Arbitrum docs.
systemd is a system and service manager for Linux operating systems. systemd operates as a central point of control for various aspects of system management, offering features like parallelization of service startup, dependency-based service management, process supervision, and more.
To install systemd, open /etc/systemd/system/bacalhau.service
in your preferred editor:
Open /etc/systemd/system/lilypad-resource-provider.service
in your preferred editor.
Hint: sudo vim /etc/systemd/system/lilypad-resource-provider.service
Reload systemd's units/daemons (you will need to do this again if you ever change the systemd unit files that we wrote, above)
Start systemd units:
Start bacalhau and lilypad-resource-provider in a different terminal window than the ipfs node.
Now that your services have been installed and enabled, check the status of Bacalhau to ensure it is running correctly on your node:
To check if the node is running use the following command:
This will give a live output from the Lilypad node. The logs will show the node running and accepting jobs on the network.
Run the following command to get more status info from your node:
To restart your resource provider run:
For complex issues, bug reports, or feature requests, open a discussion in the Lilypad-Tech Github organization discussion board.
Navigate to the discussion board, select "New Discussion", choose "rp-issues", and fill out the template.
Without a discussion opened, our team will not be able to support the problem.
For quick questions or minor issues, use the Lilypad Discord #i-need-help channel and provide the following info.
Description (including Lilypad version running on your node)
Hardware Info (including Linux/Windows version)
Related blockchain/ETH addresses of transaction hashes
Output Logs - sudo systemctl status lilypad-resource-provider
Related links/urls
Screenshots
When a new version of Lilypad is released, it is important for resource providers to update their installations to ensure compatibility and access to the latest features and improvements.
Please note that using sudo rm -rf
is very powerful and can be dangerous if not used carefully.
If the Lilypad RP is running, stop the system (if the node is not running, disregard this first step):
Remove the Lilypad executable by running:
Start your resource provider by running:
To disconnect your node from Lilypad you will need to do a few things to completely offboard.
Using sudo rm -rf
is very powerful and can be dangerous if not used carefully. It is highly recommended to navigate to the parent directory and remove files from there to avoid accidental deletion of important files.
First, stop the node:
Next, you must remove the .service
files related to Lilypad and Bacalhau. These files are typically stored in /etc/systemd/system/
. To remove them, run the following command:
Next we notify the systemd manager to reload its configuration by running:
Then, remove the environment file for the Lilypad resource provider. This file is usually stored in /app/lilypad/
. To remove it, run:
Finally, if you followed the installation instructions from the Lilypad documentation and moved the executable to /usr/local/bin/lilypad
, it can be removed from there. If the executable is stored in a different directory on your machine, navigate to that directory and remove it from there. To remove the executable, run:
To remove Bacalhau, run:
As every system is different, these instructions may vary. If you have any issues, please reach out to the team in the Lilypad Discord for help!
To view your Lilybit_ rewards, visit one of the following dashboards and paste your node's public address into the input:
If you want to allowlist only certain modules (e.g. Stable Diffusion modules), to control exactly what code runs on specific nodes (which can be audited to ensure that they are secure and will have no negative impact on the nodes), set an environment variable OFFER_MODULES
in the GPU provider to a comma separated list of module names, e.g. sdxl:v0.9-lilypad1,stable-diffusion:v0.0.1.
Visit the Lilypad GitHub for a full list of available modules.
Set up a Resource Provider using Linux 🐧
Set up a Resource Provider using Docker 🐳