Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Install / Configure 'Storj' Distributed Filesystem Software on Windows 10, Make Money Sharing your Disk Space, & Securely Store Files in the Cloud
- In this tutorial, we'll walk you through everything you need to do to get the 'Storj' software suite up & running so you can earn cryptocurrency (that can be sold for fiat currency such as the U.S. Dollar) by sharing extra unused disk space on your Windows 10 computer. You'll also be able to use it to store files in the cloud, distributed across multiple instances of disk space made available by others running the software just like you- in a redundant, immutable manner in which there is no single point of failure, thanks to the distributed nature of the system.
- In this case, we'll be using Windows 10 as our target system to install to, and while these instructions may also work on other Windows variants, these instructions are available 'as-is' & aren't guaranteed to work in every use-case.
- We'll install the disk sharing component first. However before we begin the installation you'll need to create an online wallet in which to hold your funds in the form of 'Storjcoin X' (SJCX). Go to Counterwallet's website [1], click 'Create New Wallet', & get a unique 12-word passphrase which will be used to authenticate & access your wallet in the future. Write it down somewhere safe, & don't ever type it anywhere online so as to reduce the chances of unauthorized access to your funds.
- Once you have a wallet, you'll have an entry next to 'My Address #1'. It looks something like this: “14VnhsQVmF9X3icXuUeJAMwt6JnhM3Uqah”. Make note of this as we'll need to enter it into the software later so it can periodically deposit your shared storage space earnings.
- You need to have a minimum balance of 10,000 SJCX to qualify to be paid for your shared hard drive space. Payout addresses with less than this amount who are sharing space will not be paid for it, regardless of how much space is made available. Thus, you'll need to purchase seed funds from a currency exchange & deposit it to your wallet before you can expect any income from your resources. To do this, go to the Bittrex [2] exchange, which provides the means to exchange Bitcoin (BTC) for Storjcoin X (SJCX).
- First you'll need to buy a sufficient amount of BTC with which to buy your SJCX. Circle [3] is a good place to do this, as they allow instant access to purchased BTC when its bought using a typical Debit card from any bank. Consult current exchange rates on both sites to determine how much BTC you'll need to buy to be able to in turn buy at least 10,000 SJCX.
- Once you've bought your BTC on Circle, click on 'Send Money' & enter your Bittrex 'deposit' address to send your BTC to your account there. It'll take between 30-60 minutes to process & get 'confirmations', which secure transactions from fraud. Once your deposit has completed, buy SJCX on Bittrex at market rate, and withdraw that, transferring it to your Counterwallet address. Again, this will take some time to process & get confirmed. The whole process shouldn't take more than 2 hours, considering all the transferring & confirmation-ing involved.
- Once your prerequisite minimum balance is established, it's time to install the software component which will manage the sharing of your disk space. Download the current 'dataserv-client' from GitHub [4], which at the time of this article's publication is version 2.1.4.
- Unzip the 'dataserv-client' folder in the file you downloaded to your C: drive, not in any folder within the C: drive, as this can cause permissions problems which are avoided this way. You'll then have the software available at this path/location: 'C:/dataserv-client/'.
- Configure your client to use your payout address (Which was noted earlier). On your keyboard, press the 'Windows' key + 'R' then enter 'cmd.exe' in the 'Run' dialog that comes up, to get a Windows command terminal to come up. Type 'cd C:/dataserv-client' followed by <Enter>. You should see your current directory change to a 'C:\dataserv-client>' prompt.
- Then configure the client to use your payout address by typing 'dataserv-client config –set_payout_address=14VnhsQVmF9X3icXuUeJAMwt6JnhM3Uqah', substituting the address in this example with yours which you noted earlier. Also, don't include the ' ' that are used in this document surrounding the text to type. Now your client is configured.
- Now we need to create a folder in which the client will store its files from the network. Make a ne folder called 'StorjData' in your username's home folder, which is located at 'C:/Users/<Username>'.
- Next, we'll configure your dataserv-client to launch automatically with Windows when you start your computer. Open Notepad & in a new file, enter the following text, substituting your username, and the amount of space you want to allocate for sharing, all on one line:
- C:/dataserv-client/dataserv-client.exe --store_path=C:\Users\Chris\StorjData --max_size=800.0GB farm
- Make a folder in your user folder called 'Scripts', & save this file in your new Scripts folder, called 'start_dataserv-client.bat' making sure when you enter the filename you change the drop-down menu called 'Save as type' to 'All Files', and entering the name with the .bat extension in the 'File name' field as detailed here. This is a 'batch' file which will start the dataserv-client app in the background (invisibly without an ugly terminal window on your desktop) at the behest of another executable file we'll create next.
- Create a new file in Notepad & enter the following text into it, substituting your username for mine as is used in the example:
- Dim WinScriptHost
- Set WinScriptHost = CreateObject("WScript.Shell")
- WinScriptHost.Run Chr(34) & "C:\Users\Chris\Scripts\start_dataserv-client.bat" & Chr(34), 0
- Set WinScriptHost = Nothing
- Save this file in your Scripts folder as 'start_dataserv-client_headless.vbs', ensuring that the .vbs file extension is used instead of the default .txt, by means of setting the 'Save as type' drop-down to 'All Files', just as we did before.
- Right-click your 'start_dataserv-client_headless.vbs' icon in the Scripts folder, hover on 'Send To' & click on 'Desktop'. This will place a shortcut on your desktop. Right-click (& hold) that shortcut, drag it to the Startup folder in your Start Menu, & release the mouse button, then select 'Move here'. Now the app will start whenever you login.
- Right-click on your taskbar in an area where there's no window buttons & click on 'Task Manager'. Then left-click to run your 'start_dataserv-client_headless.vbs from your Startup folder in the Start Menu. You should see a new entry in the 'Processes' tab in Task Manager- this is your hard drive being shared.
- After several hours you're client will have initialized & you'll be able to see your address & allocated space listed on the project's status page [5].
- That's it for the 'Allocating & sharing hard drive space' component of this tutorial. Next we'll install & configure the necessary components with which to store your files. This next part is much more involved.
- [1]
- https://counterwallet.io
- [2]
- https://bittrex.com/
- [3]
- https://www.circle.com
- [4]
- https://github.com/Storj/dataserv-client/releases/download/v2.1.4/dataserv-client-2.1.4.win32.zip
- [5]
- http://driveshare.org/status.html
- This component we need to install only runs on Debian Linux (One of the many variants of linux), so we'll have to first download an installer CD image, then create a 'Virtual Machine' (VM) in an app called Virtualbox. There are 2 components to it, the main app & the extension pack. Download the most recent version (5.0.8 at the time of publication) of the main app here [6], & the corresponding extension pack here [7].
- Install the main Virtualbox app first, & then click on the extension pack & install it to the main app.
- Go to the Debian website & download a 'netinst' CD image [8] with which to install this Linux system from. At the time of publication the latest version is 8.2.0. Save it in your Documents folder.
- Click on 'New' in Virtualbox, and enter a name for the VM- in my case it's called 'Brooklyn'. Click the first drop-down menu & select 'Linux'. Click on the second drop-down menu & select 'Debian 64-bit'. Click 'Create' to add a disk, changing the selection from 8GB to 20GB, & changing the 'Dynamically Allocated' to 'Fixed Size'. Then click 'Create' again & wait for the disk to pre-allocate on your computer.
- Next click 'Settings' & go to the 'System' section from the left, and the 'Acceleration' tab at the top. Change the 'Paravirtualization Interface' drop-down menu to 'KVM'.
- Go to the 'Display' section, & under the 'Remote Display' tab check the 'Enable Server' box, & change the default port to anything else, noting it for later. In my case, I use 2580. Check the 'Allow multiple connections' box.
- In the 'Storage' section, click the empty CD drive, then the CD icon on the right, & select 'Choose Virtual Optical Disk File', and select the file you downloaded in your Documents folder.
- Click the 'Audio' section & uncheck the 'Enable Audio' box there.
- Click the 'Network' section, & select 'NAT' in the 'Attached to' drop-down menu under 'Enable Network Adapter' in the 'Adapter 1' tab. Click on 'Advanced', & change the 'Adapter Type' to 'Paravirtualized Network' in the drop down menu. Then click the 'Adapter 2' tab, check the 'Enable Network Adapter' box, & choose 'Host-only Adapter' in the 'Attached to' drop-down menu. Click on 'Advanced', & change the 'Adapter Type' to 'Paravirtualized Network' in the drop down menu.
- Click the 'User Interface' section, then the 'Input' drop-down menu & uncheck both 'Keyboard' & 'Mouse Integration' checkboxes.
- Finally, click 'OK' at the bottom of the settings dialog to save your changes.
- Now, click the drop-down arrow on the right of the 'Start' button & click on 'Detachable Start'. This will launch the VM in a new window.
- Click anywhere on the new screen, then use the arrow buttons on your keyboard to select 'Advanced', then 'Expert Install'.
- Press <Enter> & continue unchanged for 'Choose Language', 'English', 'United States', 'United States' 'Additional Locales', 'Configure Keyboard', 'American English', 'Detect and mount CD-ROM', 'USB Storage', 'CD-ROM detected', 'Load Installer components from CD', 'Installer components to load', 'Detect network hardware', 'Configure the network' 'Waiting time', 'eth0', 'Auto-configure', 'Waiting time'.
- At the 'Configure the network' part where it asks for a 'Hostname', enter the name of the computer (case-sensitive), as you named it when you first started creating the VM. In my case this was 'Brooklyn'. Then press <Enter>.
- Leave 'Domain name' blank & hit <Enter> again. <Enter> to setup users & passwords & again for 'Enable shadow passwords', 'Login as root'.
- Enter a hard password twice for the root account, & note it somewhere safe. Then select 'Yes' to create a normal user account. Enter the user account person's full name here, then <Enter> for the autofilled username based on this value. Note the username as you'll use this to install stuff later. Enter a hard password twice for this user account, & note it for later.
- Press <Enter> to get through 'Configure the clock', 'Set the clock using NTP', 'NTP server to use', select your time zone, & <Enter> to 'detect disks'.
- <Enter> through 'Partition Disks', 'Guided- use entire disk', 'select disk to partition', 'All files in one partition', 'Finish partitioning…', then select 'Yes' at 'Write changes to disks'.
- <Enter> to 'Install the base system', then wait awhile.
- <Enter> at 'linux-image-amd64', then select 'targeted' next.
- <Enter> to “configure the package manager', <Enter> to “Use a network mirror', & for 'http', select your country, use the first entry for the 'Debian archive mirror', Leave blank for no proxy (Unless you know what you're doing), Choose 'Yes' for 'Use non-free software', leave 'backported' unchecked & hit <Enter>
- <Enter> to 'Select & install software', 'No' to package usage survey.
- Uncheck 'Debian desktop environment' & 'print server', leave 'standard system utilities' checked, & check the box for 'SSH server', then <Enter>.
- Wait a bit for the install to finish.
- <Enter> to “Install the GRUB boot loader', again for “Yes', down-arrow to select the disk under 'select device manually', 'Yes” to force install, then <Enter> to 'Finish the installation'.
- <Enter> to set the clock to UTC, then 'Continue' to finish up.
- Next close the Virtualbox window when it gets to the part where you see the Virtualbox logo, before it totally restarts, choose 'Power Off', then <OK>.
- In the Virtualbox window, click the 'Snapshots' button in the upper right. Click the camera button & name the snapshot 'Pre-Firstboot', so we have a backup of the VM's state at this stopping point that we can revert to should something go wrong- it'll save us from having to reinstall the whole system again.
- There are several things we need to do to this newly installed system before we get into the meat & potatoes of installing the Storj componentry, which will make our lives easier managing the system in general. The first thing we do is setup the VM to start 'headless', or invisibly, just as we have done with the dataserv-client component. To do this we open Notepad, & enter the followiing text into it, replacing the Brooklyn part with whatever you've named yours:
- Set WshShell = WScript.CreateObject("WScript.Shell")
- obj = WshShell.Run("C:\Progra~1\Oracle\VirtualBox\VBoxHeadless.exe -s Brooklyn", 0)
- set WshShell = Nothing
- Save the file as a .vbs just as we did before- in the Scripts folder. I called mine Start_Brooklyn_Headless.vbs. Adjust your name accordingly. And put a shortcut to it in your Startup folder, just like we did earlier with the dataserv-client file.
- Next we install an app called Putty with which to access the system more easily than using the Virtualbox interface. Download & install Putty from here [9]. At the time this was written the latest version was 0.65.
- Now we need to make some adjustments to the VM for easy access. Start the VM by choosing 'Detachable Start', as we did earlier, and log in via the Virtualbox window using the username 'root' & its password.
- At the # prompt, type the following then press <Enter>:
- nano /etc/ssh/sshd_config
- PgDown a bit until you get to the line that's:
- PermitRootLogin without-password
- And change it to be:
- PermitRootLogin yes
- Then press <Ctrl>+<X>, <Y> for 'Yes', & <Enter> for original filename.
- Now at the # prompt enter the following followed by <Enter>:
- service ssh restart
- Now at the # prompt, enter the following command followed by <Enter>:
- nano /etc/network/interfaces
- Change the line that's:
- allow-hotplug eth0
- To be:
- auto eth0
- Now on your Windows PC, right-click the networking icon in your system tray & click 'Open Network and Sharing Center'. Then click on 'Change adapter settings' on the left, right-click 'Virtualbox Host-Only Network & choose 'Properties', select 'Internet Protocol Version 4' & click the 'Properties' button. Change the rightmost number in the 'IP address' field to a 2, & note the address for use elsewhere. Leave the DNS section empty, & click 'OK', then 'Close', & close the network windows you opened to get there.
- Now add the following below the line that is:
- iface eth0 inet dhcp
- auto eth1
- iface eth1 inet static
- address (what you noted from Windows, but with a 3 as the last number) (example: 'address 192.168.56.3')
- Press <Ctrl>+<X>, <Y>, & <Enter> to save & close.
- At the # prompt enter the following followed by <Enter>:
- service networking restart
- At the # prompt now enter the following:
- ifconfig
- You should have a section that says this:
- eth1 Link encap, bla bla bla…
- inet addr:192.168.56.3 Bcast:192.168.56.255 Mask:255.255.255.0
- At the # prompt type 'exit' then <Enter>.
- Now open 'Remote Desktop Connection' from your Windows Start Menu, & in the 'General' tab, in the 'Computer' field, enter:
- localhost:2580
- Substituting the 2580 with the port you chose earlier when configuring the Virtualbox video settings.
- In the 'Experience' tab, choose 'LAN' from the drop-down menu. In the 'Advanced' tab, choose 'Connect & don't warn me' from the drop-down menu.
- Back to the 'General' tab, click 'Save As', go to your Desktop using the leftmost arrow in the horozontal field at the top, and save it as <Computername>.rdp. In my case it's Brooklyn.RDP. Close the window with the 'X' at the top right. Then click the icon you just created on your desktop & you should be at a login prompt just like when you had the Virtualbox window open. This is the same as a monitor connected to the VM- same as using the Virtualbox 'Detachable'-generated window. So now we can connect without opening the Virtualbox app. But wait, there's more it gets better.
- Close the Virtualbox VM window using the 'X' at the top right, and choose 'Continue running in the background' before clicking 'OK'.
- Go to the Putty icon in your Start Menu, right-click & hold the Putty icon, drag it to your desktop, & release the mouse button & choose 'Create Shortcut Here'.
- Right-click the shortcut & choose 'Properties'.
- In the 'Target' field, enter the following:
- "C:\Program Files (x86)\PuTTY\putty.exe" -ssh [email protected] -pw password
- Substitute the 192.168.56.3 with the value you noted earlier when we set the Windows & the VM's network address to something that ended with a 3. Substitute chris with your username & password with that user's password. Then click <OK> to save it.
- Rename it “(VM Computername) as (Username)”.
- Right-click it & select 'copy', then 'paste' a new copy on your desktop. Rename it “(VM Computername) as root”.
- Right-click it again & choose 'Properties', & in the Target field enter the following:
- "C:\Program Files (x86)\PuTTY\putty.exe" -ssh [email protected] -pw password
- Now we have a one-click way to login to the VM as either the root user or the normal user. Click them to test it. Sometimes it takes a little while to login because the VM runs slowly, so don't be surprised if you can't use these for the first 3 minutes the VM is running, if they fail, just close them & try again in about 30 seconds. If it persists, something's wrong, and you'll have to use the rdp method, or in a worst case scenario the Virtualbox app window.
- Now we can easily copy/paste into the terminal, which is a pain to do otherwise.
- At this point we're ready to install a bunch of stuff we'll need later. In your root terminal enter the following at the # prompt- you can copy/paste it into Putty:
- aptitude update && aptitude install -y sudo htop iotop screen build-essential make automake autotools-dev git software-properties-common python-software-properties linux-headers-3.16.0-4-all curl recode rhino aview plowshare4 libpq-dev python-dev python-virtualenv nginx
- Now enter the following at the # prompt:
- visudo <Enter>
- Add the following under where it has:
- root ALL=(ALL:ALL) ALL
- yourusername ALL=(ALL:ALL) ALL
- Then <Ctrl>+<X>, <Y>, <Enter> to save.
- Open the VM with the Virtualbox window- click 'Show', then select 'Devices' from the top menu, and click 'Insert Guest Additions CD image'.
- In the terminal at the # prompt enter the following:
- mkdir /mnt/sr0 && mount /dev/sr0 /mnt/sr0 && sh /mnt/sr0/VboxLinuxAdditions.run
- In the Virtualbox window, right-click the CD icon in the bottom of the screen & select 'Remove'.
- Now we need to install stuff from Github, so go there [10] & create an account if you don't already have one.
- Open a terminal with the Putty shortcut which logs in as the non-root username.
- At the $ prompt enter the following followed by <Enter>:
- ssh-keygen -t rsa -b 4096 -C "[email protected]"
- Just <Enter> through the prompts & keep everything either default or empty.
- Then do this at the $ prompt:
- eval $(ssh-agent -s)
- ...and:
- ssh-add ~/.ssh/id_rsa
- Then:
- vi ~/.ssh/id_rsa.pub
- ...And copy the whole thing to your clipboard, except the last line under the text where its empty- important to only copy the text, & not that empty part at the bottom.
- In your GitHub account, go to user settings, & 'SSH Keys', click 'Add SSH Key', name it the name of the VM, & paste that text into the 'Key' field. Then 'Add key' to save. You should get a confirmation email afterward if it worked.
- As the normal user (Not root), and enter these following commands at the $ prompt followed by <Enter>:
- mkdir apps && cd apps
- git clone [email protected]:Storj/web-core.git
- git clone [email protected]:Storj/MetaDisk.git
- cd Metadisk
- virtualenv .env
- source .env/bin/activate
- pip install -r ~/apps/web-core/requirements.txt
- python -mcloudmanager.setup_db database/files.db
- [6]
- http://download.virtualbox.org/virtualbox/5.0.8/VirtualBox-5.0.8-103449-Win.exe
- [7]
- http://download.virtualbox.org/virtualbox/5.0.8/Oracle_VM_VirtualBox_Extension_Pack-5.0.8-103449.vbox-extpack
- [8]
- http://cdimage.debian.org/debian-cd/8.2.0/amd64/iso-cd/debian-8.2.0-amd64-netinst.iso
- [9]
- http://the.earth.li/~sgtatham/putty/latest/x86/putty-0.65-installer.exe
- [10]
- https://github.com
Advertisement
Add Comment
Please, Sign In to add comment