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.
Browse major Google Cloud services by category.
Copy-paste examples for Python, Node.js, Go, and Java.
Environment variables, ports, and settings.
Use your existing .tf files with LocalCloud.
How LocalCloud emulates GCP services internally.
Prerequisites
- Docker — Install 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:8080The 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 applySee 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! const {Storage} = require('@google-cloud/storage');
const storage = new Storage();
async function main() {
// Create a bucket
await storage.createBucket('my-first-bucket');
// Upload a file
const bucket = storage.bucket('my-first-bucket');
await bucket.file('hello.txt').save('Hello, LocalCloud!');
// Read it back
const [content] = await bucket.file('hello.txt').download();
console.log(content.toString());
// Output: Hello, LocalCloud!
}
main(); package main
import (
"context"
"fmt"
"io"
"cloud.google.com/go/storage"
)
func main() {
ctx := context.Background()
client, _ := storage.NewClient(ctx)
// Create a bucket
client.Bucket("my-first-bucket").Create(ctx, "local-project", nil)
// Upload a file
w := client.Bucket("my-first-bucket").Object("hello.txt").NewWriter(ctx)
fmt.Fprint(w, "Hello, LocalCloud!")
w.Close()
// Read it back
r, _ := client.Bucket("my-first-bucket").Object("hello.txt").NewReader(ctx)
data, _ := io.ReadAll(r)
fmt.Println(string(data))
// 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
See how LocalCloud groups major Google Cloud categories.
Pre-populate services with test data.
Browse data and run queries from your browser.
See how the DuckDB-based BigQuery emulator works.
Provision resources locally with your existing .tf files.