Skip to content

evehash/bitpeek

Repository files navigation

bitpeek

Lightweight Bitcoin blockchain explorer. A single Go binary with zero external dependencies that connects to your own Bitcoin Core node (and optionally Electrs) and serves a fast, server-rendered web UI.

About the project

bitpeek is built for self-hosters who want a private explorer pointed at their own node, without pulling in databases, indexers or a JS toolchain. The whole application — templates, CSS and assets — is compiled into a ~9 MB static binary using Go's embed.

Highlights:

  • Go stdlib only. go.mod has no require lines.
  • Server-rendered HTML via html/template, with htmx (loaded from CDN) for partial updates like dashboard auto-refresh and pagination.
  • Bitcoin Core JSON-RPC for blocks, transactions, mempool, fees and node status.
  • Electrs (Electrum protocol) for address balance, UTXOs and transaction history.
  • Dark / light theme with a violet accent, toggled client-side via localStorage.
  • Pure-Go address decoding (base58check + bech32/bech32m) — no third-party crypto libraries.

Requirements

  • Go 1.22+ (the project currently targets Go 1.26).
  • A reachable Bitcoin Core node with JSON-RPC enabled.
  • Optionally, an Electrs instance for address lookups.

Build & run

# Production build (~9 MB, stripped binary)
go build -ldflags="-s -w" -o bitpeek .
./bitpeek

# Development (rebuilds on each run)
go run .

By default the server listens on :3000.

Configuration

Copy the example file and edit it to match your node:

cp config.example.json config.json

The config path can be overridden with the BITPEEK_CONFIG environment variable.

Relevant sections:

  • server — host and port the HTTP server binds to.
  • bitcoin — Bitcoin Core RPC host, port and credentials.
  • electrs — Electrs host and port (optional but required for address pages).
  • app — UI tunables: page sizes, refresh intervals, etc.

The defaults work out of the box against a Bitcoin Core node running on localhost:8332.

Docker

docker compose up --build

The provided docker-compose.yml mounts config.json from the host into the container as read-only. Make sure the file exists before running.

Project layout

main.go                    Entry point, embeds, routing
internal/
  config/                  JSON config loader
  rpc/                     Bitcoin Core JSON-RPC client
  electrs/                 Electrs TCP client
  address/                 Address decoding + scripthash
  handler/                 HTTP handlers (one file per page)
  templates/               Template parsing + helpers
templates/                 HTML templates (embedded)
static/                    CSS + favicon (embedded)

License

TBD.

The UI uses inline SVG icons from Lucide, copied into the templates and redistributed under the Lucide ISC license. See THIRD_PARTY_LICENSES.md for the full notice.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors