# How to host a Google AI Studio app outside Google

By Avatar 8 (Avatar 8 LLC) · Published November 29, 2026 · https://deed.page/blog/host-a-google-ai-studio-app

To host a Google AI Studio app yourself, download the project as a ZIP from Build mode, build it, and upload the static output to a host that serves files. On deed.page that upload is one `curl` with no account, and the Free plan holds 25 sites of up to 25 MB each ([pricing](https://deed.page/pricing)). It works only when the app does its work in the browser: deed.page serves static files, and AI Studio apps can include server code that a static host cannot run.

Google's docs were read on November 29, 2026. We could not generate an app inside AI Studio from here, so the build below used a small Vite project with the same output layout (an `index.html` plus hashed files in `assets/`). The deed.page commands ran against production, and the test site was then deleted.

## What does AI Studio give you?

Google's Build mode page says a web app gets a client side (React by default) and a server side, a Node.js runtime for secure API calls, databases and npm packages ([Build apps in Google AI Studio](https://aistudio.google.com/docs/aistudio-build-mode)). Your options for getting it out:

- **Publish from AI Studio.** The app runs as a Cloud Run service with a public URL. Eligible accounts on the Google Cloud Starter Tier can publish up to 2 apps without a billing account; others need a Google Cloud project with billing ([Publish your app](https://aistudio.google.com/docs/aistudio-deploying)).
- **Free subdomain.** `your-app-name.ai.studio`, first come, first served, on the Starter Tier and on paid projects. Your own domain needs a paid Google Cloud project (same page).
- **GitHub sync.** Two-way sync with a repository, set up under Settings, GitHub.
- **ZIP download.** Export the code and run it elsewhere. Google notes you must set `GEMINI_API_KEY` in that hosting environment, because the Gemini calls are made from server-side code.

## Can a static host run my AI Studio app?

Only if nothing in it needs the server. Open the **Code** pane and look. If the app calls Gemini, a database or any secret through a server file, a static host will serve the page but those calls will fail, and moving the key into the browser would expose it to everyone who opens the page. Apps like a calculator, a game, a visualization, a landing page or a client-side tool with no API key export cleanly. For the rest, keep Cloud Run, or put the server part on a host that runs code and the front end anywhere.

## Build the ZIP and publish it

Unzip the download, then build it. The project's `package.json` lists the commands. For a Vite project:

```bash
npm install
npm run build
tar -C dist -czf site.tar.gz .
curl -T site.tar.gz "https://deed.page/v1/sites?slug=ai-studio-test-13266&ref=blog"
```

In our test the build wrote `dist/index.html` and one file in `dist/assets/`. The publish returned `"ok": true`, `"version": "v1"`, `"files": 2` and the URL `https://ai-studio-test-13266.deed.page/`, where the page loaded and the script was served as `text/javascript`. Pick your own slug, since that one was only a test ([choosing a slug](https://deed.page/blog/choosing-a-slug)). The reply also carries a `deed_tok_…` owner token, shown once; save it ([token hygiene](https://deed.page/blog/token-hygiene-for-agents)).

If your app builds to a different folder, such as `build/`, point `tar -C` at that folder. The file `index.html` has to sit at the top of the archive. Vite writes asset links from `/`, which works on a subdomain like this. If you later serve it under a path, set the `base` option.

## Update it after a change

AI Studio's ZIP is a snapshot. After you change the app, export again, rebuild and send the tarball with the saved token:

```bash
curl -T site.tar.gz -H "Authorization: Bearer $DEEDPAGE_TOKEN" \
  "https://deed.page/v1/sites?slug=ai-studio-test-13266&ref=blog"
```

Sending an identical tarball again returned `"unchanged": true` and no new version. A changed one gives a new version at the same URL ([version history](https://deed.page/blog/version-history-and-rollback)). Each request body can be up to 4 MB, and bigger builds go up in parts ([large sites](https://deed.page/blog/merge-publish-large-sites)). To use your own domain, the Free plan includes one ([custom domains](https://deed.page/blog/free-static-hosting-with-custom-domain)).

## Where Google's own hosting is ahead

Publishing inside AI Studio is one click and keeps the full-stack app working, including server-side Gemini calls and secrets, which a static host cannot do. It also has a free `ai.studio` address with no setup for eligible accounts. deed.page is the better fit when you want the app on a plain static address without a Google Cloud project, and you are happy to ship only the client side. Free sites show a small "Published with deed.page" link, which Hobby at $3 a month removes.

## FAQ

**Can I host a Google AI Studio app for free?**
Yes, two ways. Google's Starter Tier lets eligible accounts publish up to 2 apps to Cloud Run with a free URL, and a static export can go on deed.page's Free plan for $0. Cloud Run pricing may apply to usage beyond that, per Google's docs.

**Does the Gemini API key travel with the ZIP?**
Google says the key is set as a server-side secret and tells you to set `GEMINI_API_KEY` yourself when you run the ZIP elsewhere. Do not paste it into front-end code on a static host.

**Can an agent do the publishing?**
Yes. Add `https://deed.page/mcp` to an MCP client and call `publish_site` ([MCP walkthrough](https://deed.page/blog/mcp-publish-walkthrough)). The same build-then-upload steps apply to apps from [Gemini](https://deed.page/blog/host-a-website-made-with-gemini), [Lovable](https://deed.page/blog/host-a-website-made-with-lovable) and [Bolt](https://deed.page/blog/host-a-website-made-with-bolt).
