{"id":13481119,"url":"https://github.com/fsouza/fake-gcs-server","last_synced_at":"2026-02-04T09:25:04.729Z","repository":{"id":37583149,"uuid":"91218588","full_name":"fsouza/fake-gcs-server","owner":"fsouza","description":"Google Cloud Storage emulator \u0026 testing library.","archived":false,"fork":false,"pushed_at":"2025-05-08T18:01:08.000Z","size":3781,"stargazers_count":1159,"open_issues_count":98,"forks_count":227,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-05-09T00:54:36.871Z","etag":null,"topics":["emulator","gcp","gcs","google-cloud-storage","hacktoberfest","storage"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/fsouza/fake-gcs-server/fakestorage?tab=doc","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fsouza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-05-14T03:55:17.000Z","updated_at":"2025-05-05T15:24:41.000Z","dependencies_parsed_at":"2023-10-28T02:29:14.569Z","dependency_job_id":"bcdcda65-9898-4a88-91c7-891222978507","html_url":"https://github.com/fsouza/fake-gcs-server","commit_stats":{"total_commits":1369,"total_committers":82,"mean_commits":"16.695121951219512","dds":0.5558802045288531,"last_synced_commit":"9e03cb8df10a784aacfb7305ac9a71892c53a9ce"},"previous_names":[],"tags_count":143,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsouza%2Ffake-gcs-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsouza%2Ffake-gcs-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsouza%2Ffake-gcs-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsouza%2Ffake-gcs-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fsouza","download_url":"https://codeload.github.com/fsouza/fake-gcs-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254448578,"owners_count":22072764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emulator","gcp","gcs","google-cloud-storage","hacktoberfest","storage"],"created_at":"2024-07-31T17:00:48.862Z","updated_at":"2026-02-04T09:25:04.656Z","avatar_url":"https://github.com/fsouza.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# fake-gcs-server\n\n[![Build Status](https://github.com/fsouza/fake-gcs-server/workflows/Build/badge.svg)](https://github.com/fsouza/fake-gcs-server/actions?query=branch:main+workflow:Build)\n[![GoDoc](https://img.shields.io/badge/api-Godoc-blue.svg?style=flat-square)](https://pkg.go.dev/github.com/fsouza/fake-gcs-server/fakestorage?tab=doc)\n\nfake-gcs-server provides an emulator for Google Cloud Storage API. It can be\nused as a library in Go projects and/or as a standalone binary/Docker image.\n\nThe library is available inside the package\n[`github.com/fsouza/fake-gcs-server/fakestorage`](https://pkg.go.dev/github.com/fsouza/fake-gcs-server/fakestorage?tab=doc)\nand can be used from within test suites in Go package. The emulator is\navailable as a binary that can be built manually, downloaded from the [releases\npage](https://github.com/fsouza/fake-gcs-server/releases) or pulled from Docker\nHub ([`docker pull\nfsouza/fake-gcs-server`](https://hub.docker.com/r/fsouza/fake-gcs-server)).\n\n## Using the emulator in Docker\n\nYou can stub/mock Google Cloud Storage as a standalone server (like the datastore/pubsub emulators)\nwhich is ideal for integration tests and/or tests in other languages you may want to run the\n`fake-gcs-server` inside a Docker container:\n\n```shell\ndocker run -d --name fake-gcs-server -p 4443:4443 fsouza/fake-gcs-server\n```\n\n### Preload data\n\nIn case you want to preload some data in `fake-gcs-server` just mount a\nfolder in the container at `/data`:\n\n```shell\ndocker run -d --name fake-gcs-server -p 4443:4443 -v ${PWD}/examples/data:/data fsouza/fake-gcs-server\n```\n\nWhere the content of `${PWD}/examples/data` is something like:\n\n```\n.\n└── sample-bucket\n    └── some_file.txt\n```\n\nTo make sure everything works as expected you can execute these commands:\n\n```shell\ncurl --insecure https://0.0.0.0:4443/storage/v1/b\n{\"kind\":\"storage#buckets\",\"items\":[{\"kind\":\"storage#bucket\",\"id\":\"sample-bucket\",\"name\":\"sample-bucket\"}],\"prefixes\":null}\n\ncurl --insecure https://0.0.0.0:4443/storage/v1/b/sample-bucket/o\n{\"kind\":\"storage#objects\",\"items\":[{\"kind\":\"storage#object\",\"name\":\"some_file.txt\",\"id\":\"sample-bucket/some_file.txt\",\"bucket\":\"sample-bucket\",\"size\":\"33\"}],\"prefixes\":[]}\n```\n\nThis will result in one bucket called `sample-bucket` containing one object called `some_file.txt`.\n\n### Running with HTTP\n\nfake-gcs-server defaults to HTTPS, but it can also be used with HTTP. The flag\n`-scheme` can be used to specify the protocol.  \nThe binding port will be `-port` (defaults to `4443`).  \nFor example, the previous example could be changed to pass `-scheme http`:\n\n```shell\ndocker run -d --name fake-gcs-server -p 4443:4443 -v ${PWD}/examples/data:/data fsouza/fake-gcs-server -scheme http\n```\n\nAnd now we can curl it without the `--insecure` flag and using `http://`\ninstead of `https://`:\n\n```shell\ncurl http://0.0.0.0:4443/storage/v1/b\n{\"kind\":\"storage#buckets\",\"items\":[{\"kind\":\"storage#bucket\",\"id\":\"sample-bucket\",\"name\":\"sample-bucket\"}],\"prefixes\":null}\n\ncurl http://0.0.0.0:4443/storage/v1/b/sample-bucket/o\n{\"kind\":\"storage#objects\",\"items\":[{\"kind\":\"storage#object\",\"name\":\"some_file.txt\",\"id\":\"sample-bucket/some_file.txt\",\"bucket\":\"sample-bucket\",\"size\":\"33\"}],\"prefixes\":[]}\n```\n\n### Running with both HTTPS and HTTP\n\nTo start both HTTPS and HTTP servers, pass `-scheme both`.  \nHTTPS will bind to `-port` (defaults to `4443`) and HTTP will bind to `-port-http` (defaults to `8000`).  \nFor example, the previous example could be changed to pass `-scheme both`:\n\n```shell\ndocker run -d --name fake-gcs-server -p 4443:4443 -p 8000:8000 -v ${PWD}/examples/data:/data fsouza/fake-gcs-server -scheme both\n```\n\n### Using with signed URLs\n\nIt is possible to use fake-gcs-server with signed URLs, although with a few caveats:\n\n- No validation is made on the query params (signature, expiration ...)\n- You need your client to modify the URL before passing it around (replace\n  `storage.googleapis.com` with something that points to fake-gcs-server)\n- You need to configure fake-gcs-server to accept this local URL (by setting\n  `-public-host`)\n\n### Available server flags\n\nfake-gcs-server supports various features that can be configured through flags\nupon start. Use the `-help` flag to list all of them alongside their usage\ninstructions\n\n```shell\ndocker run --rm fsouza/fake-gcs-server -help\n```\n\n## Client library examples\n\nFor examples using SDK from multiple languages, check out the\n[`examples`](/examples/) directory.\n\n### Building the image locally\n\nYou may use `docker build` to build the image locally instead of pulling it\nfrom Docker Hub:\n\n```shell\ndocker build -t fsouza/fake-gcs-server .\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffsouza%2Ffake-gcs-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffsouza%2Ffake-gcs-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffsouza%2Ffake-gcs-server/lists"}