Say you built a portfolio site or a small React app. The build step produced a folder of HTML, CSS, JavaScript and images. Nothing needs to run on a server; a web server only has to hand those files to browsers.
Cloud Run is Google Cloud’s service for running containers. A container is a packaged program plus everything it needs to run. To put a static site on Cloud Run, you used to write a Dockerfile (a recipe that builds the container) and configure a web server such as Nginx inside it, just to serve files.
On November 23, 2026, Google’s Cloud Run release notes announced the Static 24 (static24) runtime in Preview. It serves static websites, single-page applications and static-site-generator output “directly from source using a preconfigured Nginx web server, without a Dockerfile.” Cloud Run release notes · Configure the Static runtime
Preview is Google’s label for a release that is not yet generally available (GA), so check the current status before you rely on it in production. As of November 29, 2026, the release notes still list it as Preview.
The words you need
- Runtime. Here, a ready-made base image: the starting layer of a container that Google maintains. Static 24 is one such base image for static files.
- Nginx. A widely used web server. The runtime configures it for you to serve your files on port 8080, the port Cloud Run expects.
- Buildpacks. Tools that inspect your source folder and build a container from it without a Dockerfile. Cloud Build is the Google Cloud service that runs that build, and Artifact Registry is where the resulting image is stored.
- Single-page application (SPA). An app where JavaScript in the browser decides which screen to show for a URL like
/settings. The server does not have asettings.htmlfile. - Deep link. Opening a URL like
https://example.com/settingsdirectly, by typing it or reloading the page, instead of clicking there from the home page.
What the runtime does for you
You give the runtime a folder. It puts the files behind Nginx and handles the details a hand-written container would need:
- It serves files on port 8080.
- For a path that is not a real file, Nginx serves
/index.html“as a fallback without redirecting the browser URL”, so an SPA router can show the right screen. - It adds
ETagandLast-Modifiedheaders and leaves out a defaultCache-Control: max-age, so a new deployment takes effect right away.
There are two ways to deploy. With --no-build, the files you already built are uploaded straight onto the static24 base image and Cloud Build is skipped. Google recommends this for prebuilt files. Without that flag, Cloud Build and buildpacks build the image, store it in Artifact Registry, and Cloud Run deploys it. Static runtime documentation
Step by step: deploy a prebuilt site
These steps assume a site generator that writes its output to dist/. Change the folder name to match yours, such as build/ or out/.
Step 1: build the site locally
Run your project’s build command in the project folder, for example npm run build. The result is a folder of files.
Step 2: confirm index.html is where the runtime will look
The runtime “doesn’t scan subdirectories, such as build/ or dist/.” Files must be in the current directory or in the directory you pass with --source. Check before deploying:
ls dist/index.html
If this prints dist/index.html, the folder is correct. If it says “No such file or directory”, find the folder that really contains index.html.
Step 3: check what will be uploaded
The gcloud run deploy command respects .gitignore and .gcloudignore when it uploads files. Build folders such as dist/ are often listed in .gitignore. If your output is ignored, it may not be uploaded. The documentation warns about this in its directory detection section. Directory detection
Step 4: deploy
Run this from your project folder on a machine with the Google Cloud CLI (gcloud) installed, signed in, and allowed to deploy to the project. The command uploads files and creates or updates a live service:
gcloud beta run deploy my-site \
--source ./dist \
--no-build \
--base-image=static24 \
--project MY_PROJECT
What each part does:
beta: Google’s guide uses thegcloud betacommand group for this runtime.my-site: the name of the Cloud Run service. Choose your own.--source ./dist: the folder that containsindex.html.--no-build: upload the prebuilt files and skip Cloud Build. Leave it out if you want buildpacks to package the folder.--base-image=static24: use the Static 24 runtime.--project MY_PROJECT: your Google Cloud project ID.
When it finishes, gcloud prints the service URL. This command follows Google’s documented example; I did not run it for this article because it needs a Google Cloud project and credentials. Deployment examples
Step 5: check the home page and a deep link
Open the service URL in a browser first. Then test a deep link from a terminal. Replace SERVICE_URL with the URL gcloud printed:
curl -I https://SERVICE_URL/
curl -I https://SERVICE_URL/settings
curl -I asks only for the response headers. For an SPA, both requests should succeed, normally with HTTP/2 200, and show content-type: text/html, because the fallback returns index.html for /settings. Google’s page describes the fallback but does not state the status code, so treat that as the expected Nginx behavior rather than a documented guarantee. A 403 or 404 here means the fallback or the source folder is wrong.
You can put the check in a script that fails on any non-2xx status:
for path in / /settings; do
curl -fsS -o /dev/null -w "%{http_code} %{content_type} $path\n" "https://SERVICE_URL$path" || echo "FAILED $path"
done
-f makes curl return an error for HTTP errors, and -w prints the status code and content type for each path. This script was not run against a live service.
Finally, open the site with the browser’s developer tools on the Network tab and reload. Look for any asset (a script, stylesheet or image) that returns 404.
Common mistakes
- Deploying the repository root.
--source .points at your project, not the build output. Google says a--no-builddeployment can then serve from the wrong root and return403 Forbidden, and a buildpack build can fail to detect static files. - Ignored build output. A
dist/entry in.gitignorecan keep the files from being uploaded. - Testing only by clicking. A route that works after clicking from the home page can still fail on a fresh request. Always test a deep link directly.
- Expecting server code to run. API routes or pages rendered on each request do not work. More on that below.
What it cannot do
The documentation says the Static runtime “only serves static files.” It does not support custom server-side code, a custom nginx.conf, or reverse-proxying from the container to another Cloud Run service. Static runtime limitations
- If you need
/api/*on the same domain, Google points to an external Application Load Balancer or Firebase Hosting rewrites. - If your framework renders pages at request time, use a runtime that runs that server code, or generate static output before deploying.
- If you build in the cloud instead of using
--no-build, the build uses Cloud Build and Artifact Registry, with their own regional availability and IAM (permission) requirements. The Cloud Run source-deployment guide lists the roles needed; check them before automating releases. Cloud Run source deployment
Conclusion
Static 24 lets Cloud Run serve a folder of static output behind a managed Nginx without a Dockerfile. Point --source at the folder that actually contains index.html, make sure the files are not ignored, and check both the home page and a deep link with curl -I after deploying. Keep the Preview status and the no-server-code limit in mind when choosing it for production.