⚠️ WARNING ⚠️
This project relies on an API that is not reliable. As such, I will not be updating this code.
Uses Bitcoin's RPC interface to get node data and display it in a Python Flask application
- Source code: GitHub
- Image base: Python (slim Buster)
- Init system: N/A
- Application: N/A
- I was looking for a way to monitor my Bitcoin node from my phone, without needing to log in and tail the log files.
- There were already a few very good existing applications, but they didn't quite meet my needs:
- I'm also not looking to replace Clark Moody's dashboard, since this is supposed to be about statistics on a single node
- This project was heavily inspired by this script, but implemented (rather poorly) in Python, runs in Docker, and uses Bitcoin's RPC interface (to connect to remote nodes).
⚠️Bitcoin's RPC connection is not encrypted via SSL (as-of v0.12.0), so do NOT use this over the public internet ⚠️ ⚠️I would recommend NOT running a wallet on the node you're querying, to minimize chance of loss of funds ⚠️
- You must already have a working Bitcoin node somewhere, and the ability (via the bitcon.conf file) to connect to that node via the RPC interface.
- Because of the number of RPCs required, you'll need to set
rpcworkqueue=32(or higher) in
Docker image information
|BITCOIND_HOST||No (default: localhost)||Bitcoin node address||'localhost' or your Docker service name|
|BITCOIND_PORT||No (default: 8332)||Bitcoin node||8332|
|CURRENCY||No (default: USD)||Three-character currency code||USD||
|PAGE_TITLE||No (default: Bitcoind status)||HTML
||Bitcoin is great|
|Port on host||Port in container||Comments|
|Choose at your discretion||5000||Flask (web interface)|
git clone https://github.com/loganmarchione/docker-bitcoind-status.git cd docker-bitcoind-status sudo docker build --no-cache --file Dockerfile --tag loganmarchione/docker-bitcoind-status .
Page will be available only over HTTPS at
https://YOUR_IP_ADDRESS:PORT_YOU_CHOSE (there will be a self-signed certificate from Flask).
sudo docker run --name docker-bitcoind-status \ --env BITCOIND_HOST=10.10.1.32 \ --env BITCOIND_PORT=8332 \ --env RPC_USER=satoshi \ --env RPC_PASS=Bitc0inIsGreat1 \ --env CURRENCY=USD \ --env PAGE_TITLE="Bitcoin is great" \ -p 5000:5000 \ loganmarchione/docker-bitcoind-status
- Learn Python
- Learn Flask
- Add a proper web server (e.g., Gunicorn, WSGI, etc...)
Add a healthcheck
- Change request connection timeout (currently default)
- Fix error on bad node connection (should exit, but doesn't)
Add second table
Find more elegant way to make the RPCs (maybe a function or something?)
Add price check
- Add better exception handling to price check
- Find a way to get total number of BTC mined (
gettxoutsetinfo) was too slow
Add SSL support
Switch to Ubuntu-based Python image (needed for SSL support)