<p><code>bitcoin-cli</code> has a <code>-datadir</code> option so you can specify the data directory of your other bitcoind instance. It will use that parameter to read the bitcoin.conf and <code>.cookie</code> files in the other data directory so that it can connect to the other bitcoind instance. With that parameter, you can send RPC commands to it, including the <code>stop</code> command.</p>

<p>Alternatively, you can stop bitcoind by finding its PID (using <code>ps</code>) and the <code>kill</code> command. <code>kill</code> be default uses <code>SIGTERM</code> so bitcoind will actually safely shutdown by going through its shutdown process.</p>

CC BY-SA 4.0
2018-08-01T01:44:53.580Z
2018-08-01T01:44:53.580Z
Ava Chow
<p><code>bitcoin-cli</code> accepts a <code>-conf</code> parameter. Use that to point to the config of the second bitcoind client (which would contain the rpc details), and then shut it down as normal.</p>

<p>You can also use <code>-rpcpassword</code>, <code>-rpcport</code>, and <code>-rpcuser</code> to supply the details manually.</p>

CC BY-SA 4.0
2018-05-07T04:00:42.463Z
2018-05-07T04:00:42.463Z
Raghav Sood
<p>I created two <code>bitcoind</code> service in my server.
First using default configuration, and second use new configuration.
I am able to stop first <code>bitcoind</code> using <code>bitcoin-cli stop</code>, but the second <code>bitcoind</code> still running. How to safely stop the second <code>bitcoind</code> without forcing to kill it ?</p>

CC BY-SA 4.0
2018-05-07T04:18:19.403Z
Not an answer, but a SIGTERM or SiGINT will cause a graceful shutdown of bitcoind.
Pieter Wuille
<bitcoind><bitcoin-cli>
How to stop another bitcoind service?
Billy Adelphia
# How to stop another bitcoind service?

(Asked by: username_0 on 2018-05-07)

I created two `bitcoind` service in my server.
First using default configuration, and second use new configuration.
I am able to stop first `bitcoind` using `bitcoin-cli stop`, but the second `bitcoind` still running. How to safely stop the second `bitcoind` without forcing to kill it ?

**Tags:** bitcoind, bitcoin-cli

> **Comments:**
> **username_1**: Not an answer, but a SIGTERM or SiGINT will cause a graceful shutdown of bitcoind.  

---

## 2 answers

### Answer by username_2 on 2018-08-01. Score: 2 | Accepted answer

`bitcoin-cli` has a `-datadir` option so you can specify the data directory of your other bitcoind instance. It will use that parameter to read the bitcoin.conf and `.cookie` files in the other data directory so that it can connect to the other bitcoind instance. With that parameter, you can send RPC commands to it, including the `stop` command.

Alternatively, you can stop bitcoind by finding its PID (using `ps`) and the `kill` command. `kill` be default uses `SIGTERM` so bitcoind will actually safely shutdown by going through its shutdown process.


---

### Answer by username_3 on 2018-05-07. Score: 1

`bitcoin-cli` accepts a `-conf` parameter. Use that to point to the config of the second bitcoind client (which would contain the rpc details), and then shut it down as normal.

You can also use `-rpcpassword`, `-rpcport`, and `-rpcuser` to supply the details manually.


---

