How-to guideUpdated 23 October 20264 min read

How to host a Google AI Studio app in India

Short answer

Download the project from AI Studio as a zip, keep its server file, move the Gemini API key out of the code into a secret, and upload the zip to a platform that runs the server, not just the web pages. On Nexovia this takes about 75 seconds from upload to live, with a security check included.

Why AI Studio apps break on ordinary static hosting

Many apps built in Google AI Studio are two things in one folder: a Vite and React front end, and a small Node.js server (often server.ts) that calls the Gemini API so the key never reaches the browser. Static hosts publish only the front end. The app loads, but every call to /api returns the web page instead of data, and the screen shows "Could not reach the server".

Step by step

  1. Download the project. In AI Studio, export or download the app as a zip. Check that it contains package.json and the server file.
  2. Remove keys from the code. Search for GEMINI_API_KEY or any string starting with AIza. Read the key from an environment variable instead.
  3. Read the port from the environment. The server should listen on process.env.PORT so the platform can route traffic to it.
  4. Upload the zip. In Nexovia Console, create a project from the zip. Nexovia detects the front end and the server, builds both and starts the server.
  5. Add the key as a secret. Put the Gemini key in Nexovia Vault. It reaches your server as an environment variable and never appears in your repository.
  6. Connect your domain. Point your domain to Nexovia; the HTTPS certificate is issued and renewed for you.

What gets checked before it goes live

Questions

Can I host a Google AI Studio app for free?

You can preview it inside AI Studio, but a public app with its own server and domain needs hosting. Nexovia plans are priced in rupees; early access customers get help moving their first app.

Where should I keep my Gemini API key?

Never in the front-end code or the repository. Keep it in a secrets vault and read it on the server from an environment variable.

Does my AI Studio app's data stay in India on Nexovia?

Your app, its database, files and backups are stored and run in India. Calls your app makes to the Gemini API go to Google under Google's own terms.

Quick Connect

Quick Connect

Leave your number and our team will call you back.

See our privacy notice.