Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



4 Commits

Repository files navigation


Serve files from a Google Cloud Storage bucket.

There are already a few alternatives (namely, gcsproxy and weasel). Also, GCP allows to make all bucket files public. The main difference is that GCServe provides basic HTTP auth.

Using as PyPI server

A possible use-case for GCServe is to host a private PyPI instance. All you need is:

  1. Download packages from using pip download.
  2. Upload packages into the bucket using gsutil rsync.
  3. Generate static index using dumb-pypi.
  4. Serve the bucket with GCServe.

This pipeline is much faster, smaller, and more reliable than a more dynamic solution, like pypicloud.


Build and run using Go compiler:

go build -o gcserve.bin .
./gcserve.bin \
    --bucket=test-bucket \
    --username=test-user \
    --password=test-pass \

Build and run using Docker:

sudo docker build -t gcserve:latest .
sudo docker run \
    -v /path/to/google/credentials.json:/mnt/cred.json \
    -it gcserve:latest \
    --bucket=test-bucket \
    --username=test-user \
    --password=test-pass \