user5152: 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?

user21130: 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.

user3536: 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

user102295: 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.

user2306: The location of bitcoin.conf depends on your operating system:
Windows XP             C:\Documents and Settings\<username>\Application Data\Bitcoin\bitcoin.conf
Windows Vista, 7, 10C:\Users\<username>\AppData\Roaming\Bitcoin                                             
Linux                         /home/<username>/.bitcoin/bitcoin.conf                                                           
Mac OSX                  /Users/<username>/Library/Application Support/Bitcoin/bitcoin.conf               
Source

5152: <p>I keep getting this error:</p>

<pre><code>EXCEPTION: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15
program_options26invalid_config_file_syntaxEEEEE
the options configuration file contains an invalid line 'XXXXXXXXXXX'
</code></pre>

<p>Where can I find the <code>bitcoin.conf</code> file?</p>
 21130: <p>In bitcoin-core version 0.14.2, it looks for it in the data-dir folder
<a href="https://en.bitcoin.it/wiki/Running_Bitcoin#Bitcoin.conf_Configuration_File" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/Running_Bitcoin#Bitcoin.conf_Configuration_File</a></p>

<p>The bitcoin.conf file is not created by default, you will need to create it yourself.
And also, I never had a <code>c:\users\[username]\appdata\roaming\bitcoin</code> 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.</p>
 3536: <p>I would guess that that refers to your bitcoin.conf.  There's platform-specific information on where to find it at: <a href="https://en.bitcoin.it/wiki/Running_Bitcoin#Bitcoin.conf_Configuration_File" rel="nofollow">https://en.bitcoin.it/wiki/Running_Bitcoin#Bitcoin.conf_Configuration_File</a></p>
 102295: <p>Note that for Windows the location of the configuration folder where bitcoin.conf is located is saved in the registry. </p>

<p>Its default path is indeed <code>C:\Users\&lt;username&gt;\AppData\Roaming\Bitcoin</code> but if that location was changed then in order to find the current folder you will have to look in <code>HKEY_CURRENT_USER\Software\Bitcoin\Bitcoin-Qt</code> at the REG_SZ <code>strDataDir</code>.</p>
 2306: <p>The location of bitcoin.conf depends on your operating system:</p>

<p><kbd>Windows&nbsp;XP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</kbd><kbd>C:\Documents&nbsp;and&nbsp;Settings\&lt;username&gt;\Application&nbsp;Data\Bitcoin\bitcoin.conf</kbd><br/>
<kbd>Windows&nbsp;Vista,&nbsp;7,&nbsp;10</kbd><kbd>C:\Users\&lt;username&gt;\AppData\Roaming\Bitcoin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</kbd><br/>
<kbd>Linux&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</kbd><kbd>/home/&lt;username&gt;/.bitcoin/bitcoin.conf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</kbd><br/>
<kbd>Mac&nbsp;OSX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</kbd><kbd>/Users/&lt;username&gt;/Library/Application&nbsp;Support/Bitcoin/bitcoin.conf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</kbd><br/></p>

<p><sub><a href="https://en.bitcoin.it/wiki/Running_Bitcoin#Bitcoin.conf_Configuration_File" rel="noreferrer">Source</a></sub></p>
