This repository contains Docker configuration files to run an Ergo Node. It provides a streamlined way to set up and run an Ergo node using Docker containers with persistent blockchain data.
Clone this repository:
git clone https://github.com/your-username/ergo-node-docker.git
cd ergo-node-docker
Copy the example environment file and edit it with your settings:
cp .env.example .env
Edit the .env
file with your preferred settings:
VERSION=5.0.24 # Ergo node version
NODE_NAME='YOUR NODE NAME HERE - NO QUOTES' # Your node name
API_KEY_PASSWORD='YOUR PASSWORD HERE - NO QUOTES' # API key password
JAVA_OPTS=-Xmx4g # Java memory options
ENABLE_LITE_NODE=false # Enable/disable lite node
ENABLE_EXTRA_INDEX=false # Enable/disable extra indexing
Build and start the node:
docker-compose up -d
VERSION
: Ergo node version to useNODE_NAME
: Name of your node (visible to other peers)API_KEY_PASSWORD
: Password for API accessJAVA_OPTS
: Java VM options (default: -Xmx4g
)ENABLE_LITE_NODE
: Enable lite node mode (default: false
)ENABLE_EXTRA_INDEX
: Enable extra indexing (default: false
)The node exposes the following ports:
9030
: P2P network port9053
: REST API portThe node uses a named Docker volume ergo-data
to store the blockchain data. This ensures:
.
├── .env # Environment configuration
├── docker-compose.yml # Docker Compose configuration
├── Dockerfile # Docker image definition
├── entrypoint.sh # Container entrypoint script
├── ergo.conf.template # Ergo node configuration template
└── README.md # This file
docker-compose up -d
docker-compose logs -f
docker-compose down
# Note: Do NOT use 'docker-compose down -v' as it will delete your blockchain data
.env
filedocker-compose down
docker-compose build --no-cache
docker-compose up -d
# List volumes
docker volume ls
# Inspect volume
docker volume inspect ergo-data
# Check volume size
docker system df -v | grep ergo-data
# Stop the container first
docker-compose down
# Create backup
docker run --rm -v ergo-data:/source -v $(pwd):/backup alpine tar czf /backup/ergo-data-backup.tar.gz -C /source .
# Stop the container first
docker-compose down
# Restore from backup
docker run --rm -v ergo-data:/target -v $(pwd):/backup alpine sh -c "cd /target && tar xzf /backup/ergo-data-backup.tar.gz"
# This will delete all blockchain data - you'll need to resync!
docker volume rm ergo-data
Monitor disk space usage:
docker system df -v
Check logs for errors:
docker-compose logs --tail=100
Keep your node version updated
Regularly backup your data volume
You can monitor your node's status through:
docker-compose logs -f
http://localhost:9053/info
.env
fileContainer fails to start
docker-compose logs
.env
Node not syncing
docker system df
Out of memory
JAVA_OPTS
in .env
fileVolume Issues
docker volume ls
docker volume inspect ergo-data
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.