May 06•8 min read
Some of this is covered on Blockstack's Testnet website, but I wanted to provide an alternate set of instructions from start to finish so that others can see how I did it. I am currently running a testnet node using Ubuntu Server 20.04 LTS using only 1gb of RAM, so this configuration should be possible from any host operating system with the added benefit of using an isolated container.
<-- you are here
This series of posts will be broken up by topic, starting with this post (Step 0) on setting up the Virtualbox and Ubuntu Server environment, followed by each task laid out on the testnet website, including running a node, creating a smart contract, trying the CLI wallet, testing transaction signing, and trying mining. As the testnet website expands it is my hope to expand this series as well documenting my experience.
To start, you will need Virtualbox, the Ubuntu Server ISO for the guest OS, and some willingness to work with the command line as we go along.
VirtualBox 6.1.6
.Ubuntu Server 20.04 LTS
.Note: This guide was designed to point you in the correct direction for installing Virtualbox and Ubuntu Server as the guest operating system, however it does not cover every detail of the installation process. For more information on how to install the host software on your device, how to setup and configure a guest operating system, or how to work with Ubuntu Server and the command line, please reference the relevant help articles and materials provided by each entity and their surrounding communities, or reach out to me on the Blockstack Discord - @whoabuddy
https://www.virtualbox.org/wiki/Downloads
The fastest way to get Virtualbox up and running is to download the binary for your operating system under the heading VirtualBox 6.1.6 platform packages. Remember to select the operating system of the computer you are using now, and once you have Virtualbox installed and running, you are ready to move on to the next step.
https://ubuntu.com/download/server
The first step to installing Ubuntu Server is to download the ISO file from the link above, which we will use with Virtualbox to install the operating system.
Save the file in an easy to access area and once the download is complete, start on the steps below.
Note: As of 2020/05/19 the actual (dynamic) size of my Virtualbox VDI file running the Blockstack Testnet is ~18gb.
Yay! The virtual machine officially exists! There are still a few settings we need to update before we can get started.
First, we want to tell Virtualbox the location of our Ubuntu Server ISO file, so that we can install Ubuntu Server.
1. Under Storage on the left-hand menu, select the empty optical (CD/DVD) drive under Controller: IDE
.
2. Click the CD icon and then click Choose Virtual Optical Disk File...
3. Select and Open the Ubuntu Server ISO file downloaded earlier.
Second, we want to set up the network adapter to operate in bridged networking mode. This means the virtual machine will get it's own IP address on the local network and operate like a separate computer plugged into the router, which eliminates any unnecessary network complexity for the Blockstack node.
1. Click Network on the left-hand menu
2. Under the tab for Adapter 1, click the box for Attached to:
3. Select Bridged Adapter
🎉 Congratulations, if you made it this far then you've reached the halfway point! ☕
Now we are ready to start our Virtualbox virtual machine and install Ubuntu Server as the guest operating system.
In the Virtualbox Manager, select the virtual machine by clicking on it, then click Start.
This will open a new window for the virtual machine and it will begin to boot up just like a normal physical computer would. A lot of text will display and scroll by, this is normal as the Ubuntu Server installation loads. When you see the window below, you are ready to continue with the installation.
Note: The installation uses a simplified interface designed to work with the keyboard. For the instructions below, use the Arrow Keys and Enter Key to make selections. The default settings should work for most configurations.
1. Select your preferred language and press Enter.
Note: If there is an update to the installer available it will show on the next screen, and you can choose to Update to the new installer or Continue without updating, both of which will take you to the next screen.
2. Select the keyboard configuration, then select Done and press Enter.
3. Select the network connections, then select Done and press Enter.
4. Enter a proxy address, if required to connect to the Internet, then select Done and press Enter.
5. Configure Ubuntu archive mirror, then select Done and press Enter.
6. Setup the guided storage configuration, then select Done and press Enter.
Note: The default settings should automatically use the Virtualbox hard disk file created earlier, so in this case, it is 100gb and we leave the default settings for #6 and #7, which automatically creates the partitions necessary to boot Ubuntu Server. No modification necessary!
7. Setup the storage configuration, then select Done and press Enter.
8. Confirm the changes based on the settings above, then select Continue and press Enter.
9. Complete the profile setup, then select Done and press Enter.
10. Skip Install OpenSSH server
For simplicity we can leave this one alone, but if you are interested in accessing your machine via SSH, you will need to configure this step.
Leave the box unchecked, then select Done and press Enter.
11. Skip the Featured Server Snaps
Again, for simplicity we can leave all of these out.
Leave the boxes unchecked, then select Done and press Enter.
12. View the log while Ubuntu Server installs
Ubuntu will start installing based on the configuration settings above, including downloading and installing security updates, and when done will display Installation complete! in the top of the window.
Note: On my device if I select Reboot and press Enter, I receive a message that the installation cd-rom could not be ejected. To simplify this part of the process, I close the virtual machine by clicking the X on the window and selecting Power off this machine. I then start the machine again, which boots the new Ubuntu installation and should arrive at a login prompt.
Now that we have our virtual machine setup, we can log in using the profile information setup earlier. You will have to type the username (in this case: whoabuddy
) followed by the password. Note: the password field does not show any characters as you type!
Once logged in, you will be greeted with some system information, statistics, and a command prompt to run your commands. This is the default interface for Ubuntu Server.
From here, we can follow the instructions from the Blockstack Documentation to Run a Stacks Testnet Node, and I will create a separate post as part of this series to outline the steps taken as part of those instructions, as well as the other tasks outlined on the Testnet website. Stay tuned!!