Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Instructions on Setting up Google Cloud

The following deploys an Ubuntu 16.04 LTS f1.micro Google Cloud Compute Engine VM. It automatically installs Docker and a bitcoind Docker image. It automatically updates daily, both Ubuntu patches and pulling a new Docker image.

Please note... the default uses the free f1.micro instance. This is a .6 GB RAM system. It's not great. It would be recommended to edit the and use a g1.small, which is a 1.7 GB RAM system.


These instructions assume that you:

  • have a Google Cloud account
  • have the Google Cloud SDK installed and configured.
  • Terraform version 0.10.X or 0.11.X

Google Configuration

These instructions are based loosely on Google's recommended instructions.

Albeit, slightly different... Assuming you have gcloud setup properly and ready to go:

  • Create the project:
gcloud projects create bitcoin-node
gcloud projects list
  • Set it to the default (useful for future commands):
gcloud config set project bitcoin-node-<NUMBER>
gcloud alpha billing accounts list
  • Now, we can enable billing for that project:
gcloud beta billing projects link bitcoin-node-<NUMBER> --billing-account <BILLING-ACCOUNT-NUMBER>
gcloud iam service-accounts create bitcoin-node-terraformm --display-name "Bitcoin-node Terraform account"
gcloud iam service-accounts keys create ~/.config/bitcoin-node-terraform.json --iam-account bitcoin-node-terraform@bitcoin-node-<NUMBER>
gcloud projects add-iam-policy-binding bitcoin-node-<NUMBER> --member serviceAccount:bitcoin-node-terraform@bitcoin-node-<NUMBER> --role roles/viewer
  • Enable the Compute API -
gcloud services enable
  • (Skipping over the remote storage for Terraform for now; will add later).
  • Configure environment variables:
export GOOGLE_CREDENTIALS=$(cat ~/.config/bitcoin-node-terraform.json)
export GOOGLE_PROJECT=bitcoin-node-<NUMBER>
  • And that should be it! Now to Terraform...
terraform init
terraform plan
terraform apply

Note the above will ask you for your project ID (the bitcoin-node-<NUMBER>). You can add a default value in the file to remove this prompt. Once deployed, you'll have a full node syncing up with the Bitcoin network. Head to the Google Cloud Compute page to monitor the newly created bitcoin-node instance.

To SSH to your instance, you can use the gcloud interface:

gcloud compute --project "bitcoin-node-<NUMBER>" ssh --zone "us-west1-a" "bitcoin-node"


You can’t perform that action at this time.