How to Share Files from Google Cloud Object Storage (GCP)

Google Cloud Storage is the object storage service offered by Google Cloud to store a large amounts of files. In this document, we will discuss how to install NirvaShare and share files/folders from google object storage with external users using a simple form-based authentication. NirvaShare can be installed in any operating system and has advanced features to integrate with external identity providers, but in this tutorial, we shall consider Linux Ubuntu operating system with a simple form-based authentication while sharing files from object storage that uses HTTP without SSL certificate. Subsequently, you can enable SSL using your custom domain name and certificate. For more information check Google Documentation.

VM instance

You will require a new Virtual Machine instance with at least 2GB RAM, 20GB hard space and Ubuntu 20.04 LTS. Let us create one and configure the same.

  • Login to
  • Go to Compute Engine – VM instances
  • Provide required details including hardware specification.
  • For the Boot disk, you need to select operating system as Ubuntu 20.04 LTS
  • Create the VM instance.
  • For more information you can also refer to Google Documentation

Once the VM is created, we need to open couple of ports for NirvaShare, so let us create a new firewall rule.

  • From the main menu, click on VPC Network and select Firewall
  • Provide name and target tags as nirvashare-firewall
  • For Source IP range, enter to let access from all source IP addresses.
  • For Protocols and ports, select Specified protocols and ports
  • Enter ports as 8080, 8081 and create it.

Now, let us open the ports to the newly created VM by changing the firewall policy.

firewall Ports

NirvaShare Installation

SSH to the newly created VM instance using your private ssh key or the simplest way is to use the option to open with browser.

  • From the VM instance SSH , select Open in browser window
  • Once you log in to SSH console, run below commands to start the installation as root user. This will download the script and install NirvaShare.
sudo su root
curl -s -o && bash && rm

Above command will prompt you to enter database password, once provided, it will proceed and complete the installation within a minute or two.

Verifying Installation

After installation is completed, wait for 3-4 minutes for server to come up as it takes time to create schema, etc.

Access the url as http://(your IP):8080

This should open up login screen as shown below.

Authentication Keys

To configure further, you will require an Authentication Key obtained from GCP . Object Storage. To generate new keys, please follow below steps.

  • Open IAM service or go to URL
  • From the left menu, click on Service Accounts, this will list existing service accounts if any.
  • Click on Create New Service Account¬†
  • Provide necessary detail like name, id, etc and click on Create and continue
create Service Account
  • Click the Select a role field.
  • Under Quick access, click Basic, then click Owner.
  • Click Continue.
  • Click Done to finish creating the service account.

  • From the Service Account list, select the one that we created.
  • On the top, click on Keys tab
  • Let us create a new key, from the ADD KEY menu, click on Create New Key
new key
  • For Key Type, select JSON and click on CREATE
  • This will download a json file, keep this file safely.
  • This JSON content is needed while configuring storage in NirvaShare.
  • During NirvaShare configuration which will be discussed in next secton, copy paste the content of this JSON file for the storage details.


Next step is to configure and share a file/folder to external user using a Form-based authentication. Please follow setup guide.

Make sure you have the JSON Key content handy while configuring storage in NirvaShare.

Leave a Comment

Your email address will not be published.