Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install IRIShub
# Upgrade the system and install go
sudo apt update
sudo apt upgrade -y
sudo apt install gcc git make -y
sudo snap install --classic go
sudo mkdir -p /opt/go/bin
# Export environment variables
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$PATH
# Create a system user for running the service
sudo useradd -m -d /opt/iris --system --shell /usr/sbin/nologin iris
sudo -u iris mkdir -p /opt/iris/config
# Get IRIShub and build binaries
go get
cd $HOME/go/src/
git fetch --all
git checkout -f v0.13.1
make all
# Copy the binaries to /opt/go/bin/
sudo cp $HOME/go/bin/iris* /opt/go/bin/
# Create systemd unit file
echo "[Unit]
Description=IRIShub Node
ExecStart=/opt/go/bin/iris start --home=/opt/iris/
[Install]" > iris.service
sudo mv iris.service /etc/systemd/system/
sudo systemctl enable iris.service
# Create the config skeleton as user iris
sudo -u iris /opt/go/bin/iris unsafe-reset-all --home=/opt/iris
echo "You can copy the genesis.json file to /opt/iris/config and edit the /opt/iris/config/config.toml."
echo "Run 'sudo service iris start' to start the service."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.