Sign inSign up

magicdude4eva/btc-ckstats

By magicdude4eva

โ€ขUpdated 3 months ago

CKStats - A stats dashboard for CKPool-Solo, with PostgreSQL

Image
0

3.3K

magicdude4eva/btc-ckstats repository overview

โ CKStats

GitHub stars GitHub forks Docker Pulls Docker Stars GitHub issues GitHub last commit GitHub repo size Maintenance Contributions welcome

CKStats is a lightweight stats collector that parses the ckpool.log from your CKPool Soloโ  instance. It stores mining metrics in a PostgreSQL database and provides a dashboard to monitor miner performance over time.

โ Features

  • Web UI for tracking blocks, shares, and worker stats
  • Includes PostgreSQL database backend
  • Supervisor and cron-based scheduling for block sync
  • Easy deployment via Docker Compose

CKStats gives solo miners a real-time and historical view into their mining performance โ€” perfect for setups using NerdQAxe, Whatsminer, or Antminer hardware.

โ Usage (via Docker Compose)

CKStats depends on a working CKPool-Solo instance and reads its logs. Start it as part of a docker-compose setup:

docker compose --profile bitcoin up -d ckstats

View the dashboard at: http://<your-nas-ip>:4000

Logs will show when the service is connected and processing:

[info] Watching log: /cksolo/logs/ckpool.log
[info] Inserted share: bc1... | 60.1 TH/s | valid

โ ๐Ÿ” Environment Variables

You can control rebuild/reset behavior with:

REBUILD_APP: "1"          # Rebuild app and apply DB migrations
DB_REINITIALISE: "1"      # Wipe DB and re-init schema

Set both back to "0" after use to avoid data loss.

โ ๐Ÿง  Architecture

  • Parses: /cksolo/logs/ckpool.log
  • Stores: PostgreSQL under /ckstats/pgdata
  • Runs lightweight backend web interface on port 4000

โš ๏ธ PostgreSQL runs as user 100:103. Do not change ownership of pgdata, or the DB may break.

โ Volumes

  • /ckstats/pgdata โ€” persistent database volume (PostgreSQL)
  • /ckstats/config โ€” app config (optional overrides)

โ Ports

  • 4000 โ€“ Web UI

โ ๐Ÿงช Rebuild Instructions

To rebuild the app (e.g., after code changes or updates):

  1. Stop the container.
  2. Set REBUILD_APP=1 in docker-compose.yml
  3. Start again:
    docker compose --profile bitcoin up -d ckstats
    ```bash
    
  4. Once done, set REBUILD_APP=0 to prevent future unnecessary rebuilds.

โ Important Notes

  • The image uses supervisord to manage PostgreSQL, CKStats, and cron jobs
  • Make sure the CKPool log path is accessible inside the container
  • Check the cron job (ckstats-cron) for log sync timing

โ ๐Ÿ“ฆ Image Details

  • Based on Node.js 20 Alpine
  • Uses TypeORM for DB access
  • No frontend framework - just server-rendered HTML (fast + lean)

More: Main Stack Overviewโ 

โ Donations are always welcome

๐Ÿป Support my work
All my software is free and built in my personal time. If it helps you or your business, please consider a small donation via PayPalโ  โ€” it keeps the coffee โ˜• and ideas flowing!

๐Ÿ’ธ Crypto Donations
You can also send crypto to one of the addresses below:

(BTC)   bc1qdgdkk7l98pje8ny9u4xavsvrea8dw6yu8jpnyf
(ETH)   0x5986f713A538D6bCaC0865564dCD45E2600A3469  
(POL)   0x5986f713A538D6bCaC0865564dCD45E2600A3469
(CRO)   0xb83c3Fe378F5224fAdD7a0f8a7dD33a6C96C422C (Cronos or Crypto.com Paystring magicdude$paystring.crypto.com)
(BNB)   0x5986f713A538D6bCaC0865564dCD45E2600A3469
(LTC)   ltc1qexst2exxksfyg7erfzlfrm23twkjgf7e5fn64t
(DOGE)  DMQsxc9XGF6526drBJDZeX7AjFDJsEz4mN
(SOL)   t4bYQCUuoCUrp7kJ4Mz314npcTuKoUSXj28UgdMrfTb

๐Ÿงพ Recommended Platforms

Tag summary

Content type

Image

Digest

sha256:c03f1979fโ€ฆ

Size

366.1 MB

Last updated

3 months ago

docker pull magicdude4eva/btc-ckstats