Unable to specify bitcoin.conf via command line #8156

issue davidmanheim opened this issue on June 7, 2016
  1. davidmanheim commented at 3:00 AM on June 7, 2016: none

    When running bitcoind, the -conf=/directory/bitcoin.conf does not work for an arbitrary location for the config file.

    It does allow me to specify the data directory containing the bitcoin.conf file, which causes it to use the file. (Ownership isn't a problem)

    Please confirm that others can replicate this behavior. I am running linux, and bitcoin 0.12.

  2. laanwj commented at 7:24 AM on June 7, 2016: member

    I've used -conf many times to use other config files. It should have precedence before -datadir, so you can specify a datadir in the config file.

  3. laanwj commented at 7:29 AM on June 7, 2016: member

    Just verified that this works on master, at least:

    $ cat > /tmp/bitcoin.conf
    datadir=/store/tmp/testbtc
    printtoconsole=1
    ^D
    $ src/bitcoind -conf=/tmp/bitcoin.conf
    2016-06-07 07:28:38 Bitcoin version v0.12.99.0-e20e782 (2016-06-07 09:08:13 +0200)
    2016-06-07 07:28:38 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
    2016-06-07 07:28:38 Default data directory /home/user/.bitcoin
    2016-06-07 07:28:38 Using data directory /store/tmp/testbtc
    2016-06-07 07:28:38 Using config file /tmp/bitcoin.conf
    ...
    
  4. laanwj added the label Docs and Output on Jun 7, 2016
  5. davidmanheim commented at 6:11 PM on June 7, 2016: none

    OK, so I can confirm that:

    1. Command line arguments for -datadir override the one specified in the bitcoin.conf file.
    2. The bitcoin.conf command line argument seems to work, at least when done the way you listed.

    I'll do some digging to see if I can find what the exact user error (or failure mode) I saw earlier was.

    Thanks!

    On Tue, Jun 7, 2016 at 12:30 AM, Wladimir J. van der Laan < notifications@github.com> wrote:

    Just verified that this works on master, at least:

    $ cat > /tmp/bitcoin.conf datadir=/store/tmp/testbtc printtoconsole=1 ^D $ src/bitcoind -conf=/tmp/bitcoin.conf 2016-06-07 07:28:38 Bitcoin version v0.12.99.0-e20e782 (2016-06-07 09:08:13 +0200) 2016-06-07 07:28:38 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1 2016-06-07 07:28:38 Default data directory /home/orion/.bitcoin 2016-06-07 07:28:38 Using data directory /store/tmp/testbtc 2016-06-07 07:28:38 Using config file /tmp/bitcoin.conf ...

    — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub #8156 (comment), or mute the thread https://github.com/notifications/unsubscribe/ABlkLuxT2VyjbS2-piFUnyTW0H9hTyIAks5qJR4hgaJpZM4Ivgq9 .

  6. MarcoFalke commented at 9:03 AM on June 8, 2016: member

    Closing, as this seems to be solved.

  7. MarcoFalke closed this on Jun 8, 2016

  8. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me