<p>One reason you might use <code>server=1</code> is when you're using a third-party mining program like cgminer.</p>

<p>Example bitcoin.conf:</p>

<pre><code>server=1
rpcuser=SOMEUSER
rpcpassword=SOMEPASSWORD
</code></pre>

<p>Note: Don't set <code>gen=1</code>, because you don't want to use CPU mining. Instead, install cgminer and run:</p>

<pre><code>cgminer -o http://127.0.0.1:8332 -u SOMEUSER -p SOMEPASSWORD
</code></pre>

CC BY-SA 4.0
2021-07-07T02:07:00.623Z
This is actually great - and still relevant for Litecoin mining I would imagine.
oemb1905
CC BY-SA 3.0
2014-10-16T23:22:07.373Z
2014-10-17T02:55:25.103Z
2014-10-17T02:55:25.103Z
John Saturday
<p>Yes. if you set server=1 in your bitcoin.conf file your wallet will run a server that listens for and accepts commands passed to it. These can be used to externally control the wallet. By default only requests from your local machine are accepted.  JSON is the formatting language the commands are issued in. JSON_RPC is a standardized way of issuing these commands using the json format.  When you run the client you can use the Console available from the help menu to run the same set of commands directly.  As people mentioned its been quite a while since its been practical to use the client as a miner. </p>

CC BY-SA 3.0
2014-04-21T05:36:26.060Z
2014-04-21T05:36:26.060Z
Abelgo
<p>The <a href="https://en.bitcoin.it/wiki/API_reference_%28JSON-RPC%29" rel="nofollow">JSON-RPC API</a> can be used by other programs to communicate with the Bitcoin client.  That could include external mining programs, "e-commerce" software to automatically make and receive payments, or any other software that wants to interact with the Bitcoin network.</p>

<p>It is true that you do not need this feature simply to solo mine using <code>setgenerate true</code>.  However, you should be aware that <code>setgenerate true</code> enables an inefficient CPU miner which is obsolete technology and should be used for testing only.  It will cost you far more in electricity than you can ever expect to earn in mining revenue, and with very high probability you will never successfully mine a single block.  The current state of the art in mining is dedicated ASIC hardware.  Such hardware would normally be controlled by a separate piece of software, which would then communicate with the Bitcoin client over the RPC API.</p>

CC BY-SA 3.0
2014-04-20T22:19:46.310Z
Thanks, I am aware that ASIC is the current technology and that CPU mining is obsolete.  Just wanted to confirm this part of the bitcoin.conf file.  You mention that the hardware, an ASIC miner, would be controlled by software, e.g., rpgminer, and would communicate with bitcoin-qt using RPC API.  Does your answer suggest that I would keep Bitcoin-Qt running in th background while mining with rpgminer?
oemb1905
CC BY-SA 3.0
2014-04-20T22:20:44.257Z
@oemb1905: Yes.  You could also use the headless client, `bitcoind`, if you didn't want the extra window on your desktop.
Nate Eldredge
CC BY-SA 3.0
2014-04-20T22:28:05.517Z
Can you direct me to the site to download bitcoind?  Thanks, and I will consider that for my set up.
oemb1905
CC BY-SA 3.0
2014-04-20T22:30:08.487Z
@oemb1905: You get it from the same place you got `bitcoin-qt`.  Depending on what you downloaded, you may have already installed it together with `bitcoin-qt`.
Nate Eldredge
CC BY-SA 3.0
2014-04-20T22:36:00.550Z
I heard that they are bundled together now, so perhaps I did.  I will revisit the .org site.  Thanks again!
oemb1905
CC BY-SA 3.0
2014-04-20T22:11:37.143Z
2014-04-20T22:11:37.143Z
Nate Eldredge
<p>What does it mean in the <code>bitcoin.conf</code> file when it states:</p>

<pre><code>  server=1 tells Bitcoin-Qt to accept JSON-RPC commands?  
</code></pre>

<p>If all one needs to do to solo mine is type <code>setgenerate true</code> in the console, then what is at stake with accepting JSON-RPC commands?  Does this allow other software to interact with Bitcoin-Qt, or something akin to that?  Can someone explain?</p>

CC BY-SA 3.0
2014-04-20T22:41:01.310Z
@George This post is only designed to confirm solo mining protocol with bitcoin-qt.  I concur with your sentiments, but feel it is important to master basic concepts, however inefficient those methods might be ...  Regards, oemb1905
oemb1905
CC BY-SA 4.0
2021-07-07T02:05:58.027Z
Update: After solo mining, I decided to mine share, which I did from 2014 - 2018 for 'pennies.'  I forgot about the shares and had a nice $2000 surprise this past Spring 2021.  Glad to see this post about fundamentals of solo mining and the JSON api has had so much viewership!
oemb1905
<bitcoin-core><json-rpc><mac><solo-mining><bitcoin.conf>
Bitcoin.conf & JSON-RPC options
oemb1905
# Bitcoin.conf & JSON-RPC options

(Asked by: username_0 on 2014-04-20)

What does it mean in the `bitcoin.conf` file when it states:

```
  server=1 tells Bitcoin-Qt to accept JSON-RPC commands?  

```

If all one needs to do to solo mine is type `setgenerate true` in the console, then what is at stake with accepting JSON-RPC commands? Does this allow other software to interact with Bitcoin-Qt, or something akin to that? Can someone explain?

**Tags:** bitcoin-core, json-rpc, mac, solo-mining, bitcoin.conf

> **Comments:**
> **username_0**: @George This post is only designed to confirm solo mining protocol with bitcoin-qt.  I concur with your sentiments, but feel it is important to master basic concepts, however inefficient those methods might be ...  Regards, username_0  
> **username_0**: Update: After solo mining, I decided to mine share, which I did from 2014 - 2018 for 'pennies.'  I forgot about the shares and had a nice $2000 surprise this past Spring 2021.  Glad to see this post about fundamentals of solo mining and the JSON api has had so much viewership!  

---

## 3 answers

### Answer by username_3 on 2014-04-20. Score: 4 | Accepted answer

The [JSON-RPC API](https://en.bitcoin.it/wiki/API_reference_%28JSON-RPC%29) can be used by other programs to communicate with the Bitcoin client. That could include external mining programs, "e-commerce" software to automatically make and receive payments, or any other software that wants to interact with the Bitcoin network.

It is true that you do not need this feature simply to solo mine using `setgenerate true`. However, you should be aware that `setgenerate true` enables an inefficient CPU miner which is obsolete technology and should be used for testing only. It will cost you far more in electricity than you can ever expect to earn in mining revenue, and with very high probability you will never successfully mine a single block. The current state of the art in mining is dedicated ASIC hardware. Such hardware would normally be controlled by a separate piece of software, which would then communicate with the Bitcoin client over the RPC API.

> **Comments:**
> **username_0**: Thanks, I am aware that ASIC is the current technology and that CPU mining is obsolete.  Just wanted to confirm this part of the bitcoin.conf file.  You mention that the hardware, an ASIC miner, would be controlled by software, e.g., rpgminer, and would communicate with bitcoin-qt using RPC API.  Does your answer suggest that I would keep Bitcoin-Qt running in th background while mining with rpgminer?  
> **username_3**: @username_0: Yes.  You could also use the headless client, `bitcoind`, if you didn't want the extra window on your desktop.  
> **username_0**: Can you direct me to the site to download bitcoind?  Thanks, and I will consider that for my set up.  
> **username_3**: @username_0: You get it from the same place you got `bitcoin-qt`.  Depending on what you downloaded, you may have already installed it together with `bitcoin-qt`.  
> **username_0**: I heard that they are bundled together now, so perhaps I did.  I will revisit the .org site.  Thanks again!  

---

### Answer by username_1 on 2014-10-16. Score: 2

One reason you might use `server=1` is when you're using a third-party mining program like cgminer.

Example bitcoin.conf:

```
server=1
rpcuser=SOMEUSER
rpcpassword=SOMEPASSWORD

```

Note: Don't set `gen=1`, because you don't want to use CPU mining. Instead, install cgminer and run:

```
cgminer -o http://127.0.0.1:8332 -u SOMEUSER -p SOMEPASSWORD

```

> **Comments:**
> **username_0**: This is actually great - and still relevant for Litecoin mining I would imagine.  

---

### Answer by username_2 on 2014-04-21. Score: 1

Yes. if you set server=1 in your bitcoin.conf file your wallet will run a server that listens for and accepts commands passed to it. These can be used to externally control the wallet. By default only requests from your local machine are accepted. JSON is the formatting language the commands are issued in. JSON\_RPC is a standardized way of issuing these commands using the json format. When you run the client you can use the Console available from the help menu to run the same set of commands directly. As people mentioned its been quite a while since its been practical to use the client as a miner.


---

