This document is a guide to using Livepeer’s software to set up a Transcoder node in the Livepeer open-source video network.
It assumes some basic awareness of a Command Line Interface, as well as basic knowledge of transacting on Ethereum.
In order to complete the steps in this guide, you will need at least the following hardware:
-
A server with at least 1GB RAM, 1 CPU, 50GB Storage (at most)
-
Operating System: Ubuntu 16.04 or above
-
Terminal Access e.g. via SSH or direct Terminal.
-
A Static Public IP Address with port
:8935
open
-
It also assumes you have some Ether (ETH) to pay gas for transaction, and some Livepeer Tokens (LPT) to bond to this node in the network as part of Livepeer Delegated-Proof-Of-Stake protocol.
If you don’t have LPT, here is a guide for how to get some.
So, let’s get started:
0. Connect to the hosted server with Terminal Access e.g. via SSH
1. Download and unpack Livepeer’s latest software
- Run the following command in Terminal, replacing the text
{latest_version_here}
with the version number of the latest release, e.g.0.3.3
:
wget https://github.com/livepeer/go-livepeer/releases/download/{latest_version_here}/livepeer_linux.tar.gz
-
You can check the latest release at Livepeer’s Software Release Page.
-
Unpack the
livepeer_linux.tar.gz
file using the following command:
tar -xvzf livepeer_linux.tar.gz
-
This will unpack two files:
-
livepeer_linux/livepeer
which is the main executable binary for Livepeer -
livepeer_linux/livepeer_cli
which is a rich command-line interface for configuring your Livepeer node
-
-
You are now ready to run Livepeer’s software.
2. Running Livepeer’s software for the first time.
- Run the following command from your home (
~
) directory
./livepeer_linux/livepeer -transcoder
-
Running this process for the first time will create a new folder at
~/.lpData
which will store all data relating to the livepeer node. -
Next, the process will generate an Ethereum account for the Livepeer node.
-
When prompted, enter a passphrase, and then repeat the passphrase to confirm
-
The passphrase is used to encrypt the private key data in the JSON Keystore file for the Ethereum account
-
This process will ask for this passphrase every time it is launched.
-
-
Once you have entered the passphrase twice, it will show you the Ethereum address that was created
- Make a note of this, as you will be needing it later.
-
The process will then report errors relating to the serviceURI - ignore these, you will configure the service URI later in this guide.
-
Next, the process will generate a 2048-bit RSA keypair and a peer identity for the IPFS node.
-
Livepeer currently uses IPFS to store segments of video required to verify that transcoding work has been done correctly.
-
If you have previously run IPFS on this server, you will need to remove or rename the ~/.ipfs directory
-
-
When you see the text
Listening for RPC on :8935
, then you know that your node is running.
3. Send Ether (ETH) and Livepeer Tokens (LPT) to the node’s Ethereum account
-
Becoming a Transcoder in the Livepeer network requires the following crypto assets:
-
A small amount of Ether - to pay for gas to mine your transactions
-
The amount required will depend on current gas prices
-
At time of writing, the transactions required to register a node cost a total of 45377 + 170239 + 125995 + 50149 = 391760 units of gas, which cost 0.00235056 Ether at a gas price of 6 gwei / unit.
-
-
Some LPT - you can start with as little as 0.000000000000000001 LPT = 1 LPTU
-
-
Send the Ether and LPT to the Ethereum address generated in Step 2.
-
The process for how you send this will differ based on how you control the private keys for the address where you hold the Ether and LPT
-
Make sure that the funds have been received in the account before you continue.
-
You can verify your balance of ETH and LPT by visiting Livepeer’s Protocol Explorer, entering the node’s
ETH account address
and clicking “VIEW ACCOUNT”
-
4. Connect to the Server in another session with Terminal Access e.g. via SSH
5. Become a Transcoder in Livepeer network
- Run the following command from your home (
~
) directory. This will open the rich command-line-interface which can be used to configure the node.
./livepeer_linux/livepeer_cli
-
From the list of menu items, select the option
Invoke multi-step "become a transcoder"
by typing14
and pressing return- Occasionally the number for this menu option changes. If it has changed, please alert us in Livepeer Community’s Chatroom about Transcoding.
This should show you your
Current token balance
and yourCurrent bonded amount
- both in LPTU (1 LPTU = 1 x 10^-18 LPT) -
Next, the process will ask you to
Enter block reward cut percentage
-
This represents the percentage of the block reward that the node will keep for itself - its “cut”
-
The remaining percentage is shared with any addresses who BOND to the node.
-
You can change these parameters at any time by running this process again.
-
-
Enter an amount and press return (or just press return to accept the default setting)
-
Next, the process will ask you to
Enter fee share percentage
-
This represents the percentage of fees earned by the node for Transcoding that will be shared with any addresses who BOND to the node.
-
The remaining percentage is retained by the node
-
You can change these parameters at any time by running this process again.
-
-
Enter an amount and press return (or just press return to accept the default setting)
-
Next, the process will ask you to set the
price per segment in Wei
-
This represents the price the Transcoder node will charge a Broadcaster for transcoding a segment of video
-
The remaining percentage is retained by the node
-
You can change these parameters at any time by running this process again.
-
-
Enter an amount and press return (or just press return to accept the default setting)
-
Next, the process will ask you to configure the
public host:port of node
-
This is how the other nodes in the network will communicate with this node
-
The process will attempt to establish the host’s IP address and offer this to you as a default
-
You can change these parameters at any time by running this process again.
-
-
Enter a value (consisting of a
host_ip_address:port_number
and press return (or just press return to accept the default setting offered) -
And finally, the process asks that you
bond to yourself in order to become a transcoder
-
You can bond as little as 1 LPTU = 0.000000000000000001 LPT
-
You can bond additional tokens to this node at any time.
-
-
Enter an amount, in LPTU, which less than, or equal to the node’s own stake, and press return
-
Once completed, this will trigger 4 transactions to be published to Ethereum for this node:
-
approve(address _spender, uint256 _value) - which approves the BondingManager Smart Contract to spend up to a certain amount of LPT from your account
-
bond(uint256 _amount, address _to) - which bonds the requested amount to the node.
-
transcoder(uint256 _rewardCut, uint256 _feeShare, uint256 _pricePerSegment) - which sets the transcoding parameters for the node
-
setServiceURI(string _serviceURI) - which sets the service URI, allowing remote procedure calls to be made on this node.
-
Once all these transactions have been mined, you must restart the node in the first Terminal session by following these steps:
-
Press
ctrl-C
to cancel the process./livepeer
process -
Run the following command again in the Terminal
./livepeer_linux/livepeer -transcoder
- Enter the passphrase when prompted.
The bonding process will complete at the start of the next round. Currently, each round lasts approximately 24 hours.
YOU HAVE COMPLETED THE PROCESS TO SET UP A TRANSCODER ON LIVEPEER
Some things you might wish to do now:
-
Run option 1 in livepeer_cli
1. Get node status
which displays information about the node -
Set it up so that the process continues to run even when you log off the Terminal session, using something like
screen
on Ubuntu -
View the details of the node in Livepeer’s Protocol Explorer by
-
Download the keystore file from the server (
~/.lpData/keystore/
) and e.g. import it into MetaMask to make it easier to manage the node via Livepeer’s Protocol Explorer. -
Configure a Geth Light Client on your Transcoder node server to improve reliability and reduce reliance on third-parties.
-
Raise awareness amongst your community that if they have LPT, then they can bond to this node and support your venture as part of Livepeer.
Thanks to @j0sh for help with this content.