Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: RedFalcon on January 24, 2017, 11:37:39 PM



Title: Running Bitcoin Core on External Hard Drive
Post by: RedFalcon on January 24, 2017, 11:37:39 PM
I downloaded the block data into an external hard drive, which took weeks.
But when I run Bitcoin Core on a different computer from my hard drive, it asks where I want to download the block data again.

Does this mean I can only use it on one computer?
Is there a way to get around this?

OS: Both are Windows
Version: Newest from the official site


Title: Re: Running Bitcoin Core on External Hard Drive
Post by: devans on January 25, 2017, 12:09:02 AM
You can use the same data directory on multiple computers (though not at the same time).

The Bitcoin Core instance on the second computer has no inherent way of knowing where it should look for the blockchain, but you can tell it using the -datadir command line parameter. See this wiki entry (https://en.bitcoin.it/wiki/Data_directory#Windows) for detailed instructions.


Title: Re: Running Bitcoin Core on External Hard Drive
Post by: RedFalcon on January 25, 2017, 01:01:43 AM
You can use the same data directory on multiple computers (though not at the same time).

The Bitcoin Core instance on the second computer has no inherent way of knowing where it should look for the blockchain, but you can tell it using the -datadir command line parameter. See this wiki entry (https://en.bitcoin.it/wiki/Data_directory#Windows) for detailed instructions.

Uhm...That does not work. When I do that, it says that my Bitcoin Core is already running.


Title: Re: Running Bitcoin Core on External Hard Drive
Post by: achow101 on January 25, 2017, 01:34:16 AM
I downloaded the block data into an external hard drive, which took weeks.
But when I run Bitcoin Core on a different computer from my hard drive, it asks where I want to download the block data again.

Does this mean I can only use it on one computer?
No. Bitcoin Core will automatically look for the datadir in the default data directory location (i.e. not your external drive). It does not know that your external drive has all of the data, so it thinks the data is not there. You have to tell it to look for the external drive for the datadir by either choosing it in that dialog or starting Bitcoin Core with the -datadir=<path> option where <path> is the path to the datadir on your external drive.

Is there a way to get around this?
Once you set the datadir either in that dialog or the startup option in a shortcut on that computer (not your hard drive), it will always use the external drive so long as that drive uses the same drive letter every time.


Title: Re: Running Bitcoin Core on External Hard Drive
Post by: devans on January 25, 2017, 03:38:30 AM
Uhm...That does not work. When I do that, it says that my Bitcoin Core is already running.

That sounds like Bitcoin Core hadn't fully shut down when you disconnected the hard drive. Try deleting the .lock file in the data directory and launching Bitcoin Core again.


Title: Re: Running Bitcoin Core on External Hard Drive
Post by: HI-TEC99 on January 25, 2017, 02:56:22 PM
I downloaded the block data into an external hard drive, which took weeks.
But when I run Bitcoin Core on a different computer from my hard drive, it asks where I want to download the block data again.

Does this mean I can only use it on one computer?
No. Bitcoin Core will automatically look for the datadir in the default data directory location (i.e. not your external drive). It does not know that your external drive has all of the data, so it thinks the data is not there. You have to tell it to look for the external drive for the datadir by either choosing it in that dialog or starting Bitcoin Core with the -datadir=<path> option where <path> is the path to the datadir on your external drive.

Is there a way to get around this?
Once you set the datadir either in that dialog or the startup option in a shortcut on that computer (not your hard drive), it will always use the external drive so long as that drive uses the same drive letter every time.

The simplest way to do it is using the line of code below (include the full stop after the =). It will tell Bitcoin-qt to dump all the blockchain files into whatever folder Bitcoin-qt is in.

-datadir=.

Follow these instructions I posted for installing blackcoin to a thumb drive.


There is a way to to that if you create a shortcut to your blackcoin qt Bitcoin-qt inside a folder you installed it to.

Right click your blackcoin qt Bitcoin-qt and select "create shortcut". Right click the shortcut and select properties. A popup should open containing a text box with the word target written to the left of it. Add the line of text below to the end of whatever is already written in it. Make sure there is a space between the text that was already in the text box and the text below.

 -datadir=.

Press the apply button, then the OK button.

Double click the shortcut to start the blackcoin Bitcoin-qt wallet and it should store its largest files (the blockchain) and also its wallet.dat inside the folder containing the shortcut.

You can install the blackcoin qt Bitcoin-qt to a folder on a thumbdrive, use that shortcut technique, and when you double click the shortcut the blockchain and wallet.dat will get stored on your thumbdrive, not in appdata.

If you use that technique, and accidentally double click the qt instead of the shortcut a new wallet dat and blockchain will get created on your C drive inside appdata. Make sure you always start your wallet using the shortcut.