River4 On Google Cloud Platform

My spelunking among the public clouds has lead me to the Google Cloud Platform, where I spied with my little eye the Node.js instance and it's $4.49 estimated monthly cost. The cost is not free, but I think it might be the lowest monthly cost for hosting River4 on a cloud server. Probably the only lower costs are either the "free" node on Heroku, with all its constraints, or the one time purchase of a server at CloudAtCost.

I launched the Node.js instance on GCP and found that it is Debian with node.js pre-installed. To install River4, one can skip the Install node.js portion of the Installing River4 on Ubuntu instructions and start with Install forever, then Install git and finally Install river4, before moving on to the River4 howto, starting at step 4.

  • I am aware that there are also images on Azure, and I am sure on AWS too, that already have Node.js installed as well as Docker. Consequently, the value here isn't so much that Google Cloud Platform has a pre-built Node.js image, but rather that the price to use it is lower than with Azure and AWS.

You will need to open port 1337 in order to access the River4 site, it appears that something (perhaps node.js itself) is using port 80. I haven't done much research into disabling whatever is using port 80. In the Google Developers Console, click Networking, Firewall rules. Click New firewall rule, and enter the fields as follows:

  • Name: allow-1337

  • Description: Allow port 1337 traffic to access the River4 home page (this is optional, you could leave it blank)

  • Network: default

  • Source filter: Allow from any source (0.0.0.0/0)

  • Allowed protocols and ports: tcp:1337

Then click Create.

To find the public IP address for your site, on the Google Developers Console click Compute, Compute Engine, VM instances. You will see your instance name listed below a graph showing CPU utilization, and to the right is the External IP address. To access the River4 Home page enter http://[External IP address]:1337 in the address bar of your web browser.

The Google Developers Console provides a button for SSH access to your instance, which opens an SSH session in a browser window.

The GCP Node.js instance is based on the Google Compute Engine f-1 micro instance that can cost as little as $0.0056 per hour per month if you run the instance for a full month. Again, for comparison, the AWS t2.micro instance costs $0.013 per hour, so you can see the compute part of the cost is much lower. I expect there will be additional I/O charges add to the $4.49 estimated monthly price.


Last built: Tue, Mar 1, 2016 at 3:44 PM

By Frank McPherson, Friday, August 28, 2015 at 1:38 PM. You should never argue with a crazy man.