<p>I'm pretty sure Bitcoin Core does not expand <code>~</code> into the home directory path. Try providing the full path, you can get it with <code>pwd</code>.</p>

CC BY-SA 4.0
2024-08-14T19:50:44.220Z
Thanks. It worked
Luís Garcia
CC BY-SA 4.0
2024-08-17T18:14:24.850Z
Default folder is in the user folder, but name of the folder is `.bitcoin`.
pbies
CC BY-SA 4.0
2024-08-14T19:28:31.850Z
2024-08-14T19:28:31.850Z
Ava Chow
<p>Similar to <a href="https://bitcoin.stackexchange.com/questions/81532/specified-data-directory-does-not-exist-but-it-does?newreg=4b684b8abfd64a539a7892aedc3eb19b" title="Question 81532">this question</a>, bitcoind does not recognize an existing directory, even if it does not contain spaces as was the problem mentioned.</p>
<p>bitcoin.conf</p>
<pre><code># Specify a non-default location to store blockchain and other data.
datadir=~/bitcoin
</code></pre>
<p>Terminal (Linux):</p>
<pre><code>USR:~/bitcoin-27.1/bin$ ./bitcoind -daemon
Error: Error reading configuration file: specified data directory &quot;~/bitcoin&quot; does not exist.
USR:~/bitcoin-27.1/bin$ cd ~/bitcoin
USR:~/bitcoin$
</code></pre>

<bitcoin-core><bitcoind><bitcoin.conf><datadir>
Specified data directory does not exist - but it does
Luís Garcia
# Specified data directory does not exist - but it does

(Asked by: username_0 on 2024-08-14)

Similar to [this question](https://bitcoin.stackexchange.com/questions/81532/specified-data-directory-does-not-exist-but-it-does?newreg=4b684b8abfd64a539a7892aedc3eb19b "Question 81532"), bitcoind does not recognize an existing directory, even if it does not contain spaces as was the problem mentioned.

bitcoin.conf

```
# Specify a non-default location to store blockchain and other data.
datadir=~/bitcoin

```

Terminal (Linux):

```
USR:~/bitcoin-27.1/bin$ ./bitcoind -daemon
Error: Error reading configuration file: specified data directory "~/bitcoin" does not exist.
USR:~/bitcoin-27.1/bin$ cd ~/bitcoin
USR:~/bitcoin$

```

**Tags:** bitcoin-core, bitcoind, bitcoin.conf, datadir


---

## 1 answers

### Answer by username_1 on 2024-08-14. Score: 6

I'm pretty sure Bitcoin Core does not expand `~` into the home directory path. Try providing the full path, you can get it with `pwd`.

> **Comments:**
> **username_0**: Thanks. It worked  
> **username_2**: Default folder is in the user folder, but name of the folder is `.bitcoin`.  

---

