How to host a Google AI Studio app in India
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
- Download the project. In AI Studio, export or download the app as a zip. Check that it contains
package.jsonand the server file. - Remove keys from the code. Search for
GEMINI_API_KEYor any string starting withAIza. Read the key from an environment variable instead. - Read the port from the environment. The server should listen on
process.env.PORTso the platform can route traffic to it. - 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.
- 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.
- Connect your domain. Point your domain to Nexovia; the HTTPS certificate is issued and renewed for you.
What gets checked before it goes live
- Keys or passwords left in the code (shown masked in the report).
- Packages with known vulnerabilities, with the version that fixes each one.
- Files that must never be public, such as
.envor source maps. - That the new version starts and answers before visitors are switched to it.
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.