blockchain/docker
Claude a6773abaca
Some checks are pending
Build & Release / Linux x86_64 (push) Waiting to run
Build & Release / macOS ARM64 (push) Waiting to run
Build & Release / Create Release (push) Blocked by required conditions
fix(pos): add --rpc-ignore-offline to all daemon configs
PoS mining requires this flag when the daemon has no peers. Without it,
the daemon's get_pos_mining_details RPC returns DISCONNECTED status and
the wallet refuses to mint.

First PoS blocks minted on testnet at height 12,382.

Co-Authored-By: Charon <charon@lethean.io>
2026-04-03 13:53:07 +01:00
..
demos feat(demos): expanded VHS demo library with live data 2026-04-03 13:11:47 +01:00
lethean fix(pos): add --rpc-ignore-offline to all daemon configs 2026-04-03 13:53:07 +01:00
.env fix(pos): add --rpc-ignore-offline to all daemon configs 2026-04-03 13:53:07 +01:00
.env.example feat(docker): add home node and exit node compose files 2026-04-03 12:14:05 +01:00
build-all-platforms.sh fix(pos): add --rpc-ignore-offline to all daemon configs 2026-04-03 13:53:07 +01:00
deploy.sh fix(deploy): auto-generate JWT secret, include node/exit composes and helpers 2026-04-03 12:37:57 +01:00
docker-compose.ecosystem.yml fix(docker): correct LNS env vars in ecosystem compose (DAEMON_URL not DAEMON_RPC) 2026-04-03 12:05:48 +01:00
docker-compose.exit.yml fix(pos): add --rpc-ignore-offline to all daemon configs 2026-04-03 13:53:07 +01:00
docker-compose.local.yml feat(docker): full ecosystem Docker deployment 2026-04-03 11:14:30 +01:00
docker-compose.node.yml fix(pos): add --rpc-ignore-offline to all daemon configs 2026-04-03 13:53:07 +01:00
docker-compose.nodes.yml fix(pos): add --rpc-ignore-offline to all daemon configs 2026-04-03 13:53:07 +01:00
docker-compose.pull.yml fix(pos): add --rpc-ignore-offline to all daemon configs 2026-04-03 13:53:07 +01:00
docker-compose.testnet.yml fix(pos): add --rpc-ignore-offline to all daemon configs 2026-04-03 13:53:07 +01:00
docker-compose.vpn.yml fix(pos): add --rpc-ignore-offline to all daemon configs 2026-04-03 13:53:07 +01:00
Dockerfile.cross-build fix(pos): add --rpc-ignore-offline to all daemon configs 2026-04-03 13:53:07 +01:00
Dockerfile.staking-node fix(pos): add --rpc-ignore-offline to all daemon configs 2026-04-03 13:53:07 +01:00
health.sh feat(docker): full ecosystem Docker deployment 2026-04-03 11:14:30 +01:00
lethean-testnet.service feat(docker): full ecosystem Docker deployment 2026-04-03 11:14:30 +01:00
pool-config.json fix(docker): point pool explorer URLs to local Docker explorer 2026-04-03 11:15:06 +01:00
README.md docs: add deployment options table and helper scripts to README 2026-04-03 12:35:28 +01:00
test-network.sh fix(pos): add --rpc-ignore-offline to all daemon configs 2026-04-03 13:53:07 +01:00

Lethean Testnet — Docker Deployment

Run the full Lethean ecosystem in Docker. No compilation needed.

Deployment Options

Compose File For Services
docker-compose.node.yml Home node operator Daemon + wallet (PoS staking)
docker-compose.exit.yml VPN exit node operator Daemon + wallet + WireGuard
docker-compose.pull.yml Full ecosystem All 8 services + databases

Helper Scripts

bash demos/helpers/chain-info.sh      # Chain height, difficulty, status
bash demos/helpers/chain-aliases.sh   # List on-chain aliases
bash demos/helpers/wallet-address.sh  # Show your wallet address
bash demos/helpers/wallet-balance.sh  # Check LTHN balance
bash health.sh                        # Full ecosystem health check

Quick Start

# 1. Configure
cp .env.example .env
# Edit .env — at minimum change JWT_SECRET and WALLET_PASSWORD

# 2. Start
docker compose -f docker-compose.pull.yml up -d

# 3. Check
docker compose -f docker-compose.pull.yml ps

The daemon takes ~30 seconds to initialise the chain database on first run. Other services wait for the daemon health check before starting.

Services

Service URL Description
Block Explorer http://localhost:3335 Browse blocks, transactions, aliases
Trade DEX http://localhost:3338 Decentralised exchange frontend
Trade API http://localhost:3336 REST API for trade operations
Mining Pool http://localhost:2117 Pool stats API
Pool Stratum localhost:5555 Connect miners here
LNS http://localhost:5553 Lethean Name Service HTTP API
LNS DNS localhost:5354 DNS resolver for .lthn names
Daemon RPC http://localhost:46941 Chain node JSON-RPC
Wallet RPC http://localhost:46944 Wallet JSON-RPC
Docs http://localhost:8099 Documentation site

Mining

Connect a ProgPoWZ miner to the pool stratum:

stratum+tcp://YOUR_IP:5555

Compatible miners:

  • progminer (recommended) — progminer -P stratum+tcp://YOUR_WALLET_ADDRESS@localhost:5555
  • T-Rex — ProgPoWZ algorithm
  • TeamRedMiner — ProgPoWZ algorithm

Wallet

The wallet auto-creates on first start. To check your balance:

curl -s http://localhost:46944/json_rpc \
  -d '{"jsonrpc":"2.0","id":"0","method":"getbalance"}' \
  -H 'Content-Type: application/json'

The wallet runs with PoS mining enabled (--do-pos-mining), so it will stake any balance automatically.

Chain Status

curl -s http://localhost:46941/json_rpc \
  -d '{"jsonrpc":"2.0","id":"0","method":"getinfo"}' \
  -H 'Content-Type: application/json' | python3 -m json.tool

Volumes

Volume Contains Backup?
chain-data Blockchain database (LMDB) Optional — can resync
wallet-data Wallet file + keys Critical — back up regularly
explorer-db Explorer PostgreSQL Can recreate from chain
trade-db Trade PostgreSQL Important for trade history

Backup wallet

docker compose -f docker-compose.pull.yml stop wallet
docker cp lthn-wallet:/wallet ./wallet-backup-$(date +%Y%m%d)
docker compose -f docker-compose.pull.yml start wallet

Ports

All ports can be changed via .env. See .env.example for the full list.

If you're running behind a firewall and want external access:

  • P2P: Open port 46942 (TCP) for other nodes to connect
  • Stratum: Open port 5555 (TCP) for external miners
  • Explorer: Open port 3335 (TCP) for public block explorer

Troubleshooting

Daemon crashes on start: Check logs with docker logs lthn-daemon. Common causes:

  • Port already in use — change ports in .env
  • Corrupt chain data — remove volume: docker volume rm docker_chain-data

Wallet shows 0 balance: The wallet needs to sync with the daemon first. Check sync status in daemon logs. New wallets start empty — mine or receive LTHN to fund them.

Pool shows "Daemon died": The pool needs both the daemon and wallet running. Check both are healthy:

docker compose -f docker-compose.pull.yml ps daemon wallet

Explorer shows "offline": The explorer connects to the daemon internally. If the daemon is still syncing, the explorer will show offline until sync completes.

Stopping

docker compose -f docker-compose.pull.yml down        # stop containers
docker compose -f docker-compose.pull.yml down -v      # stop + delete data

Building from Source

If you want to build the images yourself instead of pulling pre-built ones:

docker compose -f docker-compose.ecosystem.yml build
docker compose -f docker-compose.ecosystem.yml up -d

This requires the full source tree — see the main repository README.