This repository contains files to build and run a Docker image for Theta blockchain Guardian Node
-
Clone the repository and build the image:
docker build .
-
Prepare a directory to store Theta blockchain data. Let's call it
/data
. Download Theta configuration and Theta snapshot files and put them into the/data
directory. You'll need to mount/data
directory to the Theta container later -
Modify any values in the Theta configuration file according to your needs
-
Run Theta node using Docker:
docker run -d -v /data:/theta_mainnet/guardian_mainnet/node <IMAGE> theta start --config=/theta_mainnet/guardian_mainnet/node --password=<SOME_STRONG_PASSWORD>
When the Theta node launches for the first time, you need to choose a password to encrypt the signing key of the guardian node. Please choose a secure password and keep it in a safe place. The next time when you restart the node, you will need the password to unlock it.
It might take some time for the node to sync up with the network
To run a Theta node you can use the following docker-compose.yaml
example:
---
version: '3'
services:
theta-node:
image: <THETA_NODE_IMAGE>
container_name: theta-node
restart: unless-stopped
command:
- "theta"
- "start"
- "--config=/theta_mainnet/guardian_mainnet/node"
- "--password"
- "<SOME_STRONG_PASSWORD>"
network_mode: host
volumes:
- /data:/theta_mainnet/guardian_mainnet/node
ulimits:
nofile: 4096
stop_signal: SIGINT
stop_grace_period: 2m
logging:
driver: "json-file"
options:
max-size: "2m"
max-file: "10"