PyBLOCK's mode A (Bitcoin + Lightning) and mode B (Bitcoin only) call
bitcoin-cli and lncli directly via subprocess. The Umbrel image did not
ship those binaries, so the startup validation in PyBlock.py:1898-1909
detected the empty CLI paths and silently redirected to Lite Mode against
public APIs — defeating the point of installing PyBLOCK on a node.
Per nmfretz's review on getumbrel/umbrel-apps#5258, this takes the
"bundle the binaries inside the PyBLOCK image" path (option 2):
- dockerfile: download bitcoin-cli (Bitcoin Core 28.1) and lncli (LND
v0.20.1-beta, matching what Umbrel ships) for both linux/amd64 and
linux/arm64. Verifies the Bitcoin Core SHA256SUMS. Real binaries land
at /usr/local/bin/{bitcoin-cli,lncli}.bin.
- umbrel/{bitcoin-cli,lncli}-wrapper.sh: thin shell wrappers installed
as /usr/local/bin/{bitcoin-cli,lncli} that exec the real binary with
-rpcconnect/-rpcuser/-rpcpassword (or --rpcserver/--tlscertpath/
--macaroonpath for lncli) injected from the BITCOIN_RPC_* / LND_*
env vars Umbrel provides via APP_BITCOIN_* / APP_LIGHTNING_*. They
fail loud if those env vars are missing.
- entrypoint.sh: default BITCOIN_CLI_PATH/LND_CLI_PATH to the wrapper
locations when the relevant RPC host env vars are set and the wrapper
is executable, so bclock.conf / blndconnect.conf get the right
bitcoincli / ln paths automatically.
- umbrel/: bump image tag and app version to v4.0.2 with release notes.
Local smoke test on amd64:
bitcoin-cli.bin --version -> Bitcoin Core RPC client version v28.1.0
lncli.bin --version -> lncli version 0.20.1-beta
/usr/local/bin/bitcoin-cli (no env) -> fails with "BITCOIN_RPC_HOST must be set"
/usr/local/bin/bitcoin-cli (env set) -> dispatches to the real binary
Image grows ~70MB (mostly the Go-built lncli).
Co-Authored-By: kulvex code <noreply@github.com>
Umbrel forces `user: "1000:1000"` in docker-compose, but the previous
Dockerfile let useradd assign the next-free UID. Since ubuntu:24.04 ships
a pre-existing `ubuntu` user at 1000, `pyblock` ended up as 1001, causing
permission errors on the bind-mounted config dir reported in
getumbrel/umbrel-apps#5258.
- dockerfile: remove the default `ubuntu` user and pin pyblock to UID/GID
1000 so file ownership matches the user Umbrel runs as.
- entrypoint.sh: fail fast with a clear, actionable message when the
config dir is not writable (covers future UID-mismatch regressions).
- umbrel/: bump image tag and app version to v4.0.1 with release notes.
Verified with `docker run --user 1000:1000` and an empty bind-mount:
all 5 config files generated successfully, ttyd serves on :6969.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add cyan separator lines (────) before and after AI responses
- Change prompt to 'pyblock>' in yellow to distinguish from AI text
- Balance shown below the closing separator in dim
- Add UTF-8 env vars to entrypoint.sh for ttyd/Docker contexts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- entrypoint.sh: PYBLOCK_MODE env var now always overwrites intro.conf
(previously skipped if file existed from a previous run)
- requirements.txt: Comment out vanity-address (not available on all
platforms, blocks Docker build)
Tested Docker build with simulated Umbrel env vars:
- Bitcoin RPC auto-config: OK
- LND auto-config: OK
- Mode detection: OK
- Health check (port 6969): HTTP 200
- Config file generation: verified inside container
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When only LND_TLS_CERT_PATH was set (without LND_HOST), the entrypoint
produced ":10009" as ip_port, which is syntactically valid but unusable.
Now matches Python _env_lnd_config behavior: empty string when host is
missing, only builds host:port when LND_HOST is explicitly provided.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Shell script that runs before PyBLOCK to:
- Auto-generate bclock.conf from BITCOIN_RPC_* env vars
- Auto-generate blndconnect.conf from LND_* env vars
- Auto-detect mode (A/B/C) from available services
- Create default settings files if missing
- Launch ttyd with configurable port (PYBLOCK_PORT)
- Support optional ttyd auth (PYBLOCK_TTYD_AUTH)
Enables zero-config deployment: set env vars → configs generated → app starts.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>