THORChain Docs
DEVSNODES
  • Introduction
  • Using THORChain
    • Roles
      • Liquidity Providers (LPs)
      • Swappers
      • Arbitrageurs
      • Node Operators
    • RUNE
  • How It Works
    • Fees
    • Governance
    • Security
    • Incentive Pendulum
    • Emission Schedule
    • Constants and Mimir
    • THORChain Name Service
  • Ecosystem
  • Technology
    • Bifrost, TSS and Vaults
    • Midgard
    • Cosmos SDK
    • CosmWasm
    • IBC
    • THORChain & Cosmos
  • Frequently Asked Questions
    • Node Operators
    • Liquidity Providers
    • Asset Types
    • Savers
    • Lending
    • RUNEPool
  • THORChain Finance
    • Liquidity
    • Trade Assets
    • Secured Assets
    • TOR
    • RUNEPool
    • Synthetics
    • Savers
    • Lending
  • THORNodes
    • THORNode Overview
      • Node Operations
      • THORNode Stack
      • Risks, Costs and Rewards
    • Cluster Launcher
      • Setup - Linode
      • Setup - Azure
      • Setup - Hetzner Bare Metal
      • Setup - Google Cloud
      • Setup - HCloud
      • Setup - Digital Ocean
      • Setup - AWS
    • Deploying
    • Joining
    • Managing
    • Pooled THORNodes
    • Fullnode
      • Thornode - Kubernetes
      • Thornode - Linux
      • Thornode - Docker
      • Midgard - Linux
      • Midgard - Docker
      • Proxy Setup
    • Alerting
    • Leaving
    • 🛑Emergency Procedures
    • ✔️CHECKLIST
    • Multi-node Deployment
    • Developing
  • Website
  • Community Discord
  • Community Telegram
  • Developer Discord
Powered by GitBook
On this page
  • Prerequisites
  • Configuration
  • Work directory
  • Genesis
  • Sync
  • Start
Export as PDF
  1. THORNodes
  2. Fullnode

Thornode - Docker

Setting up a fullnode with Docker

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 packages needed for running and configuring the THORNode container

apt install -y --no-install-recommends aria2 curl docker.io jq pv

Configuration

Work directory

Prepare work directory

mkdir -p /opt/thornode/.thornode/config

Genesis

For joining the network, the correct genesis file is required

curl https://storage.googleapis.com/public-snapshots-ninerealms/genesis/17562000.json -o /opt/thornode/.thornode/config/genesis.json

Sync

The fastest way to join the network is by downloading a current snapshot and sync from it.

# get latest snapshot
FILENAME=$(curl -s "https://snapshots.ninerealms.com/snapshots?prefix=thornode" | grep -Eo "thornode/[0-9]+.tar.gz" | sort -n | tail -n 1 | cut -d "/" -f 2)

# download snapshot
aria2c --split=16 --max-concurrent-downloads=16 --max-connection-per-server=16 --continue --min-split-size=100M -d /opt/thornode/.thornode -o $FILENAME "https://snapshots.ninerealms.com/snapshots/thornode/${FILENAME}"

# ensure no chain data exists
rm -rf /opt/thornode/.thornode/data/{*.db,snapshot,cs.wal}

# extract snapshot
pv /opt/thornode/.thornode/$FILENAME | tar -xzf - -C /opt/thornode/.thornode --exclude "*_state.json"

# cleanup snapshot
rm -rf /opt/thornode/.thornode/$FILENAME

Start

Start the thornode container

docker run -d --restart=on-failure \
  -v /opt/thornode/.thornode:/root/.thornode \
  -e CHAIN_ID=thorchain-1 \
  -p 127.0.0.1:1317:1317 \
  -p 127.0.0.1:27147:27147 \
  -p 27146:27146 \
  --name thornode \
  registry.gitlab.com/thorchain/thornode:mainnet-2.135.1 
PreviousThornode - LinuxNextMidgard - Linux

Last updated 8 months ago