I will divided this in two parts, first, in this post we will see how to get a FREE VPS from the Google Cloud Platform, which anyone can do, and it is enough to host an IPFS server. Later, on another post, we will see how to easily spin the IPFS server and pin your own content!
And the best part is that Google Cloud Platform has many services that are FREE FOREVER.
When you Sign Up you do get a few hundred dollars to test a few more advanced products, such as hosting a more powerful VPS, however, there will always be a free tier, for you to always have a backup if for some reason you eventually can not afford it.
Why pin your own content
On the blockchain, specially on Hive, where much on the content is hosted on IPFS, your content delivery depends on people willing to host it, usually for free, or even at a loss! And if they suddenly decide to stop hosting/seeding your content, it gets taken down!
I have lost many videos before
I used to upload very often to @dtube but I happened to not be able to renew my server on another host I prefer not to mention, but it was expensive, and since no one other than me was hosted, it was deleted. You can still see the "corpses" of the dead videos that no one is hosting anymore:
I do not blame @dtube in any ways whatsoever! If anything, I thank them for having hosted my content for a while with no cost for me! It was my duty to keep seeding my own content, and I have failed. So I am teaching everyone now how to do it for free, and avoid losing your own content!
Your VM Instances
First, get your free sever from this link:
With this alone you are already ellegible to use all the free tier products, which I am covering in this post, but you might be eligible to get up to $350 of trial credits for paid and more high end services!
Once in this link you will be requested to login/sign up, follow the regular procedures to open your account, all instructions will be on screen.
When you are done, you should be on your Google Cloud Platform Console. From there, you can navigate everywhere by using the menu on the top left corner of the screen.
From the menu you open the sub-menu "Compute Engine", and from there you open the link to "VM Instances", remember this because this is the core of how to access your instance once it is up and running:
Creating a VM Instance
You will probably not have any instance running. I do have one, but either way, to create an instance, on the Compute Engine/VM Instances page, you click on "Create Instance":
You might be overwhelmed by the configurations, but do not. It is simple, here are the fields you need to pay attention to:
Name: Choose something meaning, mine I call just "IPFS" because it is it's only purpose, to serve my IPFS content
Region/Zone: I recommend to set the region to "us-central1 (Iowa)" and the zone to "us-central1-a" so that you can take advantage of the free tier.
Machine configuration: To be eligible for the free tier you must choose
- Machine family: Generar-purpose
- Series: N1
- Machine type: f1-micro (1vCPU, 614MB memory)
And don't forget to select an operating system you are comfortable with!
On "Boot disk" click on "Change":
And select the image you want. I highly recommend Ubuntu 20.04 LTS because it is very common, and if you have questions I can help with. However, the default Debian 10 image is not bad, and behaves similarly to Ubuntu, because Ubuntu is based on top of Debian!
After you select the image, click on "Select" on the very bottom of this page to apply the change.
That is all the configuration you need to worry about. Run all the way down and click the "create" button!
Is it really free?
Well, yes, the f1-micro instance is FREE FOR 750 HOURS A MONTH, if you use more than that you have to pay the excess, but only the excess, that is, only what you have used over the free 750 hours for this specific instance configuration.
It does not sound like much, but if you do the math, 750 hours converts into using one instance for 24h a day during 31 full days, and you will still have 6 hours left at end of a 31 days month!
I don't know any month that has over 31 days, so yeah, you won't pay anything by running only that one instance all day long every day. You would, however, pay if you were to run 2 instances simultaneously, because then the 750 free hours would be consumed twice as fast!
So, make sure to spin only one, or be aware that there are some costs for running a second one (which still sums to under $5 dollars a month if you spend all the 31 free days for the first machine).
Access the machine
Above, I have shown how to use the menu to navigate, so again, on the menu go to the "Compute Engine" submenu and choose the "VM Instances" to see your instance.
Notice that it may take a few minutes for it to be set up.
If it is up and running, click on the name of your instance to open it. You will be directed to the page with the details of your instance.
Right at the top you can see the "Remote Access" option, by default you connect by SSH, but to make it easy and simple, click on the arrow pointing down and select the "Open in browser window" option:
It is supposed to open a pop-up, but SOME BROWSER BLOCK POP-UPS, so if nothing happens, make sure your browser is not blocking the new page from being opened.
Once the new window/pop-up opens you will be asked "Do you want to initiate an SSH connection to VM instance ?" (with the name of the instance), which of course we do, so we select "Connect".
It may take a while for the whole process to happen, but once it finishes you will see the terminal from where you are, in fact, using the remote machine from your browser:
You can already play with your free virtual machine, but do follow me to get to know when I post the tutorials showing how to specificallyset up your IPFS node and how to pin your own content, from either @dtube and @threespeak
Don't forget to claim your free tier Google Cloud services, and to see if you are eligible for the $350 bonus to spend on paid services: