BitCoin is cool – and I’m not saying this only because it’s yet another geeky project that I installed and tested. It’s cool because it has a lot of the characteristics of a “perfect currency”. Among these is the fact that it’s completely descentralized.
On start, the BitCoin client connects to 8 random nodes. It gets the addresses from a IRC channel and/or uses the last nodes it connected to. While this works, it’s far from perfect. Because most of the live nodes are not reacheable from the Internet (NATs, firewalls) it can take as long as 2 minutes until the BitCoin client is connected and starts downloading the latest BitCoin blocks.
This might be acceptable for a desktop client, but not so much for a mobile device, like Android. If only you could always have a node online, that you could connect all your clients to! As it happens, you can.
BitCoin can be run in “server mode”, via a command like switch and/or via the “bitcoind” binary. While in this mode, it will accept client connections on port 8333. The desktop version of BitCoin (and the Android applications too) can be configured to connect to a specific node.
So this is exactly what I did:
Step 1. I downloaded the latest BitCoin binary and I unpacked it. There are 32 and 64 bit versions of both bitcoin (the GUI version) and bitcoind (the headless/server version).
Step 2. I created a user for bitcoin on one of my servers. Remember that running software ar root is potentially dangerous and should be avoided.
Step 3. I copied the bitcoind binary to that server and I created the following config file in /home/bitcoin/.bitcoin/bitcoin.conf:
maxconnections=100
server=1
rpcuser=your-username
rpcpassword=your-password
rpctimeout=30
rpcport=8332
gen=0
allowreceivebyip=1
The last line is necessary only if you want to also allow IP transactions. It’s safe to skip it. Also, notice that I allow 100 concurrent connections to my node – this is because I want to offer the node as a public service, but you might want a lower number here.
Step 4. Allow remote connections to the server. If you have a firewall, you need to allow at least access to port 8333. If you also want to send rpc commands to the BitCoin server, 8332 should also be open. If you decide to run a private node, you will normally only accept connections from your IP.
Step 5. Start bitcoind:
$ bitcoind
You can check its status by running:
$ bitcoind getinfo
Step 6. On the client side, you need to instruct the BitCoin GUI to connect to the server node and skip the normal IRC search. This is done by adding the following line to ~/.bitcoin/bitcoin.conf:
connect=your.server.ip:8333
The Android client I use has an option for this, too.
Step 7. That’s all! Now your clients will start much faster, since they will only connect to a single, known, IP.
***
My node is public – you can find it on the official list of fallback nodes. If you’re from Romania or close by, it might help you to use it: btcnode.novit.ro:8333 or 93.187.142.114:8333.
Enjoy!
Related posts:






