user85345: 
I installed my bitcoind and lnd correctly.
I put my datadir=/mnt/vdb to bitcoind.conf file and it allows me to start bitcoind with this command: bitcoind -daemon.
As a final step, I want to learn lnd
sudo service lnd start

Failed to start lnd.service: Unit bitcoind.service not found.


For me, I don't understand why it can't find bitcoind.service since I could run bitcoind without --datadir parameter.
How do I fix this error?

user85575: Starting a service by hand doesn't mean that it has the proper init.d or systemd config files in place that it could be started with the service command.  In this case it looks like lnd was setup to assume that bitcoind was also a systemd service so it can make sure it is started first.  If you can't start bitcoind with the service command then something is missing.

Maybe you didn't install bitcoind correctly and didn't realize it.  Look at the files that were installed and see if anything got put into /usr/lib/systemd/system/unit or /etc/systemd/system/unit.d/ directories.
Or lnd has expectations that have drifted from what bitcoind is providing over some period of time.  The "easy" work around is to modify the systemd config for lnd to no longer try to start bitcoind.


85345: <ul>
<li><p>I installed my bitcoind and lnd correctly.</p></li>
<li><p>I put my <code>datadir=/mnt/vdb</code> to <code>bitcoind.conf</code> file and it allows me to start bitcoind with this command: <code>bitcoind -daemon</code>.</p></li>
<li><p>As a final step, I want to learn <code>lnd</code></p>

<p><code>sudo service lnd start</code></p>

<blockquote>
  <p>Failed to start lnd.service: Unit bitcoind.service not found.</p>
</blockquote></li>
</ul>

<p>For me, I don't understand why it can't find <code>bitcoind.service</code> since I could run <code>bitcoind</code> without <code>--datadir</code> parameter.</p>

<p>How do I fix this error?</p>
 85575: <p>Starting a service by hand doesn't mean that it has the proper <code>init.d</code> or <code>systemd</code> config files in place that it could be started with the <code>service</code> command.  In this case it looks like <code>lnd</code> was setup to assume that <code>bitcoind</code> was also a <code>systemd</code> service so it can make sure it is started first.  If you can't start <code>bitcoind</code> with the <code>service</code> command then something is missing.</p>

<ol>
<li>Maybe you didn't install <code>bitcoind</code> correctly and didn't realize it.  Look at the files that were installed and see if anything got put into <code>/usr/lib/systemd/system/unit</code> or <code>/etc/systemd/system/unit.d/</code> directories.</li>
<li>Or <code>lnd</code> has expectations that have drifted from what <code>bitcoind</code> is providing over some period of time.  The "easy" work around is to modify the <code>systemd</code> config for <code>lnd</code> to no longer try to start <code>bitcoind</code>.</li>
</ol>
