Installing bitcoin on Debian ‘squeeze’

Instead of being outdoors I geeked out indoors this weekend and amongst other things installed a Bitcoin daemon on a public facing server so I could have a play with the API/RPC features.

Below I document the steps I followed as it turned out to be slightly more taxing than the usual apt-get install bitcoind

Step 1) Get server

This is obviously optional depending on where it’s going but as I wanted it on a public facing machine and I’ve got a few projects where I need to using it soon I installed a new Debian image on the Rackspace cloud.

The newest version of Debian is ‘squeeze’ so I chose that and as for now this is for testing I chose the cheapest instance, 256MB RAM/10GB space for 24p a day (!) but can change this later if I need more grunt.

Step 2) apt-get install fail

It turns out that bitcoind isn’t in the standard package list for squeeze so you need to install it via back-ports. To do so add the following to your /etc/apt/sources.list

Save, then run:

Step 3 ) Install start-up & config scripts

Again, surprisingly for a debian package, there’s no start-up or config installed for you. So you’re going to have to do it yourself.

I took the

script found on this forum and edited it as per the thread recommendations with a few tiny mods of my own:

Note: items in the script above that may (or will definitely) need changing depending upon your environment are in bold.

Save it as /etc/init.d/bitcoind then run:

Now you need a config file, I got an example one here. Paste it into /home/[user script will run as]/.bitcoin/bitcoin.conf

4) Run

You can just run the init.d script now, but to be 100% sure that it’ll start on boot I simply rebooted.

On startup I could see a bitcoind process running and in my ~/.bitcoin/ folder I ran

I could see these two files slowly increasing in size, as the complete block chain was being synchronised:

You can get more info by running:

From this I could see that blocks was under the current count.

Get More Stuff Like This

I write about things that interest me with the aim of passing on the things that I know & learn to a wider audience. This covers subjects like growing my business, eating well, staying fit & healthy and how to get stuff done. Infrequently, I’ll release an email containing links to good resources on relevant topics as well as details of any new blog posts I've written. If you’d like to stay in the loop on this then you can sign up to my newsletter below. I also recently started a podcast that might interest you, visit for more information.

5 Comments Installing bitcoin on Debian ‘squeeze’

Leave a Reply

Your email address will not be published. Required fields are marked *