Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

At this moment, has over 1,900 nodes connected to their bitcoin client.

I have been running an m1.small ubuntu 12.04 server and bitcoind for ~4 days straight now with no reboots. My bitcoind client still only shows ~60 connections maximum when performing a "./bitcoind getinfo" command.

How can I achieve 1,000+ connections to my bitcoind client? And is it "worth it" in your opinion?

EDIT: I have re-started my bitcoind client with the -maxconnections=1000 and -timeout=15000 parameters but after ~12 hours of running bitcoind, the number of connections is only up to ~40. And I don't seem to be maxing out my CPU, RAM, or bandwidth just yet.

EDIT 2: I have not seen a "connected time" over 8 hours in the list provided by so that tells me they must restart their server every 8 hours or so. Either that, or connections drop and refresh after 8 hours? I am beginning to think that keeps track of IP addresses running bitcoin in a database of sorts... and forefully connects to them every time their bitcoind reboots. Am I right?

share|improve this question
Blockchain runs multiple bitcoind nodes and the networking components were also modified to use boost::asio rather posix sockets. you should be able to get at least 1024 connections with standard bitcoind though. – Ben Reeves Mar 4 '13 at 19:22
Any idea on what might be holding me back from achieving 1,024 connections on my bitcoind? I don't seem to be maxing out my CPU, RAM, or bandwidth just yet. – user3145 Mar 4 '13 at 21:53
up vote 8 down vote accepted

The bitcoind client has a maxconnections configuration option. The client launched With -maxconnections=N will allow up to N incoming connections to be established simultaneously.

Perhaps you may need to increase the connection timeout for that many connection attempts from a single (possibly underpowered) node. Perhaps set it to like 15 seconds (15000 ms).

-timeout= Specify connection timeout in milliseconds (default: 5000)

[Edit: Pieter Wuille's answer gets you further there. -addnode will let you force new outgoing conections to nodes when you have their IP addresses.]

share|improve this answer
I will re-start my bitcoind client now with the timeout increased to 15 seconds as suggested as well as the -maxconnections=1000 and get back to you. – user3145 Mar 4 '13 at 21:54
So after 7 hours of running bitcoind with a 15 second timeout and 1,000 max connections.. I was at 32 connections at one point but have now dropped to 28, so I doubt adding the maxconnections or the timeout variable did much at all unfortunately. In fact I think it may have hindered the number of connections I would normally have after 7 hours. – user3145 Mar 5 '13 at 5:16

Bitcoin by default will not make more than 8 outgoing connections, and -maxconnections only controls how many incoming connections you allow. Feel free to set this higher, but it will take time before others connect to you in large numbers.

Please don't change this, as there is no need. Connectable peers on the network are a scarce resource, and essential to the decentralization. If people go try connect to all of them like some sites do, we'll very quickly run out.

In case you're a merchant or miner, you perhaps want to set up a few fixed connections to trusted others (see the -addnode command line/config option), but having more connections does not mean stronger verification (the reference client always verifies everything) or even faster relaying (as you'll slow down by distributing new blocks and transactions to all your peers). It is mostly a matter of providing a server to the network.

share|improve this answer
After 4 days of running my box with -maxconnections=1000, I was still only at ~50 connections. I have not seen a "connected time" over 8 hours in the list provided by so that tells me they must restart their server every 8 hours or so. Either that, or connections drop and refresh after 8 hours? – user3145 Mar 5 '13 at 18:23
I'm sure they have a custom infrastructure that creates thousands of outgoing connections. Bitcoind never creates more than 8. As I said, there is no need for more. – Pieter Wuille Mar 5 '13 at 23:27

The given answers don't answer the question. Even though it might not makes sense to achieve a thousand connections, here's how to do that on Debian. You want to make some slightly changes in the code and recompile bitcoind:

Get required packages for compiling:

$ aptitude install git make build-essential libssl-dev libboost-all-dev libdb-dev libdb++-dev libminiupnpc-dev

Clone the git repository (make sure the version is the most recent branch):

$ cd /usr/src
$ sudo git clone -b 0.8.4
$ cd bitcoin/src

Edit the net.cpp file:

@@ -27,7 +27,7 @@
 using namespace std;
 using namespace boost;

-static const int MAX_OUTBOUND_CONNECTIONS = 8;
+static const int MAX_OUTBOUND_CONNECTIONS = 1000;

 bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false);

@@ -1533,7 +1533,7 @@
             OpenNetworkConnection(CAddress(vserv[i % vserv.size()]), &grant);
-        MilliSleep(120000); // Retry every 2 minutes
+        MilliSleep(5000); // Retry every 5 seconds

1.) By changing MAX_OUTBOUND_CONNECTIONS, the client will go on connecting until it reaches 1000 proactive connections.

2.) By changing the sleep timeout new connections are tried more frequently.

Compile and install bitcoind:

$ sudo make -f makefile.unix
$ sudo mv bitcoind /usr/bin

Don't forget to set the maxconnections in bitcoin.conf:


Start bitcoind and your done. The client will make lots of connections really fast.

Disclaimer: As Pieter Wuille pointed out, it can harm the network to run a modified client like this one. Please use this solution for research purposes only and not as a permanent solution.

share|improve this answer
I don't want to downvote because you're indeed actually answering the question, but I really strongly want to stress that doing this is a horrible idea and unnecessary. See my answer for why. – Pieter Wuille Aug 25 '13 at 23:37
@Pieter Wuille: How do you want to stop people from exploiting the Bitcoin network? Just telling them "hey, you bad boys, don't do this or that"? That's not going to work... – Kozuch Dec 16 '13 at 10:39
I'm not trying to stop bad guys - they're a fact of life, and I'm sure we can deal with a few. What I want to avoid is people incorrectly assuming that more connections is better for them and/or the network. – Pieter Wuille Dec 16 '13 at 23:39
This is the real answer! – Felipe Micaroni Lalli Mar 12 '14 at 11:29

Why do you need 1,000+ connections?

By default bitcoind cannot have more than 125 connections. You need to start bitcoind with the parameter -maxconnections=<n> or set maxconnections=<n> in bitcoin.conf to be able to connect to more peers.

share|improve this answer
Why?! Why not should be the real question! If you must know, I want to have the most verified blockchain in the world. – user3145 Mar 4 '13 at 19:06
"The most verified"? That makes no sense. Every node at the same block height and block hash is equal. And yours may have a blockchain fork that eventually becomes orphaned. – Stephen Gornick Mar 4 '13 at 20:38
Sorry for the typo, I'm not up to speed on the entire bitcoin lexicon just yet. If not the most verified, then I want to be the fastest at recognizing new transactions. That is what I meant. – user3145 Mar 4 '13 at 21:52

As nobody seems to have mentioned it I'll chip in for future reference. If your bitcoind node is behind a router/NAT then you can only connect to others, they cannot connect to you. Let's assume most people are in that situation, which makes most nodes unconnectable (directly at least). If you open up your node port on your router then every bitcoind node out there will be able to connect to you if they wish rather than your node only being able to connect to others who have opened their port. The same applies to Bittorrent and other p2p systems.

share|improve this answer

To check whether you allow incoming, use this: There is a button to check your ip and if it results in green, you are fine to have incoming connection. Once you have that, I was told you can have more outgoing connection. Good luck.

share|improve this answer
That's not an answer to the question. – Pieter Wuille Jun 30 at 13:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.