Install Go Livepeer
Depending on your workflow, you may prefer to install go-livepeer
using a binary release, a Docker image, or from source.
Install using a Binary Release
Recommended
Use the install.sh
script from the go-livepeer
repository (opens in a new tab) to get a completely
automated latest release installed onto your system. The script
requires presence of curl
, sha256sum
(for checksum verification)
and gpg
(for signature validation). To install required dependencies
please use the following commands (for popular ubuntu/mac systems):
Dependencies
# For ubuntu
apt install curl coreutils gnupg2
# For macOS
brew install curl coreutils gnupg
Installation
sh -c "$(curl -fsSL https://raw.github.com/livepeer/go-livepeer/master/install.sh)"
Additional steps to install custom release for individual OS are declared below.
Darwin (macOS)
# <RELEASE_VERSION> is the release version, e.g. v0.5.35
# IMPORTANT: if you are using macOS with an M1 chip, you'll need to run these commands using the Rosetta emulator
# Fetch the latest release
wget https://github.com/livepeer/go-livepeer/releases/download/<RELEASE_VERSION>/livepeer-darwin-amd64.tar.gz
# Next, extract it
tar -zxvf livepeer-darwin-amd64.tar.gz
# Finally, move it to the appropriate directory
mv livepeer-darwin-amd64/* /usr/local/bin/
Linux
# <RELEASE_VERSION> is the release version, e.g. v0.5.35
# Fetch the latest release
wget https://github.com/livepeer/go-livepeer/releases/download/<RELEASE_VERSION>/livepeer-linux-amd64.tar.gz
# Next, extract it
tar -zxvf livepeer-linux-amd64.tar.gz
# Finally, move it to the appropriate directory
mv livepeer-linux-amd64/* /usr/local/bin/
Windows
# <RELEASE_VERSION> is the release version, e.g. v0.5.35
# Fetch the latest release .zip
wget https://github.com/livepeer/go-livepeer/releases/download/<RELEASE_VERSION>/livepeer-windows-amd64.zip
# Next, extract it
unzip livepeer-windows-amd64.zip
# Finally, move it to the appropriate directory, e.g. C:\Users\UserName\livepeer-folder
move livepeer-windows-amd64 e.g. C:\Users\UserName\livepeer-folder
At this time Livepeer does not provide automatic updates. You can perform a manual update or use a script. A community-created Bash script to update Livepeer is available on the livepeer Forum (opens in a new tab).
Third-party packages
Packages for different Linux distributions are maintained by Livepeer community members. Before using these packages, please verify that they have been updated to use the latest builds of go-livepeer (opens in a new tab). This list will be updated as a best-effort, but we cannot guarantee if individual packages are up to date or verify their integrity.
In the future, Livepeer core contributors may publish official packages for the distributions below.
Platform | Installation | Source |
---|---|---|
Arch Linux | paru go-livepeer-bin | https://aur.archlinux.org/packages/go-livepeer-bin/ (opens in a new tab) |
Install using a Docker image
Prerequisites
If you do not have Docker installed, you will need to install it using the guide here (opens in a new tab) before running the commands below.
Installation
With every release, Docker images are pushed to DockerHub (opens in a new tab).
If you are running macOS with an M1 chip, you'll need to run your terminal using the Rosetta emulator (opens in a new tab) and specifically pull the linux/amd64
release. In the future, we will provide alternative arm64
builds.
# <RELEASE_VERSION> is the release version i.e. 0.5.14
docker pull livepeer/go-livepeer:<RELEASE_VERSION>
# Mac M1 only
docker pull --platform linux/amd64 livepeer/go-livepeer:<RELEASE_VERSION>
Running livepeer-cli with Docker
Once you've pulled the image, retrieve the image id and start the container.
Any flags you provide will be passed to the binary, so you can pass your configuration here.
docker run <image id> <livepeer configuration flags>
# Mac M1 only
docker run --platform linux/amd64 <image id> <livepeer configuration flags>
Once you've started the container, retrieve the name and start the CLI
docker exec -it <container_name> livepeer_cli
Installing pre-releases with Docker
To pull the latest pre-release version:
docker pull livepeer/go-livepeer:master
Build from source
System dependencies
Building livepeer
requires some system dependencies.
Linux (Ubuntu: 16.04 or 18.04)
apt-get update && apt-get -y install build-essential pkg-config autoconf git curl
Linux (Ubuntu: 20.04)
apt-get -y install protobuf-compiler-grpc golang-goprotobuf-dev
To enable transcoding using Nvidia GPUs on Linux systems
- CUDA must be installed on the system
clang
must be installed as well. The script that will installffmpeg
dependencies useswhich clang
command to determine whetherclang
is installed or not. Please check this on your system. If the path is empty, please installclang
. For example on the Ubuntu machine one can do
apt-get -y install clang clang-tools
Darwin (macOS)
brew update && brew install pkg-config autoconf
Windows
The steps in this file (opens in a new tab) can be used as a reference.
Go
Building livepeer
requires Go. Follow the
official Go installation instructions (opens in a new tab).
Build and install
- Clone the repository:
git clone https://github.com/livepeer/go-livepeer.git
cd go-livepeer
- Install
ffmpeg
dependencies:
./install_ffmpeg.sh
This is the step that requires which clang
to return clang path in order to
build CUDA support, as described above
- Set build environment variables.
Set the PKG_CONFIG_PATH
variable so that pkg-config
can find the ffmpeg
dependency files installed in step 2:
# install_ffmpeg.sh stores ffmpeg dependency files in this directory by default
export PKG_CONFIG_PATH=~/compiled/lib/pkgconfig
Set the BUILD_TAGS
variable to enable mainnet support:
export BUILD_TAGS=mainnet
# To build with support for only development networks and the Rinkeby test network
# export BUILD_TAGS=rinkeby
# To build with support for only development networks
# export BUILD_TAGS=dev
- Build and install
livepeer
:
make
cp livepeer* /usr/local/bin
Mac M1 users: If you see an error like ld: symbol(s) not found for architecture x86_64
, this is because of a conflict between dependency builds
and the Livepeer build. You should check that you are using the
*-darwin-arm64 binary (opens in a new tab) instead
of the *-darwin-amd64
binary. You can check what Go architecture you're
using with go version
.
Build with Docker
- Clone the repository:
git clone https://github.com/livepeer/go-livepeer.git
cd go-livepeer
- Export tags:
echo $(git describe --tags) > .git.describe
- Build image:
docker build -t livepeerbinary:debian -f docker/Dockerfile.debian .