Light, fluffy, and always free - GCP Local Emulator
10K+
Light, fluffy, and always free โ GCP Local Emulator
No account. No auth token. No feature gates. Just docker run.
๐ Websiteโ ยท ๐ Docsโ ยท ๐ GitHubโ
floci-gcp is a free, open-source local emulator for Google Cloud Platform services, built for development, testing, and CI. Point your existing GCP SDK, gcloud CLI, Terraform, or test suite at http://localhost:4588 and keep your workflows intact โ no cloud account, no service account key, no paid feature gates.
All GCP services (gRPC and REST) share a single port (4588) via HTTP/2 ALPN negotiation, so there's no per-service daemon setup or port juggling.
docker run -d --name floci-gcp \
-p 4588:4588 \
floci/floci-gcp:latest
services:
floci-gcp:
image: floci/floci-gcp:latest
ports:
- "4588:4588"
volumes:
- ./data:/app/data
environment:
FLOCI_GCP_HOSTNAME: floci-gcp
FLOCI_GCP_BASE_URL: http://floci-gcp:4588
docker compose up -d
export PUBSUB_EMULATOR_HOST=localhost:4588
export FIRESTORE_EMULATOR_HOST=localhost:4588
export DATASTORE_EMULATOR_HOST=localhost:4588
export STORAGE_EMULATOR_HOST=http://localhost:4588
export SECRET_MANAGER_EMULATOR_HOST=localhost:4588
export GOOGLE_CLOUD_PROJECT=floci-local
Credentials are not validated. Everything just works.
| Service | Protocol | Highlights |
|---|---|---|
| Cloud Storage | REST XML + REST JSON | Buckets, objects, multipart upload, compose, ACLs, IAM, versioning, lifecycle, CORS, V4 signed URLs |
| Pub/Sub | gRPC | Topics, subscriptions, publish, pull, streaming pull, push delivery, snapshots, seek |
| Firestore | gRPC | Documents, collections, queries (all operators), transforms, COUNT, transactions, real-time listeners |
| Datastore | HTTP/protobuf | Entities, structured queries, GQL queries, aggregation (COUNT), transactions |
| Secret Manager | gRPC | Secrets, versioning, versions/latest alias, disable/enable/destroy, IAM bindings |
| IAM | REST JSON | Service accounts, RSA-2048 key pairs, policy bindings, SignBlob (V4 signed URLs) |
| Managed Kafka | REST JSON | Clusters, topics, consumer groups; Redpanda-backed or mock mode |
| Channel | Tag | Use case |
|---|---|---|
| Release, floating | latest | Stable releases (recommended) |
| Release, pinned | x.y.z | Reproducible builds |
| Nightly, floating | nightly | Track main branch |
| Nightly, dated | nightly-mmddyyyy | Pin to a specific nightly |
# Recommended for most users
image: floci/floci-gcp:latest
# Pinned release
image: floci/floci-gcp:1.0.0
# Bleeding edge
image: floci/floci-gcp:nightly
Configure with FLOCI_GCP_STORAGE_MODE:
| Mode | Behavior | Best for | Durability |
|---|---|---|---|
memory | (Default) Entirely in-RAM. Lost on restart. | CI pipelines, speed | โ None |
persistent | Every write goes to disk synchronously. | Durable local development | โ Good |
hybrid | In-memory with async flush every 5 seconds. | Balance of speed and safety | โ Good |
wal | Write-Ahead Log; every mutation persisted. | Maximum durability | ๐ Highest |
Mount a volume to /app/data (or set FLOCI_GCP_STORAGE_PERSISTENT_PATH) to retain data across container restarts.
All settings use the FLOCI_GCP_ prefix.
| Variable | Default | Description |
|---|---|---|
FLOCI_GCP_PORT | 4588 | Port for all services |
FLOCI_GCP_DEFAULT_PROJECT_ID | floci-local | Default GCP project ID |
FLOCI_GCP_BASE_URL | http://localhost:4588 | Base URL returned in service responses |
FLOCI_GCP_HOSTNAME | (unset) | Hostname for returned URLs (use in Docker Compose) |
FLOCI_GCP_STORAGE_MODE | memory | memory ยท persistent ยท hybrid ยท wal |
FLOCI_GCP_STORAGE_PERSISTENT_PATH | ./data | Directory for persisted state |
FLOCI_GCP_SERVICES_GCS_ENABLED | true | Enable/disable Cloud Storage |
FLOCI_GCP_SERVICES_PUBSUB_ENABLED | true | Enable/disable Pub/Sub |
FLOCI_GCP_SERVICES_FIRESTORE_ENABLED | true | Enable/disable Firestore |
FLOCI_GCP_SERVICES_DATASTORE_ENABLED | true | Enable/disable Datastore |
FLOCI_GCP_SERVICES_IAM_ENABLED | true | Enable/disable IAM |
FLOCI_GCP_SERVICES_SECRETMANAGER_ENABLED | true | Enable/disable Secret Manager |
FLOCI_GCP_SERVICES_KAFKA_ENABLED | true | Enable/disable Managed Kafka |
FLOCI_GCP_SERVICES_KAFKA_MOCK | false | Kafka mock mode (no Docker; returns ACTIVE immediately) |
When your application runs in another container, set FLOCI_GCP_HOSTNAME so URLs returned by the emulator resolve correctly between containers:
services:
floci-gcp:
image: floci/floci-gcp:latest
ports:
- "4588:4588"
environment:
FLOCI_GCP_HOSTNAME: floci-gcp
FLOCI_GCP_BASE_URL: http://floci-gcp:4588
my-app:
image: my-app:latest
environment:
PUBSUB_EMULATOR_HOST: floci-gcp:4588
FIRESTORE_EMULATOR_HOST: floci-gcp:4588
STORAGE_EMULATOR_HOST: http://floci-gcp:4588
SECRET_MANAGER_EMULATOR_HOST: floci-gcp:4588
depends_on:
- floci-gcp
The emulator exposes a health endpoint at /_floci/health on port 4588, suitable for Docker HEALTHCHECK directives, Kubernetes probes, and Testcontainers wait strategies.
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4588/_floci/health"]
interval: 10s
timeout: 3s
retries: 5
floci-gcp uses the GCP project ID as a multi-tenancy boundary โ resources in project-a are invisible to project-b. The project ID is resolved from:
projects/{project}/...x-goog-request-params headerFLOCI_GCP_DEFAULT_PROJECT_ID (default: floci-local)GCP's official emulators are fragmented โ each service ships its own binary, runs on a different port, and requires separate setup. floci-gcp unifies them.
| Capability | floci-gcp | GCP official emulators |
|---|---|---|
| Single port for all services | โ | โ |
| gRPC + REST on the same port | โ | โ |
| No GCP account required | โ | โ |
| Pub/Sub | โ | โ |
| Firestore | โ | โ |
| Datastore | โ | โ |
| Cloud Storage (GCS) | โ | โ ๏ธ Limited |
| Secret Manager | โ | โ |
| IAM | โ | โ |
| Managed Kafka | โ | โ |
| Native binary | โ | โ |
Released under the MIT Licenseโ . Use it however you want.
Content type
Image
Digest
sha256:2ecfa088cโฆ
Size
179.6 MB
Last updated
about 5 hours ago
docker pull floci/floci-gcp:nightly-07222026-compatPulls:
3,602
Last week