12

I keep getting this error:

EXCEPTION: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15
program_options26invalid_config_file_syntaxEEEEE
the options configuration file contains an invalid line 'XXXXXXXXXXX'

Where can I find the bitcoin.conf file?

Peter Mortensen
  • 394
  • 2
  • 9
Haddar Macdasi
  • 978
  • 2
  • 14
  • 22

4 Answers4

20

The default location of bitcoin.conf depends on your operating system:

OS Path
Windows XP C:\Documents and Settings\<username>\Application Data\Bitcoin\bitcoin.conf
Windows Vista, 7, 10 C:\Users\<username>\AppData\Roaming\Bitcoin
Linux /home/<username>/.bitcoin/bitcoin.conf
Mac OSX /Users/<username>/Library/Application Support/Bitcoin/bitcoin.conf

Source

Not directly related to this question, but if you cannot find the configuration file at the above path: note that the configuration file is not necessary to run Bitcoin-Qt. If it is not yet present, you can simply create it with any text editor.

Murch
  • 75,206
  • 34
  • 186
  • 622
Nick ODell
  • 29,396
  • 11
  • 72
  • 130
  • OSX -> OS X (e.g. ref. https://en.wikipedia.org/wiki/Mac_OS_X) – Peter Mortensen Mar 31 '14 at 18:05
  • 2
    On my mac the bitcoin.conf file doesn't exist. I'm not sure if simply creating it will cause it to be used by bitcoin-qt – benathon Mar 06 '15 at 01:46
  • 3
    @portforwardpodcast: Bitcoin Core will check for the existence of the file on startup, so yes, simply creating it is sufficient. – Murch Nov 01 '16 at 21:05
  • I use Linux Ubuntu(16.04 LTS) and i've found file /root/.config/Bitcoin/bitcoin.conf but it's content was not like a normal bitcoin.conf – Андрей Аршинов Apr 10 '17 at 11:31
  • @PeterMortensen macOS, not OS X. – MCCCS Apr 28 '17 at 12:33
  • I have windows 8.1 and I can't find any bitcoin.conf file in my user folder... – B T Jun 09 '17 at 20:23
  • For Bitcoin Core, if the file doesn't exist go to Settings (or Preferences in the top menu on macOS) and click the button labeled "Open Configuration File". This will create a bitcoin.conf file and open it in a text editor. Make your changes and save, then restart Bitcoin Core. – Nate Cook Jul 31 '18 at 11:25
5

Note that for Windows the location of the configuration folder where bitcoin.conf is located is saved in the registry.

Its default path is indeed C:\Users\<username>\AppData\Roaming\Bitcoin but if that location was changed then in order to find the current folder you will have to look in HKEY_CURRENT_USER\Software\Bitcoin\Bitcoin-Qt at the REG_SZ strDataDir.

Sampeet
  • 51
  • 1
  • 1
3

I would guess that that refers to your bitcoin.conf. There's platform-specific information on where to find it at: https://en.bitcoin.it/wiki/Running_Bitcoin#Bitcoin.conf_Configuration_File

1

In bitcoin-core version 0.14.2, it looks for it in the data-dir folder https://en.bitcoin.it/wiki/Running_Bitcoin#Bitcoin.conf_Configuration_File

The bitcoin.conf file is not created by default, you will need to create it yourself. And also, I never had a c:\users\[username]\appdata\roaming\bitcoin folder as many online answers will suggest, this is because when I installed the bitcoin core program, I chose to put my data directory in a different place than default.

Sean Bradley
  • 401
  • 4
  • 5