How to host an IPFS node for free with Google Cloud Platform

in GEMS5 months ago

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.

Link:
https://gcpsignup.page.link/aVJ9

Free Tier Google

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 am using @threespeak a lot lately, and to avoid losing what I have uploaded, I am seeding my own content by running my own IPFS node on multiple hosting services, but today let us focus on google.

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:

dtube.cleaned.jpg

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:
https://gcpsignup.page.link/aVJ9

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:

guide.cleaned.jpg

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":
createinstance.cleaned.jpg

You might be overwhelmed by the configurations, but do not. It is simple, here are the fields you need to pay attention to:

configs.cleaned.jpg

  • 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":
change.cleaned.jpg

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!
ubuntu.cleaned.jpg

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:

instanceid.cleaned.jpg

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:
machine.cleaned.jpg

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:
https://gcpsignup.page.link/aVJ9

Oh, and of course, on this post, as a thank you for their service, I am letting @dtube @threespeak and @ecency as beneficiaries, so they get 1% each.

beneficiaries.cleaned.jpg

Sort:  

Yay! 🤗
Your content has been boosted with Ecency Points, by @igormuba.
Use Ecency daily to boost your growth on platform!

Support Ecency
Vote for Proposal
Delegate HP and earn more

Wow. Nice self explanatory, easy to follow article. I will try it out right now thanks for sharing.

Im saving the post for later, looks interesting

Thank you for your interesting sharing

So it has a 10GB cap? Not bad. Trying to do it once should be a good learning experience, at the very least. I'll do it myself.

From my experience it is enough for almost 100 dtube videos, as each is almost 100mb apparently. I think there is a free option that can be extended to 30gb, will search and post about it

Google is not free it is a sharlatans- use trade-free services at https://directory.trade-free.org

First of all, thank you for showing me this website. I will try to use the tools they recommend, free software is great! And by free, I mean not just price, but freedom and liberty.

Second, I saw only software after a quick look at the link you gave me, does not seem to have listed any VPS hosting service, as the goal of the post is how to spin up a VPS without spending money.

Yes, google is not "free", they do collect our data, but what I meant by free is that there are hosting tiers for VPS servers that you do not have to pay money to use. You can spin up a VPS server and make it work for you without spending money if you use the free (no need to pay money) tier, and I am showing how to claim the VPS without paying for, in my case, host IPFS content.

it is trade-free directory so we don't know any trade-free vps. you can submit if you find one. I know https://www.oracle.com but is not trade-free as well.

And shitgoogle started to sell you a free product :)))) LOL
Screenshot_20210725-151251.jpg

Nice ;))

That 10G cap isn't bad though. The free and self learning could make it easy to peruse.