Get started with LocalCloud
This tutorial installs the LocalCloud CLI, starts a persistent local runtime, configures this shell, and verifies a Cloud Storage request. LocalCloud runs local versions of Google Cloud services for development and testing. Before you deploy to production, run final validation against real Google Cloud.
Prerequisites
- Docker Desktop, Colima, or Docker Engine is installed and running.
- A supported native CLI host: macOS 13+ or Linux with glibc 2.35+, on ARM64 or AMD64.
curl,tar,sed,sort, and eithersha256sumorshasum.
The CLI is a standalone executable and does not require Python. Windows users should use the manual Docker fallback.
Install the CLI
curl -fsSL https://local.cloud/install.sh | sh brew install LocalGCloud/tap/localcloud The install script downloads the appropriate macOS or Linux release, verifies its SHA-256 checksum, validates the exact archive members, and runs the executable to confirm its semantic version. Release automation separately publishes Sigstore bundles, but install.sh does not verify those bundles.
In an interactive terminal, the installer can offer to run diagnostics and start LocalCloud after you confirm. In automation or with --no-start, it prints absolute-path next steps instead. If it adds the CLI to your shell startup file, run the exact source command printed by the installer before continuing.
Start your first runtime
Check Docker
localcloud doctorA usable Docker installation exits successfully and reports status: ok. doctor diagnoses Docker; it does not install or start Docker Desktop, Colima, or Docker Engine. Add --verbose when you need the complete JSON payload.
Start LocalCloud
localcloud start --local-onlyA successful command reports started, already_running, restarted, or
reconfigured.
The runtime starts with the built-in defaults.
Runtime selection explains which data volume, and so which runtime, a command uses.
The example selects --local-only, which binds published ports to 127.0.0.1. Without that flag, the current CLI publishes ports on all host interfaces. Use it again on subsequent start, restart, and reset commands to retain loopback binding. If a default port is already in use,
the CLI can remap host ports. Use --verbose to inspect the complete
runtime payload, including immutable container ID, ownership, image identity,
mount details, and sdk_env.
Configure this shell
eval "$(localcloud env)"localcloud env discovers the compatible running container using the selected data volume and prints local-only SDK settings with its actual mapped ports. It rejects environment values that would route supported services to real Google endpoints or non-loopback HTTP endpoints.
Open the console
localcloud consoleThe CLI opens the console for the selected runtime, project, and caller. Trust the returned url; do not replace it with a hard-coded port.
Make your first API call
Install the Python Cloud Storage client if needed, then run this repeatable example in the same shell where you evaluated localcloud env:
python -m pip install google-cloud-storage
from google.api_core.exceptions import NotFound
from google.cloud import storage
client = storage.Client(project="local-gcp-project")
bucket = client.bucket("localcloud-quickstart")
try:
bucket.reload()
except NotFound:
bucket.create()
blob = bucket.blob("hello.txt")
blob.upload_from_string("Hello, LocalCloud!")
print(blob.download_as_text())
The example safely reuses the same local bucket and overwrites the same object, so it can run repeatedly with the default persistent volume. The expected output is:
Hello, LocalCloud!
If the SDK tries to contact Google Cloud, stop instead of adding real credentials. Re-run eval "$(localcloud env)" in the shell or process that launches the application.
Verify and manage the runtime
localcloud status --verbose
localcloud logs --tail 50
Stop, reset, and uninstall explains what localcloud stop, localcloud reset and the installer’s --uninstall keep and remove.
Manual Docker path
Use this fallback on unsupported CLI hosts or when you deliberately do not want the host CLI. The latest tag is mutable, so prefer the CLI for normal use and pin an image digest when repeatability matters.
docker volume create localcloud-data
docker run -d --name localcloud \
-p 127.0.0.1:5380-5405:5380-5405 \
-m 4g \
-v localcloud-data:/var/lib/localcloud \
agentcloud/localcloud:latest
Verify the runtime and configure the shell through root operator endpoints:
curl -fsS http://localhost:5380/readiness
eval "$(curl -fsS 'http://localhost:5380/env?format=shell')"
The default command does not mount /var/run/docker.sock and does not expose ports on every host interface. Docker-backed service execution and custom companion images can require Docker-socket access; transparent DNS/HTTPS routing is also opt-in. Configure those capabilities only after reviewing their security implications.
Next steps
Select services, projects, persistence, and optional networking behavior.
Configure supported client libraries using local endpoint values.
Browse all 27 available service guides and their documented limitations.
Check which operations each service supports before you rely on them.
Pre-populate supported services with deterministic test data.
Choose endpoint-only or transparent-network Terraform setup.
This comment is sent to PostHog. Do not include secrets, personal data, or customer data. See Privacy.