<p>if you installed Bitcoin core using a PPA, it means your script is looking for bitcoind in the wrong place.</p>
<p>To confirm where your bitcoind was installed, use <code>whereis bitcoind</code></p>
<p>This will likely return <code>/usr/local/bin/bitcoind</code>, now your script is looking for it in <code>/usr/bin/bitcoind</code> so you can either copy it into that directory</p>
<p><code>sudo cp /usr/local/bin/bitcoind /usr/bin/bitcoind</code></p>
<p>or change your script to look for it in <code>/usr/local/bin/bitcoind</code></p>

CC BY-SA 4.0
2021-06-10T10:15:20.707Z
2021-06-10T10:15:20.707Z
Bernard 'Beta Berlin' Parah
<p>Hey I keep getting this error everytime I run sudo systemctl enable --now bitcoind</p>
<p>Job for bitcoind.service failed because the control process exited with error code.<br />
See &quot;systemctl status bitcoind.service&quot; and &quot;journalctl -xe&quot; for details.</p>
<p>When I input sudo journalctl -xe --unit bitcoind I get this:</p>
<pre><code>bitcoind.service - Bitcoin daemon
     Loaded: loaded (/etc/systemd/system/bitcoind.service; enabled; vendor pres&gt;
     Active: failed (Result: exit-code) since Wed 2020-12-30 15:12:05 UTC; 23s &gt;
    Process: 2411 ExecStartPre=/bin/chgrp admin /etc/bitcoin (code=exited, stat&gt;
</code></pre>
<p>Here is how my bitcoind.service looks. I changed the user and group from bitcoin to admin.</p>
<pre><code>[Unit]
Description=Bitcoin daemon
After=network.target

[Service]
ExecStart=/usr/bin/bitcoind -daemon \
                            -pid=/run/bitcoind/bitcoind.pid \
                            -conf=/etc/bitcoin/bitcoin.conf \
                            -datadir=/var/lib/bitcoind

# Make sure the config directory is readable by the service user
PermissionsStartOnly=true
ExecStartPre=/bin/chgrp admin /etc/bitcoin

# Process management
####################

Type=forking
PIDFile=/run/bitcoind/bitcoind.pid
Restart=on-failure
TimeoutStopSec=600

# Run as admin:admin
User=admin
Group=admin

# /run/bitcoind
RuntimeDirectory=bitcoind
RuntimeDirectoryMode=0710

# /etc/bitcoin
ConfigurationDirectory=bitcoin
ConfigurationDirectoryMode=0710

# /var/lib/bitcoind
StateDirectory=bitcoind
StateDirectoryMode=0710

# Hardening measures
####################
# Provide a private /tmp and /var/tmp.
PrivateTmp=true

# Deny access to /home, /root and /run/user
ProtectHome=true

# Mount /usr, /boot/ and /etc read-only for the process.
ProtectSystem=full

# Disallow the process and all of its children to gain
# new privileges through execve().
NoNewPrivileges=true

# Use a new /dev namespace only populated with API pseudo devices
# such as /dev/null, /dev/zero and /dev/random.
PrivateDevices=true

# Deny the creation of writable and executable memory mappings.
MemoryDenyWriteExecute=true

[Install]
WantedBy=multi-user.target
</code></pre>
<p>Here are the steps I made before:</p>
<pre><code>~$ cd src
~/src$ git clone --depth 1 --branch v0.20.1 https://github.com/bitcoin/bitcoin.git
~/src$ cd bitcoin
~/src/bitcoin$ ./contrib/install_db4.sh `pwd`
~/src/bitcoin$ ./autogen.sh
~/src/bitcoin$ export BDB_PREFIX='/home/ubuntu/src/bitcoin/db4'
~/src/bitcoin$ ./configure BDB_LIBS=&quot;-L${BDB_PREFIX}/lib -ldb_cxx-4.8&quot; BDB_CFLAGS=&quot;-I${BDB_PREFIX}/include&quot;
~/src/bitcoin$ make
~/src/bitcoin$ sudo make install 
~/src/bitcoin$ bitcoind -version
vi bitcoin.conf
server=1                              
rpcbind=127.0.0.1                     
whitelist=127.0.0.1                   
rpcallowip=127.0.0.1/32               
zmqpubrawblock=tcp://127.0.0.1:28332  
zmqpubrawtx=tcp://127.0.0.1:28333 

~$ sudo mkdir -p /etc/bitcoin
~$ sudo cp bitcoin.conf /etc/bitcoin
~$ sudo chmod 644 /etc/bitcoin/bitcoin.conf
</code></pre>
<p>Utimately I got</p>
<blockquote>
<p>ubuntu systemd[1]: Failed to start Bitcoin daemon.</p>
</blockquote>

CC BY-SA 4.0
2020-12-31T16:35:08.583Z
I think this would better be addressed in the Bitcoin Core issue tracker and I see you've opened an issue. Hence probably best to close this StackExchange question https://github.com/bitcoin/bitcoin/issues/20818
Michael Folkson
<bitcoind><ubuntu>
Failed to start bitcoin daemon using Ubuntu 20.04
blainerb4
# Failed to start bitcoin daemon using Ubuntu 20.04

(Asked by: username_0 on 2020-12-31)

Hey I keep getting this error everytime I run sudo systemctl enable --now bitcoind
Job for bitcoind.service failed because the control process exited with error code.
See "systemctl status bitcoind.service" and "journalctl -xe" for details.
When I input sudo journalctl -xe --unit bitcoind I get this:
bitcoind.service - Bitcoin daemon
     Loaded: loaded (/etc/systemd/system/bitcoind.service; enabled; vendor pres>
     Active: failed (Result: exit-code) since Wed 2020-12-30 15:12:05 UTC; 23s >
    Process: 2411 ExecStartPre=/bin/chgrp admin /etc/bitcoin (code=exited, stat>

Here is how my bitcoind.service looks. I changed the user and group from bitcoin to admin.
[Unit]
Description=Bitcoin daemon
After=network.target

[Service]
ExecStart=/usr/bin/bitcoind -daemon \
                            -pid=/run/bitcoind/bitcoind.pid \
                            -conf=/etc/bitcoin/bitcoin.conf \
                            -datadir=/var/lib/bitcoind

# Make sure the config directory is readable by the service user
PermissionsStartOnly=true
ExecStartPre=/bin/chgrp admin /etc/bitcoin

# Process management
####################

Type=forking
PIDFile=/run/bitcoind/bitcoind.pid
Restart=on-failure
TimeoutStopSec=600

# Run as admin:admin
User=admin
Group=admin

# /run/bitcoind
RuntimeDirectory=bitcoind
RuntimeDirectoryMode=0710

# /etc/bitcoin
ConfigurationDirectory=bitcoin
ConfigurationDirectoryMode=0710

# /var/lib/bitcoind
StateDirectory=bitcoind
StateDirectoryMode=0710

# Hardening measures
####################
# Provide a private /tmp and /var/tmp.
PrivateTmp=true

# Deny access to /home, /root and /run/user
ProtectHome=true

# Mount /usr, /boot/ and /etc read-only for the process.
ProtectSystem=full

# Disallow the process and all of its children to gain
# new privileges through execve().
NoNewPrivileges=true

# Use a new /dev namespace only populated with API pseudo devices
# such as /dev/null, /dev/zero and /dev/random.
PrivateDevices=true

# Deny the creation of writable and executable memory mappings.
MemoryDenyWriteExecute=true

[Install]
WantedBy=multi-user.target

Here are the steps I made before:
~$ cd src
~/src$ git clone --depth 1 --branch v0.20.1 https://github.com/bitcoin/bitcoin.git
~/src$ cd bitcoin
~/src/bitcoin$ ./contrib/install_db4.sh `pwd`
~/src/bitcoin$ ./autogen.sh
~/src/bitcoin$ export BDB_PREFIX='/home/ubuntu/src/bitcoin/db4'
~/src/bitcoin$ ./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include"
~/src/bitcoin$ make
~/src/bitcoin$ sudo make install 
~/src/bitcoin$ bitcoind -version
vi bitcoin.conf
server=1                              
rpcbind=127.0.0.1                     
whitelist=127.0.0.1                   
rpcallowip=127.0.0.1/32               
zmqpubrawblock=tcp://127.0.0.1:28332  
zmqpubrawtx=tcp://127.0.0.1:28333 

~$ sudo mkdir -p /etc/bitcoin
~$ sudo cp bitcoin.conf /etc/bitcoin
~$ sudo chmod 644 /etc/bitcoin/bitcoin.conf

Utimately I got

ubuntu systemd[1]: Failed to start Bitcoin daemon.

**Tags:** bitcoind, ubuntu

> **Comments:**
> **username_1**: I think this would better be addressed in the Bitcoin Core issue tracker and I see you've opened an issue. Hence probably best to close this StackExchange question https://github.com/bitcoin/bitcoin/issues/20818  

---

## 1 answers

### Answer by username_2 on 2021-06-10. Score: 0

if you installed Bitcoin core using a PPA, it means your script is looking for bitcoind in the wrong place.

To confirm where your bitcoind was installed, use `whereis bitcoind`

This will likely return `/usr/local/bin/bitcoind`, now your script is looking for it in `/usr/bin/bitcoind` so you can either copy it into that directory

`sudo cp /usr/local/bin/bitcoind /usr/bin/bitcoind`

or change your script to look for it in `/usr/local/bin/bitcoind`


---

