<p>I use Arch linux and had a similar issue. Why bitcoin by default download blockchain to the root folder? I don't know - this is just system default setting. Many applications which require considerable disk space (like databases) usually place data to <em>/opt</em>, <em>/var</em> or <em>/srv</em> or other root subfolder. Taking into account that typical linux setup has 10-20 GB for root folder which is not sufficient to keep large databases, such setup with default settings does not work, so applications like bitcoind (300 GB and more for full node) require manual configuration anyway.</p>
<p>You can fix your problem in a following way (depending on how you start bitcoind). If you start it manually by typing command in shell (which is reasonable assumption because you seem to compile bitcoind from source, not using distro package), then you should add '<em>-datadir</em>' and '<em>-conf</em>' parameters when start bitcoind (you can write simple bash script starting bitcoind with correct parameters). Datadir parameter should point to '.bitcoind' folder in home user directory. The conf parameter should point to bitcoind configuration file which may be default <em>/etc/bitcoin/bitcoin.conf</em> or somewhere else. Editing this configuration file is needed to specify several bitcoind options like rpc login (for bitcoin-cli to connect to server), txindex, etc.</p>
<p>If you start bitcoind as a systemd service, then you should override default systemd service file settings. For example, in Arch linux systemd service file (in /usr/lib/systemd/system/) has line 'ExecStart=/usr/bin/bitcoind ... -datadir=/var/lib/bitcoind' which makes bitcoind (launched by systemd) by default read data from /var/lib. You can change this setting by writing simple 5-6 lines 'systemd drop-in override' configuration file which changes this parameter (there are lots of answered questions on other sites about this issue).</p>
<p>Once your start bitcoind manually you should see correct path in its ouput (lines 'Using data directory' and 'Config file').</p>
<p>P.S. There is no Arch/Manjaro distro. They are two different OS.</p>
<p>P.P.S In Arch linux default settings for bitcoind are writing data to /var/lib/ with user permissions '<em>bitcoin:bitcoin</em>'. I don't know why in Manjaro bitcoind saves data to /root folder. Perhaps you have run bitcoind with sudo?</p>

CC BY-SA 4.0
2021-08-15T07:06:40.043Z
2021-08-15T07:06:40.043Z
Maxim Fomin
<p>I've installed bitcoin-core and downloaded the blockchain in Ubuntu. Now that I have switched to Manjaro Linux and installed bitcoin-core again, It creates the .bitcoin directory in <code>/root/.bitcoin/</code> and tries to read the bitcoin.conf in that location whilst I put my .bitcoin directory backup at <code>/home/user/.bitcoin/</code>.</p>
<p>It is important for me to have the blockchain data at my /home because of the lack of free space in my /root</p>
<p>I also found this configuration, But I'm not sure whether it has anything to do with my problem or how to use it
<a href="https://i.sstatic.net/UibAq.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/UibAq.png" alt="enter image description here" /></a></p>
<p>And here are the commands that I used to install the bitcoin-core
<a href="https://i.sstatic.net/sQc4t.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/sQc4t.png" alt="enter image description here" /></a></p>
<p>And here are the first bitcoind execute messages
<a href="https://i.sstatic.net/7JUWa.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/7JUWa.png" alt="enter image description here" /></a></p>

<bitcoin-core><blockchain><bitcoind><bitcoin-cli><linux>
Why .bitcoin is at /root in Arch/Manjaro Linux?
SReza S
# Why .bitcoin is at /root in Arch/Manjaro Linux?

(Asked by: username_0 on 2021-08-15)

I've installed bitcoin-core and downloaded the blockchain in Ubuntu. Now that I have switched to Manjaro Linux and installed bitcoin-core again, It creates the .bitcoin directory in `/root/.bitcoin/` and tries to read the bitcoin.conf in that location whilst I put my .bitcoin directory backup at `/home/user/.bitcoin/`.

It is important for me to have the blockchain data at my /home because of the lack of free space in my /root

I also found this configuration, But I'm not sure whether it has anything to do with my problem or how to use it
[![enter image description here](https://i.sstatic.net/UibAq.png)](https://i.sstatic.net/UibAq.png)

And here are the commands that I used to install the bitcoin-core
[![enter image description here](https://i.sstatic.net/sQc4t.png)](https://i.sstatic.net/sQc4t.png)

And here are the first bitcoind execute messages
[![enter image description here](https://i.sstatic.net/7JUWa.png)](https://i.sstatic.net/7JUWa.png)

**Tags:** bitcoin-core, blockchain, bitcoind, bitcoin-cli, linux


---

## 1 answers

### Answer by username_1 on 2021-08-15. Score: 1

I use Arch linux and had a similar issue. Why bitcoin by default download blockchain to the root folder? I don't know - this is just system default setting. Many applications which require considerable disk space (like databases) usually place data to */opt*, */var* or */srv* or other root subfolder. Taking into account that typical linux setup has 10-20 GB for root folder which is not sufficient to keep large databases, such setup with default settings does not work, so applications like bitcoind (300 GB and more for full node) require manual configuration anyway.

You can fix your problem in a following way (depending on how you start bitcoind). If you start it manually by typing command in shell (which is reasonable assumption because you seem to compile bitcoind from source, not using distro package), then you should add '*-datadir*' and '*-conf*' parameters when start bitcoind (you can write simple bash script starting bitcoind with correct parameters). Datadir parameter should point to '.bitcoind' folder in home user directory. The conf parameter should point to bitcoind configuration file which may be default */etc/bitcoin/bitcoin.conf* or somewhere else. Editing this configuration file is needed to specify several bitcoind options like rpc login (for bitcoin-cli to connect to server), txindex, etc.

If you start bitcoind as a systemd service, then you should override default systemd service file settings. For example, in Arch linux systemd service file (in /usr/lib/systemd/system/) has line 'ExecStart=/usr/bin/bitcoind ... -datadir=/var/lib/bitcoind' which makes bitcoind (launched by systemd) by default read data from /var/lib. You can change this setting by writing simple 5-6 lines 'systemd drop-in override' configuration file which changes this parameter (there are lots of answered questions on other sites about this issue).

Once your start bitcoind manually you should see correct path in its ouput (lines 'Using data directory' and 'Config file').

P.S. There is no Arch/Manjaro distro. They are two different OS.

P.P.S In Arch linux default settings for bitcoind are writing data to /var/lib/ with user permissions '*bitcoin:bitcoin*'. I don't know why in Manjaro bitcoind saves data to /root folder. Perhaps you have run bitcoind with sudo?


---

