Sunday, December 22, 2024

bitcoin core – How do I configure BTCPayServer to make use of an alternate datadir and keep away from ‘Unable to open settings file’ Error?

Much like:

Ubuntu Linux, Unable to set bitcoin datadir to a folder in several drive

and

I can not begin bitcoind on Raspberry Pi. Why do I want settings.json.tmp once I did not want it earlier than?

I’m configuring BTCPayServer to make use of a datadir that isn’t my root listing as a result of I haven’t got sufficient house on my root listing for my pruned BTCPayServer Node.
When configuring and operating BTCPayServer I’m logged in as root the whole time, root (clearly) has entry to my different listing.
This may be verified by operating ls -l altdatadir

It outputs (edited to be generic):

drwxr-xr-x 7 root root 4096 Mar 28 16:23 altdatadir

I utilized the alternate paths to the suitable traces in docker-fragments/bitcoin.yml.

After I run the setup script every thing seems to start out, nonetheless if I attempt to name bitcoin-cli.sh it tells me it’s restarting together with its distinctive hash. After I run docker logs (distinctive hash) it outputs (edited to be generic):

Error: Settings file couldn't be written:
 - Error: Unable to open settings file /media/$USER/altdatadir/.bitcoin/settings.json.tmp for writing

I’m assuming beneath the given setup core is already being run as root (as a result of btcpay server is being run as root) , which is the one given resolution to this concern when it has appeared within the 2nd related query’s state of affairs. If it isn’t the case how do I pressure BTCPayServer-docker to run it as root?

If it’s the case and I’m root when operating core, why do I not have the flexibility to write down into the listing/information?

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles