Foreverrising Blog

April 15, 2011

BitCoin.Conf Example

Filed under: Uncategorized — Tags: , , , , — foreverrising @ 8:22 pm

BitCoin.conf is the configuration file for both bitcoin (GUI) and bitcoind (daemon). In my bitcoin clients I usually only have one PC which runs bitcoin as a server. All others connect to it to mine. Here is an example bitcoin.conf file. Just cut, paste, edit, and ensure it is bitcoin.conf, not bitcoin.conf.txt or anything else. Also make sure the file is in the correct folder:

Windows XP:
C:\Documents and Settings\[USERNAME]\Application Data\Bitcoin\bitcoin.conf

Windows Vista & 7:
C:\Users\[USERNAME]\AppData\Roaming\Bitcoin\bitcoin.conf

Ubuntu/Linux:
/home/[user]/.bitcoin/bitcoin.conf

Mac OSX:
/Users/[user]/Library/Application Support/Bitcoin/bitcoin.conf

# bitcoin.conf configuration file. Lines beginning with # are comments.

# Network-related settings:

# Run on the test network instead of the real bitcoin network.
#testnet=1

# Connect via a socks4 proxy
#proxy=127.0.0.1:9050

# Use as many addnode= settings as you like to connect to specific peers
#addnode=69.164.218.197
#addnode=10.0.0.2:8333

# … or use as many connect= settings as you like to connect ONLY
# to specific peers:
#connect=69.164.218.197
#connect=10.0.0.1:8333

# Do not use Internet Relay Chat (irc.lfnet.org #bitcoin channel) to
# find other peers.
#noirc=1

# Maximum number of inbound+outbound connections.
#maxconnections=

# JSON-RPC options (for controlling a running Bitcoin/bitcoind process)

# server=1 tells Bitcoin to accept JSON-RPC commands.
#server=1

# You must set rpcuser and rpcpassword to secure the JSON-RPC api
#rpcuser=user
#rpcpassword=password

# How many seconds bitcoin will wait for a complete RPC HTTP request.
# after the HTTP connection is established.
rpctimeout=30

# By default, only RPC connections from localhost are allowed. Specify
# as many rpcallowip= settings as you like to allow connections from
# other hosts (and you may use * as a wildcard character):
#rpcallowip=10.1.1.34
#rpcallowip=192.168.1.*

# Listen for RPC connections on this TCP port:
rpcport=8332

# You can use Bitcoin or bitcoind to send commands to Bitcoin/bitcoind
# running on another host using this option:
rpcconnect=127.0.0.1

# Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate
# with Bitcoin -server or bitcoind
#rpcssl=1

# OpenSSL settings used when rpcssl=1
rpcsslciphers=TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH
rpcsslcertificatechainfile=server.cert
rpcsslprivatekeyfile=server.pem

# Miscellaneous options

# Set gen=1 to attempt to generate bitcoins
gen=0

# Use SSE instructions to try to generate bitcoins faster. For muliple core processors.
#4way=1

# Pre-generate this many public/private key pairs, so wallet backups will be valid for
# both prior transactions and several dozen future transactions.
keypool=100

# Pay an optional transaction fee every time you send bitcoins. Transactions with fees
# are more likely than free transactions to be included in generated blocks, so may
# be validated sooner.
paytxfee=0.00

# Allow direct connections for the ‘pay via IP address’ feature.
#allowreceivebyip=1

# User interface options

# Start Bitcoin minimized
#min=1

# Minimize to the system tray
#minimizetotray=1

April 10, 2011

Running a local BitCoin server

Filed under: Software — Tags: , , , , , , — foreverrising @ 8:37 pm

Running a BitCoin server is rather easy, and should only take a few minutes to configure. Depending on the abilities of your networked computers, you could take in a few BitCoins in a shorter period of time.

For the setup I already had a couple machines with bitcoin installed. For this post I’ll be using a Windows XP machine as the server and an Ubuntu client as the miner.

You’ll need to create a file bitcoin.conf, which defines the username and password for clients to connect. This file will need to be in your Application Data folder, which was a hidden folder on my windows machine in C:\Documents and Settings\[USER]\Application Data\BitCoin. Make sure that when you create the bitcoin.conf file, that it is not really named bitcoin.conf.txt if you made it in notepad. The lines that it will need are:

RPCUSER=[username]
RPCPASSWORD=[password]

Next, I opened a port to the local network on the server machine by adding an exception to Windows firewall. I chose 8333 on this machine.

Next on the Windows machine, I want to start the Bitcoin client in server mode with the -server switch at the command line. Also needed are the RPC switches that will allow your miners to connect to the server:

C:\Program Files\BitCoin> bitcoin.exe -server -RPCALLOWIP=192.168.1.* -RPCPORT=8333

This example will start the BitCoin program, and allow it to accept JSON-RPC commands. On the miner computer, which I will be using Ubuntu with poclbm as an example, I would type the following into a terminal:

python poclbm.py -d 0 -w 128 -o [BC server's IP] -p 8333 --user=us --pass=pw

Your server should be up and mining now. If you’re getting a message about problems connecting, I would double check the port settings. If you get a message about bitcoin not connected, then check the settings of your server instance.

If you have questions just post a reply!

Older Posts »

Blog at WordPress.com.