The steps shown here are tested on Ubuntu 24.04, different distributions may need adjustments to the commands.
All commands are meant to be run as root user, if not specified otherwise. Depending on the server installation, they may need to be run from a different user via sudo.
Prerequisites
Install all needed packages for building and running midgard
List of installed extensions
Name | Version | Schema | Description
-------------+---------+------------+---------------------------------------------------------------------------------------
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
timescaledb | 2.16.1 | public | Enables scalable inserts and complex queries for time-series data (Community Edition)
(2 rows)
Install
As midgard user run:
git clone --branch 2.24.4 https://gitlab.com/thorchain/midgard.git $HOME/build
cd $HOME/build
export ENV CGO_ENABLED=1
go install -v -installsuffix cgo ./cmd/blockstore/dump
go install -v -installsuffix cgo ./cmd/midgard
go install -v -installsuffix cgo ./cmd/trimdb
go install -v -installsuffix cgo ./cmd/statechecks
mkdir -p $HOME/{config,openapi/generated}
cp openapi/generated/doc.html $HOME/openapi/generated/
Configuration
As midgard user run:
mkdir $HOME/config
# get genesis.json
curl https://storage.googleapis.com/public-snapshots-ninerealms/genesis/17562000.json -o $HOME/config/genesis.json