Friday, October 14, 2016

Using Electrum on an air-gapped machine

Securely storing bitcoin is hard. Most people trust a third party, like Coinbase, to keep their bitcoin safe. But these third parties are big targets for hackers and indeed many have been hacked and lost their clients' funds. People who are truly security conscious keep their own wallet on an air-gapped machine that never connects to a network.

I like using Electrum for my wallet software but I've had trouble figuring out how to use it on an air-gapped machine for two reasons. First, the Ubuntu installation instructions for Electrum use apt-get and python setup tools, both of which require a network connection to download dependencies. This is a no-go if you want to have an air-gapped machine which has never touched the network.

Secondly, Electrum translates data into a custom base 43 format before encoding it in QR codes. QR codes are a secure way of transferring data such as signed transactions off of an air-gapped machine. But I ran into a problem that other software doesn't recognize bitcoin data in base 43 strings and there weren't online tools for translating from base 43 to a more common format.

Let's tackle the second problem first. I wrote a little web tool that will convert Electrum QR data into a format that bitcoin understands. It's at

So let's say you transfer a transaction off of an air-gapped machine using an Electrum QR code and you get data that looks like this:

If you paste that into, it will translate the data into a hex string that bitcoin understands. You can then decode that data into a human-readable json object here or broadcast it to the bitcoin network here

So that's one problem taken care of. What about installing electrum onto an offline Ubuntu machine? Electrum installation requires two Debian packages (python-qt4 and python-pip) and a host of python dependencies that are usually handled by network-enabled package managers. After much digging, I've found a way to do that and I wrote a guide here

I hope this helps you keep your bitcoin secure with Electrum. Stay safe and have fun with bitcoin!


  1. This comment has been removed by the author.

  2. Hi. Great guide.

    I have a 32 bits laptop, yeah very old. how do i download the python debs for 32 bits?. I use my normal pc with a VM ubuntu (64bits) for the download.

    Thanks for the help. Salute

  3. This comment has been removed by the author.