Getting Started Introduction

Getting Started

Get LocalCloud up and running in less than 1 minute. By the end of this guide, you’ll have the major Google Cloud services your team reaches for first running locally.

No cloud access. No credentials. No cloud costs.

Prerequisites

  • DockerInstall Docker (20.10+)
  • Homebrew install on macOS — if you use Homebrew, Docker Desktop is available as:
brew install --cask docker-desktop
  • 4GB RAM available for the container

Quick Start

Pull the image

docker pull jaysen2apache/localcloud

Start LocalCloud

mkdir -p ~/.localcloud/data

docker run -d \
  -p 8080:8080 -p 4443:4443 -p 8085-8087:8085-8087 \
  -p 9010:9010 -p 9020:9020 \
  -p 9050:9050 -p 9060:9060 \
  -p 6379:6379 \
  -m 4g --name localcloud \
  -v ~/.localcloud/data:/var/lib/localcloud \
  jaysen2apache/localcloud

Open the console

open http://localhost:8080

The console is built into the running container, so you can inspect service status, browse data, and confirm the runtime is healthy before you debug your app.

Configure your SDK

Set environment variables for all services so your GCP SDKs connect to LocalCloud:

eval "$(curl -s http://localhost:8080/_localcloud/env?format=shell)"

This sets variables for all provided services like STORAGE_EMULATOR_HOST, PUBSUB_EMULATOR_HOST, etc. To set up only a specific service, refer to the user guide on the console.

Using Terraform? Point the Google provider at LocalCloud instead:

eval $(curl -s 'http://localhost:8080/_localcloud/env?format=terraform')
terraform init && terraform apply

See the Terraform Integration guide for details.

Make Your First API Call

from google.cloud import storage

client = storage.Client()

# Create a bucket
bucket = client.create_bucket("my-first-bucket")

# Upload a file
blob = bucket.blob("hello.txt")
blob.upload_from_string("Hello, LocalCloud!")

# Read it back
print(blob.download_as_text())
# Output: Hello, LocalCloud!

Verify Services Are Running

curl http://localhost:8080/_localcloud/health | jq

Or visit the web console at http://localhost:8080.

Next Steps