Extract private key from multibit-hd

I used this wallet for a long time. Since they dropped the development and didn’t really provide a good way to extract the private keys from the wallet, I had to find a hacky way to do it. Fortunately for me, someone else had already done this. However, I realise that this method might not be very easy for everyone, so I decided to fork the wallet and provide a patched compiled version that anyone can use to extract their keys. The instructions are the same as in the source link below.

Source for patch and instructions: https://bitcoin.stackexchange.com/questions/40507/how-can-you-extract-private-keys-from-multibit-hd/51297#51297

My patched fork: https://github.com/jra89/multibit-hd

Compiled jar: https://www.alcor.se/files/multibit-hd.jar

If you downloaded and used the compiled jar above, you can skip to step 4.

  1. Clone the MultiBit HD Git repository
  2. Apply the patch above
  3. Build the project: mvn clean dependency:sources install
  4. Start the application: java -jar mbhd-swing/target/multibit-hd.jar
  5. Go to Tools -> Sign message and enter a Bitcoin address from your wallet for which you want to recover the private key.
  6. Press finish.
  7. Read the Bitcoin address and corresponding private key from the console output

When you have the key you can import it in whatever client you have. Remember that different addresses in the wallet equals different private keys, so you will need to extract all of them via the “Sign” method in multibit-hd. If you can’t figure it out, leave a comment and I might be able to help.

11 thoughts on “Extract private key from multibit-hd

  1. John

    Hey bro,

    I have read your article, but some things don’t work in my case. First of all, I would like to say that I have lost my private phrases for Multibit HD and therefore I am interested in this article. I want to extract my private keys in order to transfer my funds elsewhere, because the Multibit HD wallet keeps saying that my balance is unconfirmed, and thus I can’t do anything with it. If I would have had the private keys, then I could have simply accessed the bitcoins through another client, like electrum.

    You’re article seems to solve the problem for someone like me who has lost his private keys, if I am correct? However, I tried downloading and using the compiled jar as instructed, but unfortunately it keeps crashing my Multibit HD client, or it does not give an output of the private keys. I am running MacOS Sierra on my macbook.

    If there are any other workarounds of exporting the private keys, or perhaps changing an unconfirmed balance back to a confirmed balance on MultiBit HD then I would love to hear from you. I have also tried to repair my wallet a few times, but this didn’t work either. It might also be possible that the procedure instructions differ when using MacOS?

    I would love to hear soon from you, as I am really concerned about never getting access to my bitcoins again. If you can help me then I will give you a small reward as well 😉

    Thanks in advance!

    1. cats Post author

      Hello John, can you start the jar file from a terminal and tell me what output you are getting when it crashes? Also do you know what version of the Multibit-hd you are using? I used to have the problem that you are currently having, with the balance being unconfirmed. I believe I solved it by making a backup of my Multibit-hd data folder (where the wallet is stored), then removing everything and reinstalling Multibit-hd, and then adding just the wallet data again. It’s a bug that they have simply failed to fix.

      Anyway, we can start by trying to fix the crashing issue you are having. So an error message and the version you were using before downloading my compiled version, would be a good start. I could then try to help you fixing it by either patching whatever is causing the crash, or compiling a specific jar for the version you are using.

  2. John

    Hello Cats,

    First of all thanks for reaching out to me! I was starting to become desperate as the whole Multibit HD team left us in despair by not providing a solution to this issue. I am using Multibit HD version 5.1, which is the newest one available. I have tried to run the compiled patch that you provided, but since I’m using MacOS it’s rather complicated to run these sorts of files. Therefore, it would be great if it’s possible to solve this issue without the .jar file. However, if the compiled jar file is needed then i’d have to find a way to properly use it. If I click on the compiled jar file that you provided, then Multibit HD launches and directly shows an error indicating that the program has crashed. However, I suppose I should run this file from the terminal, so I started up the terminal on my laptop. There was a way to open .jar files on the terminal, but I can’t seem to find that now. When I run the .jar file from here, the exact same thing happens. It launches Multibit HD, which directly shows me a crash error. The console output can be seen here: https://ufile.io/8xwg3
    Here is an image of what happens: https://ufile.io/eyk69

    I am willing to delete all of the files of Multibit HD, however I’m not sure what files are needed for the backup. I’m afraid to make a backup of the wrong files and then lose my BTC. Could you please specify which directory is needed for the backup? Should I store these files on a USB stick or just leave them somewhere else on my laptop?

    Thanks in advance!

    1. cats Post author

      If you are unsure then please leave everything as it is. You will have to find out where the data files are created. I will have access to a Mac tomorrow and might be able to test it and find out for you then. Do you prefer that we discuss this here in the comments or via other methods? Like email? I have already sent you an email (the one you provided when you wrote your comment here). If we can’t figure out how to get it working for you on Mac, then my suggestion is that we find your data files and copy them to a Linux machine (VirtualBox or such) and run the jar there instead. This is the way I run it and that’s working for me.

      1. John

        Hello Cats,

        I have been waiting for a long time to receive your reply and apparently you have replied to my previous comment very quickly! However, I thought I’d receive a notification through email, but that was not the case. Therefore, I am sorry for replying so late to your comment of October 4th. From now on I will regularly check this site to see if you’ve made a comment, unless you want to switch over the email. I would be totally fine with that.

        You’ve mentioned that you had access to a mac, which is great. Could you test the whole process on that mac? I am willing to copy the files to a Linux machine if that can solve the problem. I’d like to hear which files need to be copied and where these files can be located. In addition, should I just download software which makes it possible to switch to Linux?

        Thanks in advance, and once again, sorry for replying so late!

        1. cats Post author

          We can switch to email.
          I will send my reply to the email you have provided in your latest comment.

      2. Joseph

        Hi Cats,

        My name is Joseph and I have the same problem with my MultiBit HD wallet. I have some bitcoins still showing unconfirmed status and I lost my wallet words to restore my wallet. I really need your help and could you please send me a e-mail. Please, thank you!


  3. Tapani

    Hi, thanks for the fine tutorial. I had same problem while loosing my keys in Multibit HD. I’m not sure if this is the right method, but still. I read from internet, MBHD needs different keys (12 or more). This method of yours produces a long chain of numbers and letters.
    The other point : there are two different addresses – my bitcoin address is different than the “Bitcoin address” in the “Signing your message” – what data should be entered into these boxes?

    1. cats Post author

      You have to sign a message for every bitcoin address you have used in Multibit-HD basically. My method was to simply check my transactions and then use blockchain.info and some detective work to find all adresses I had used for my wallet. Not super efficient but it works, and there’s surely a way to solve it even better. But that would most likely require some more changes to the code :). So, as an example, if you have used two different adresses for receiving BTC in MBHD, then you will need to sign a message for each of those. You will get a different private key for each of these procedures, which you then need to import in your new wallet (Like Bitcoin Core). Remember to keep your private key safe at all times and not share it with anyone.

  4. Jim

    Hey, I would like your help. Will tip you if you can help me. I’m having the same problem as the other person. It just keeps crashing. Same version.

    1. cats Post author

      Are you also using OSX? My current best tip is to:

      1: Install Virtualbox
      2: Install ubuntu on said virtualbox
      3: Install the latest version of MBHD on Ubuntu
      4: Start it and make sure it works
      5: Replace the multibit-hd.jar with my modified one
      6: Do the steps in the tutorial

      This is currently the best method I have available without making more changes to the code (Also, I’ve checked the errors that are thrown on OSX and I can’t currently fix them).
      If the above method wont work then I can go through the email conversation with the other person I helped, and gather some more clues.


Leave a Reply

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