<p>There is a typo in your flag. It reads <code>blockdir</code> but it should be <code>blocksdir</code>.</p>

CC BY-SA 4.0
2023-09-27T19:17:06.510Z
2023-09-27T19:17:06.510Z
ABTC
<p>I am running Bitcoin core on a raspberry pi with an external ssd. I am using this line in the bitcoin.conf to move block storage onto the ssd: <code>blocksdir=/media/bitcoinstorage/.bitcoin/blocks</code></p>
<p>However, when I run bitcoind, blocks still get written to the default location at ~/.bitcoin/blocks</p>
<p>This is what I've tried so far:</p>
<p>Running with these flags:</p>
<pre><code>bitcoind -conf=path/to/conf -blockdir=/media/bitcoinstorage/.bitcoin/blocks
</code></pre>
<p>Precreating the .bitcoin/blocks directories in the desired location.</p>
<p>Setting permissions on both directories involved (media and bitcoinstorage) to 777 to no avail. The default permissions for using /media required sudo - I don't know much about how permissions work and if they're inherited so I'm guessing this might have something to do with it.</p>
<p>Each time in between I have deleted the .bitcoin directory entirely and done <code>bitcoin-cli stop</code> before trying again. It seems like no matter what I do I cannot change the default blocks storage location.</p>
<p>Any help would be appreciated here. Thanks :)</p>

<bitcoin-core><bitcoin.conf><datadir>
Bitcoin.conf "blocksdir" parameter not taking effect?
Conrad
# Bitcoin.conf "blocksdir" parameter not taking effect?

(Asked by: username_0 on 2023-02-02)

I am running Bitcoin core on a raspberry pi with an external ssd. I am using this line in the bitcoin.conf to move block storage onto the ssd: `blocksdir=/media/bitcoinstorage/.bitcoin/blocks`

However, when I run bitcoind, blocks still get written to the default location at ~/.bitcoin/blocks

This is what I've tried so far:

Running with these flags:

```
bitcoind -conf=path/to/conf -blockdir=/media/bitcoinstorage/.bitcoin/blocks

```

Precreating the .bitcoin/blocks directories in the desired location.

Setting permissions on both directories involved (media and bitcoinstorage) to 777 to no avail. The default permissions for using /media required sudo - I don't know much about how permissions work and if they're inherited so I'm guessing this might have something to do with it.

Each time in between I have deleted the .bitcoin directory entirely and done `bitcoin-cli stop` before trying again. It seems like no matter what I do I cannot change the default blocks storage location.

Any help would be appreciated here. Thanks :)

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


---

## 1 answers

### Answer by username_1 on 2023-09-27. Score: 1

There is a typo in your flag. It reads `blockdir` but it should be `blocksdir`.


---

