Skip to content

kulichr/BitMon

Repository files navigation

BitMon

A modern monitoring dashboard for multiple Bitcoin/Litecoin nodes reachable via IP:PORT (typically 8333/9333).

BitMon Dashboard

Features

  • Continuously check node availability over TCP
  • Measure connection latency
  • Generate alerts on:
    • Node going offline
    • Node coming back online
    • High latency threshold exceeded
  • Store history (7-day rolling window)
  • Display all nodes on a single overview screen
  • Detect Bitcoin/Litecoin node version via P2P version handshake
  • Per-node detail view:
    • Availability chart for 24 hours or 7 days
    • Latency chart for 24 hours or 7 days
  • Clean light design with dark mode toggle

Quick Start

npm install
npm start

The dashboard runs at http://localhost:3000.

Configuration

Node list

  1. Copy the example config and edit it with your nodes:

    cp config/nodes.example.json config/nodes.json
  2. Edit config/nodes.json:

[
  {
    "id": "btc-mainnet-1",
    "name": "BTC Mainnet #1",
    "host": "203.0.113.10",
    "port": 8333,
    "network": "bitcoin"
  }
]

The monitor reloads the config periodically; no restart needed after changes.

When overriding NODES_PATH via environment variables, ensure the file exists at that path.

Environment variables

Variable Default Description
PORT 3000 Server port
NODES_PATH config/nodes.json Path to node configuration
HISTORY_PATH data/history.json Path for persistent history storage
CHECK_INTERVAL_MS 60000 How often to check nodes (ms)
CHECK_TIMEOUT_MS 5000 TCP connection timeout (ms)
HIGH_LATENCY_MS 600 Threshold for high-latency alerts
VERSION_REFRESH_MS 1800000 How often to refresh node versions
VERSION_TIMEOUT_MS 8000 Version handshake timeout (ms)

Deployment

BitMon runs anywhere Node.js is supported. Choose the option that fits your setup.

Local / VPS / dedicated server

Clone, install, and run:

git clone https://github.com/kulichr/BitMon.git
cd BitMon
cp config/nodes.example.json config/nodes.json
# Edit config/nodes.json with your nodes
npm install
npm start

For production, use a process manager (e.g. systemd, PM2) and a reverse proxy (e.g. nginx, Caddy).

Docker

cp config/nodes.example.json config/nodes.json
# Edit config/nodes.json with your nodes
docker build -t bitmon .
docker run -d -p 3000:3000 \
  -v $(pwd)/config/nodes.json:/app/config/nodes.json \
  -v $(pwd)/data:/app/data \
  --name bitmon bitmon

Render.com

Blueprint – Push to GitHub, then in Render: New +Blueprint → select this repo. The included render.yaml will configure build, start, and health check.

Manual – Create a Web Service with Build: npm install, Start: npm start, Health: /api/health.

On the free tier the filesystem is ephemeral. To persist history, add a Disk (e.g. mount at /var/data) and set HISTORY_PATH=/var/data/history.json.

Railway, Fly.io, Heroku, etc.

Same idea as Render: set build to npm install, start to npm start, and configure PORT if required. Use a persistent volume for HISTORY_PATH if the platform supports it; otherwise history will reset on each deploy.

API

  • GET /api/nodes – Current status and metrics for all nodes
  • GET /api/alerts?limit=10 – Recent alerts (offline, online, high latency, version change)
  • GET /api/nodes/:nodeId/history?range=24h|7d – History for charts
  • GET /api/health – Health check endpoint

Security

  • config/nodes.json is gitignored. Do not commit it if it contains your real node IPs. Use config/nodes.example.json as a template.
  • If you previously committed nodes.json with real addresses, remove it from history:
    git rm --cached config/nodes.json
  • Sensitive values (API keys, passwords, etc.) should be set via environment variables, not in code.
  • data/history.json and .env are ignored by git.

Data storage

History is stored in data/history.json (ignored by git). The file is created automatically on first run.

About

Open source monitor for your Bitcoin nodes.

Topics

Resources

Stars

Watchers

Forks