Exploring IOTA #1 - getting a linux terminal on google cloud and sending a transaction

This article should give you, regardless of your tools and hardware, access to the first hand made transaction of the IOTA protocol…

When i bought my first two bitcoin back in 2014 it felt like i got ripped off.
Immediately after the money was send from my bank account to the sellers bank account i thought i will never see those 400€ again. 
Anyway i somehow forgot about this position and just realized around the mid 2017, when the hype were omnipresent, about this nice little increase of this coin.

I never owned a wallet, i never mined any crypto and always held those two bitcoin on the exchange and luckily they were all still sitting there nicely increased in price.

This is when i started realizing that the place has drastically changed and a lot of new cryptos, coins etc emerged — after some research i found the IOTA project the most interesting of those which crossed my eyes.

I like to explore IOTA and i guess i need to start looking at the code and try it myself to really grasp the implications and possibilities.
This post (maybe series) is not intended to cover the deep background but i use this to document my baby steps.

You probably could use a MAC terminal but as i am on a windows machine i thought i might try to get a linux cloud instance — by surprise that comes even for free.

I think it has been 12 years ago since i first installed a redhat linux distribution on a spare thrown away computer and since than a lot has changed. Back than you needed to partition your hard-drive in order to have a dual boot to be able to have both operating systems available. Now it seems everything is in the cloud so i try cloud.google.com

Getting your cloud computer

You need to have a google account setup and to start your free trial. Don’t worry for our needs we won’t even need to touch the 300$ allowance which you can spend for the next 12 month.

Fill in the details below and submit

cloud.google.com account confirmation (1/2)

Next you need to select the account type, you can use the individual one. Fill in your details and — yes — you need to fill credit card details. You might ask why the hack do i need to add my credit card details for a free trial? The answer is too easy: If you choose to create big heavy virtual machines or use any other expensive cloud product they charge you every month… no worries not with our little cloud linux instance — its for free even after your trial period.

cloud.google.com account confirmation (2/2)
cloud.google.com confirmation screen

Congratulation to you new cloud platform account

All we do next is to set up a virtual mashine — which is nothing else than a computer with a certain hardware architecture on a server inside google cloud farms. We are going to access this machine by using our webbrowser (ideally chrome) which gives you the terminal access and that is all we need for the first step — at least this ticks one box which is required in the tutorial.

So lets do it in baby steps again.

Setting up the cloud instance

As said we stay on the free architecture — For my first try i didn’t know that there are free ones so i set up a quite potent machine and ended up paying for basically idl work 1$ for one day — than i deleted it and found out about this:


If you choose the f1micro to be placed in the us except Northern Verginia we are fine for now. If you excedentily created a beast of a machine you still have the 300$ to spend…

Create your first project

You can create a new project where we can start and configure our micro instance

It says that you need to spend approx. 5USD but if you dig further you see this here:

so we configure this:

choose the micro (1 shared).. service and as the region somthing in the US except Northern Virgina….

Get yourself a coffee or a drink it takes some seconds and here you go.. you are entering a web based bash/shell by clicking on SSH…

Now the fun starts. If you are familiar with the commands just start hacking but if not google is really the answer…

lets try to follow the installation from the very first and lonely tutorial in iota.docs.

So we need node.js 8+..

You can do a lot of things wrong here allready and i did it myself by not installing the right repo of node.js — make sure it is 8+ otherwise you run into many compiling errors not really helping.

Ok first update the whole mashine

sudo apt-get update

Anyway that was only for the show — apperently we need to load the 8+ repository via a comand curl to our virtual mashine.

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -

as mentioned there now we can install via the following command the repository.

sudo apt-get install -y nodejs

Next on the list is the npm manager

To varify that npm is installed just use

npm -v

ok should be good.

Too easy its we have vim installed its from now our favourite bash based editor

sudo vim test.txt

don’t forget to press TAB and i to insert text and than ESC and + : + q + ! you will love this editor :-)

Ok now we almost there — i think its ok to get both in one time answered. we needed the terminal before and internet too so… done

From here it should be a little dance — following the tutorial on the official iota docs site.

And if you have mastered the tricks and traps of vim than you will be seeing this

So further following the IOTA you will be ending up having made your first transaction on the tangle.

Troubleshooting (edit 24.06.2018): If you are having trouble sending an transaction (basically only receive the node info) please just try to disable using the PoW (Proof of Work) box (powbox) for outsourcing this computational task. Our node server in this example has the possibility to do the proof of work for you when calling the API (not every node has this enabled though)

//const remoteCurl = require("@iota/curl-remote")
//remoteCurl(iota, "https://powbox.testnet.iota.org", 500)

The second information i would like to add is that the server has been renamed from testnet to devnet. Which means tesnet is depricated and devnet is the new correct naming

So you change as well the server name to

const iota = new IOTA({ provider: "https://nodes.devnet.iota.org:443" })

Because we are on the tesnet (devnet) you can admire your work in the world wide web here by searching for the bundle, hash, transaction…


As of writing the testnet health is exceptional but when i tried it first two month ago it was not that easy — hope you enjoyed this tutorial and looking fwd. to your comment and of course of more exploration of IOTA and its possibilities.

Cheers, Jan

Next Article: Exploring IOTA #2, retrieve your transaction and create your ‘wallet

Edited (24.06.2018): Troubleshoot when the sendTransaction does not work as the remote PoW wasn’t successful