All-in-one Docker setup for Hyperion History API with infrastructure services.
This repository provides a , fully configurable Docker setup that combines:
- Hyperion History API - Blockchain history and streaming API
- Elasticsearch - Data storage and search
- RabbitMQ - Message queue for indexing pipeline
- Redis - Caching and rate limiting
- Kibana (optional) - Data visualization
- Redis Commander (optional) - Redis management UI
All configuration is done via environment variables, making it easy to deploy for different chains and environments.
# Clone this repository
git clone <repo-url> hyperion
cd hyperion
# Initialize - automatically clones hyperion-history-api with submodules
./init.shThe init.sh script will:
- Clone
hyperion-history-apifrom GitHub with all submodules - Create
.envfrom template - Initialize git submodules (node-abieos, etc.)
Edit .env to configure your chain and credentials:
# Required: Chain configuration
CHAIN_NAME=wire
CHAIN_DISPLAY_NAME=Wire Network
CHAIN_ID=<your-chain-id>
CHAIN_HTTP_ENDPOINT=https://your-chain-api.com
CHAIN_SHIP_ENDPOINT=ws://your-ship-endpoint:8080
# Required: Change these passwords!
ELASTIC_PASSWORD=your-secure-password
REDIS_PASSWORD=your-secure-password
RABBITMQ_PASSWORD=your-secure-password
KIBANA_PASSWORD=your-secure-password./start.shThe API will be available at http://localhost:7000
hyperion/
├── Dockerfile # Hyperion container
├── docker-compose.yaml # All services definition
├── entrypoint.sh # Container entrypoint script
├── .env.template # Environment variables template
├── config/
│ ├── connections.template.json # Connections config template
│ └── chains/
│ └── wire.config.template.json # Chain config template
├── hyperion-history-api/ # Hyperion source code (clone here)
├── init.sh # Initialization script
├── start.sh # Start services
├── stop.sh # Stop services
├── build.sh # Build images
├── logs.sh # View logs
└── README.md # This file
| Variable | Description | Required |
|---|---|---|
CHAIN_NAME |
Chain identifier (e.g., wire, eos) |
Yes |
CHAIN_DISPLAY_NAME |
Display name | Yes |
CHAIN_ID |
Chain ID from get_info | Yes |
CHAIN_HTTP_ENDPOINT |
RPC HTTP endpoint | Yes |
CHAIN_SHIP_ENDPOINT |
State History WebSocket | Yes |
CHAIN_CORE_TOKEN |
Core token symbol | No (default: SYS) |
| Variable | Description | Required |
|---|---|---|
ELASTIC_PASSWORD |
Elasticsearch password | Yes |
REDIS_PASSWORD |
Redis password | Yes |
RABBITMQ_PASSWORD |
RabbitMQ password | Yes |
KIBANA_PASSWORD |
Kibana password | No |
| Variable | Description | Default |
|---|---|---|
INDEXER_START_BLOCK |
First block to index | 0 |
INDEXER_STOP_BLOCK |
Last block (0 = continuous) | 0 |
INDEXER_LIVE_READER |
Follow live blocks | true |
INDEXER_LIVE_ONLY |
Only index live blocks | false |
INDEXER_ABI_SCAN_MODE |
ABI-only scanning | false |
INDEXER_REWRITE |
Rewrite existing data | false |
INDEXER_PURGE_QUEUES |
Clear queues on start | true |
INDEXER_FETCH_BLOCK |
Index block data | true |
INDEXER_FETCH_TRACES |
Index action traces | true |
INDEXER_PROCESS_DELTAS |
Process state deltas | false |
INDEXER_NODE_HEAP |
Node.js heap size (MB) | 4096 |
| Variable | Description | Default |
|---|---|---|
API_SERVER_PORT |
HTTP API port | 7000 |
API_STREAM_PORT |
WebSocket stream port | 1234 |
API_ENABLE_CACHING |
Enable response caching | true |
API_CACHE_LIFE |
Cache TTL (seconds) | 1 |
API_RATE_LIMIT_RPM |
Requests per minute | 1000 |
API_DISABLE_RATE_LIMIT |
Disable rate limiting | false |
API_ENABLE_STREAMING |
Enable WebSocket streaming | true |
API_PM2_SCALING |
Number of API processes | 1 |
API_NODE_HEAP |
Node.js heap size (MB) | 1024 |
| Variable | Description | Default |
|---|---|---|
SCALING_READERS |
State history readers | 1 |
SCALING_DS_QUEUES |
Deserialization queues | 1 |
SCALING_DS_THREADS |
Deserialization threads | 1 |
SCALING_DS_POOL_SIZE |
Deserialization pool | 1 |
SCALING_INDEXING_QUEUES |
Indexing queues | 1 |
SCALING_BATCH_SIZE |
Batch size | 5000 |
SCALING_MAX_AUTOSCALE |
Max autoscale workers | 4 |
| Variable | Description | Default |
|---|---|---|
ES_MEMORY_LIMIT |
Elasticsearch memory | 4G |
INDEXER_MEMORY_LIMIT |
Indexer container memory | 6G |
API_MEMORY_LIMIT |
API container memory | 2G |
KIBANA_MEMORY_LIMIT |
Kibana memory | 4G |
Initializes the environment and clones hyperion-history-api:
./init.sh # Clone and initialize
./init.sh --branch develop # Use specific branch
./init.sh --force # Re-clone (removes existing)
./init.sh --skip-clone # Use existing directory
./init.sh --repo <url> # Clone from different repoStarts all services:
./start.sh # Start in background
./start.sh --tools # Include Kibana and Redis Commander
./start.sh --build # Force rebuild images
./start.sh -f # Run in foreground (show logs)Stops all services:
./stop.sh # Stop services
./stop.sh -v # Stop and remove volumes (WARNING: deletes data)Builds Docker images:
./build.sh # Build images
./build.sh --no-cache # Build without cacheView service logs:
./logs.sh # All services
./logs.sh --indexer # Just indexer
./logs.sh --api # Just API
./logs.sh --es # Elasticsearch
./logs.sh --no-follow # Don't follow (just show recent)
./logs.sh -n 500 # Show last 500 linesOnce running, the API provides:
- Health Check:
GET http://localhost:7000/v2/health - Chain Info:
GET http://localhost:7000/v1/chain/get_info - Actions:
GET http://localhost:7000/v2/history/get_actions - Transaction:
GET http://localhost:7000/v2/history/get_transaction - Account:
GET http://localhost:7000/v2/state/get_account - API Docs:
http://localhost:7000/v2/docs
Enable with --profile tools:
docker compose --profile tools up -d- Kibana:
http://localhost:5601 - Redis Commander:
http://localhost:8089 - RabbitMQ Management:
http://localhost:15672
Increase vm.max_map_count:
sudo sysctl -w vm.max_map_count=262144
echo 'vm.max_map_count=262144' | sudo tee -a /etc/sysctl.confdocker compose ps
docker compose logs --tail=50 <service-name>./stop.sh -v
./start.sh --build./logs.sh --indexerTo add a new chain:
- Create config template:
config/chains/<chain>.config.template.json - Set
CHAIN_NAME=<chain>in.env - Configure chain endpoints in
.env - Restart services
FSL-1.1-Apache-2.0