fix(bitcoin): stop writing a datadir bitcoin.conf that conflicts with -conf=/tmp/rpc.conf #131
Closed
ssmithx
wants to merge 0 commits from
fix/bitcoin-conf-conflict-crash-loop into main
pull from: fix/bitcoin-conf-conflict-crash-loop
merge into: :main
:main
:fix/paid-content-payment-not-lost
:fix/mint-error-detail-swallowed
:investigate/framework-lnd-startup
:fix/minibits-already-redeemed
:cuprate-fixes
:feature/dojobay-app
:fix/bitcoin-core-tor-service-name
:docs/openwrt-gateway-setup
:cuprate-cpu-fix
:fix/cuprate-explicit-logging-levels
:companion/session-2026-08-31
:companion/0.5.28-deploy-handoff
:companion/0.5.28-ship
:companion/0.5.28
:app-bumps-mirror-pending
:cuprate-archyapp
:docs/todo-list
:companion/0.5.27-version-meta
:companion/0.5.27-ship
:companion/0.5.27-clipboard-qr-restart
:ux-at-last
:fix/mesh-send-content-inline-federation-fallback
:cashu-error-messages
:gsd/phase-13-aiui-functional-conversational-node-control-and-content-surf
:feat/podsteadr-app-package
:rotate-release-root
:chore/aiui-monorepo-migration
:wip/phase-13-p13-02
:wip/phase-13-p13-01
:fix/bitcoin-conf-conflict-crash-loop
:demo-build
:archy-hwconfig
:openwrt-enhancements
:a3-10-endpoint-fallback
:public-prelaunch
:release/1.7.115-prep
:fix/web-listener-ipv6
:fips-companion-5g-hardening
:fix/connection-accept-deadlock
:fix/demo-images-path-filter
:fix/companion-autologin-replay-intro
:networking-profits-dashboard
:identities-mobile-polish
:companion-qr-scan-fix
:companion-qr-pairing
:intro-reliability-video-perf
:login-bg-continuity
:audio-bottom-bar
:demo-intro-every-visit
:intro-entrance-fixes
:cloud-feedback-demo-content
:cloud-tabs-search
:ark-wallet-ui-demo
:demo-nginx-app-assets
:demo-ui-fixes
:ark-wallet-barkd
No Reviewers
Labels
Clear labels
companion-agent
queued
roadmap
waiting-external
Companion-app agent's handover list (node-side parts tracked separately)
Triaged, next in this session's queue after current release work
Feature/effort item, deliberately unscheduled — needs scoping + a slot, not a fix today
Waiting on a person outside this session (tester, operator)
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: lfg2025/archy#131
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Since a597c1d9 (bitcoind RPC creds off argv), bitcoin-core and bitcoin-knots
launch bitcoind with -conf=/tmp/rpc.conf and pass all other settings as CLI
args; bitcoind never reads /var/lib/archipelago/bitcoin/bitcoin.conf again.
write_bitcoin_conf, ensure_bitcoin_rpc_config, and bootstrap's
run_bitcoin_rpc_repair were never updated to match — they kept writing/
"repairing" server=/rpcbind=/rpcallowip=/listen= into that datadir file on
every install, reinstall, and service restart. Bitcoin Core's own
datadir-conflict safety check then refuses to start whenever that file
exists alongside an explicit -conf= arg, so the write and every repair
of it directly caused the crash it was trying to prevent.
Also drop the "restart already-running container after bitcoin.conf
repair" adoption-path branch: it assumed bind settings live in that file
and needs a restart to pick them up, which hasn't been true since
a597c1d9 — the running container's CLI args are already correct.
Replaces both writers with remove_stale_bitcoin_conf(), which renames
(not deletes) any leftover file so already-affected nodes self-heal on
next install/restart instead of staying permanently broken.
bitcoin_data_volume_gb is removed as dead code (it only fed the deleted
prune= line in write_bitcoin_conf, itself unused since a597c1d9 hardcoded
-prune=550 in the manifest's small-disk branch).
Investigated after a crash loop on archy-x250-beta; full incident
timeline and patch rationale in bitcoin-conf-crash-patch.md.
Summary
Verification
Checklist
Closing: this fix is already merged in content. It was merged on the pre-import lineage in
08a725ba("Merge PR #131: stop writing a datadir bitcoin.conf…") and carried into the current main through the 2026-08-12 open-source initial import —remove_stale_bitcoin_conf()is present at core/archipelago/src/api/rpc/package/install.rs (install + reinstall paths) and in bootstrap.rs, withwrite_bitcoin_conf/ensure_bitcoin_rpc_configremoved exactly as this PR proposed. Verified on current main; no further action needed. (The branch had also been re-committed onto the open-source import root, so the PR showed no merge base with main.)Closing: this fix is already merged in content. It was merged on the pre-import lineage in
08a725ba("Merge PR #131: stop writing a datadir bitcoin.conf...") and carried into the current main through the 2026-08-12 open-source initial import —remove_stale_bitcoin_conf()is present in core/archipelago/src/api/rpc/package/install.rs (install + reinstall paths) and in bootstrap.rs, withwrite_bitcoin_conf/ensure_bitcoin_rpc_configremoved exactly as this PR proposed. Verified on current main; no further action needed. (The branch had also been re-committed onto the open-source import root, so the PR showed no merge base with main.)Pull request closed