Backend service orchestrator for the Tana blockchain. Manages Docker containers for all backend services.
# Install and link globally
bun install
bun link
# Interactive first-run setup
tana-engine setup
# Check status
tana-engine status
| Service | Port | Description |
|---|---|---|
| postgres | 5432 | PostgreSQL database |
| redis | 6379 | Queue backend |
| api | 8080 | Public API gateway |
| ledger | 8501 | Blockchain state |
| queue | 8502 | Transaction ingestion |
| mesh | 8503 | Network coordination |
| identity | 8504 | QR authentication |
| consensus | 8505 | Validator coordination (HTTP) |
| edge | 8506 | Contract execution |
| t4 | 8507 | Content-addressable storage |
| notifications | 8091 | Push notifications |
Interactive setup for new servers:
tana-engine setup
The setup wizard asks:
This pulls required images, starts selected services, and optionally initializes genesis.
# Start all services
tana-engine start
# Start with genesis block initialization (first run)
tana-engine start --genesis
# Stop specific services
tana-engine stop postgres
tana-engine stop ledger consensus
# Stop all services
tana-engine stop all
# Stop all and remove data
tana-engine stop all --volumes
# Restart specific services
tana-engine restart ledger
tana-engine restart mesh t4
# Restart everything
tana-engine restart all
tana-engine status
Output:
● [postgres] healthy :5432
● [redis] healthy :6379
● [api] healthy :8080
● [ledger] healthy :8501
...
● [summary] all 11 services running
# All logs
tana-engine logs
# Specific service
tana-engine logs ledger
# Follow in real-time
tana-engine logs -f ledger
# Last 50 lines
tana-engine logs -n 50 ledger
# Initialize genesis block (requires ledger running)
tana-engine genesis
# Scan for outdated images
tana-engine check
Output:
○ [postgres] 79c06d285ed9 → 46258a3eb38a (update available)
○ [redis] ee64a64eaab6 → 4706ecab5371 (update available)
● [ledger] 6fba971d70d1 :8501
...
○ [summary] 5 updates available
# Pull latest images (without restarting)
tana-engine update
# Pull all images, not just outdated
tana-engine update --all
# Stop, pull new image, restart, cleanup old images
tana-engine upgrade
This performs a graceful upgrade:
# Start automatic update checking (every 5 minutes)
tana-engine monitor
# Monitor with auto-upgrade (restarts containers)
tana-engine monitor --upgrade
# Check monitor status
tana-engine monitor status
# Stop automatic monitoring
tana-engine monitor stop
Platform support:
~/Library/LaunchAgents)schtasks.exe)Logs are written to ~/.tana-engine-monitor.log.
bun install
bun link # Makes tana-engine available globally
The engine expects sibling service directories:
tana/
├── engine/ # This repo
├── api/ # API gateway
├── ledger/ # Blockchain state
├── queue/ # Transaction queue
├── mesh/ # Network coordination
├── identity/ # Authentication
├── consensus/ # Validator coordination
├── edge/ # Contract execution
├── t4/ # Static assets
└── notifications/ # Push notifications
Each service must have a Dockerfile at its root.
cp .env.example .env
Key variables:
VALIDATOR_ID - Unique validator identifierVALIDATOR_PUBLIC_KEY - Validator's public keySOVEREIGN_PUBLIC_KEY - Network sovereign keyCHAIN_NAME - Blockchain name (default: "local")PEERS - JSON array of peer WebSocket URLs# Compile to standalone binary
bun run build
# Output: dist/tana-engine
Port conflicts:
# Check what's using a port
lsof -i :8501
# Kill process on port
lsof -ti :8501 | xargs kill
Service won't start:
# Check logs
tana-engine logs <service>
# Rebuild image
docker compose build <service>
Reset everything:
tana-engine stop all --volumes
tana-engine start --genesis
Backend service orchestrator for the Tana blockchain. Manages Docker containers for all backend services.
# Install and link globally
bun install
bun link
# Interactive first-run setup
tana-engine setup
# Check status
tana-engine status
| Service | Port | Description |
|---|---|---|
| postgres | 5432 | PostgreSQL database |
| redis | 6379 | Queue backend |
| api | 8080 | Public API gateway |
| ledger | 8501 | Blockchain state |
| queue | 8502 | Transaction ingestion |
| mesh | 8503 | Network coordination |
| identity | 8504 | QR authentication |
| consensus | 8505 | Validator coordination (HTTP) |
| edge | 8506 | Contract execution |
| t4 | 8507 | Content-addressable storage |
| notifications | 8091 | Push notifications |
Interactive setup for new servers:
tana-engine setup
The setup wizard asks:
This pulls required images, starts selected services, and optionally initializes genesis.
# Start all services
tana-engine start
# Start with genesis block initialization (first run)
tana-engine start --genesis
# Stop specific services
tana-engine stop postgres
tana-engine stop ledger consensus
# Stop all services
tana-engine stop all
# Stop all and remove data
tana-engine stop all --volumes
# Restart specific services
tana-engine restart ledger
tana-engine restart mesh t4
# Restart everything
tana-engine restart all
tana-engine status
Output:
● [postgres] healthy :5432
● [redis] healthy :6379
● [api] healthy :8080
● [ledger] healthy :8501
...
● [summary] all 11 services running
# All logs
tana-engine logs
# Specific service
tana-engine logs ledger
# Follow in real-time
tana-engine logs -f ledger
# Last 50 lines
tana-engine logs -n 50 ledger
# Initialize genesis block (requires ledger running)
tana-engine genesis
# Scan for outdated images
tana-engine check
Output:
○ [postgres] 79c06d285ed9 → 46258a3eb38a (update available)
○ [redis] ee64a64eaab6 → 4706ecab5371 (update available)
● [ledger] 6fba971d70d1 :8501
...
○ [summary] 5 updates available
# Pull latest images (without restarting)
tana-engine update
# Pull all images, not just outdated
tana-engine update --all
# Stop, pull new image, restart, cleanup old images
tana-engine upgrade
This performs a graceful upgrade:
# Start automatic update checking (every 5 minutes)
tana-engine monitor
# Monitor with auto-upgrade (restarts containers)
tana-engine monitor --upgrade
# Check monitor status
tana-engine monitor status
# Stop automatic monitoring
tana-engine monitor stop
Platform support:
~/Library/LaunchAgents)schtasks.exe)Logs are written to ~/.tana-engine-monitor.log.
bun install
bun link # Makes tana-engine available globally
The engine expects sibling service directories:
tana/
├── engine/ # This repo
├── api/ # API gateway
├── ledger/ # Blockchain state
├── queue/ # Transaction queue
├── mesh/ # Network coordination
├── identity/ # Authentication
├── consensus/ # Validator coordination
├── edge/ # Contract execution
├── t4/ # Static assets
└── notifications/ # Push notifications
Each service must have a Dockerfile at its root.
cp .env.example .env
Key variables:
VALIDATOR_ID - Unique validator identifierVALIDATOR_PUBLIC_KEY - Validator's public keySOVEREIGN_PUBLIC_KEY - Network sovereign keyCHAIN_NAME - Blockchain name (default: "local")PEERS - JSON array of peer WebSocket URLs# Compile to standalone binary
bun run build
# Output: dist/tana-engine
Port conflicts:
# Check what's using a port
lsof -i :8501
# Kill process on port
lsof -ti :8501 | xargs kill
Service won't start:
# Check logs
tana-engine logs <service>
# Rebuild image
docker compose build <service>
Reset everything:
tana-engine stop all --volumes
tana-engine start --genesis