Build the site for production on your own computer, copy the resulting files (or application source) to the VPS, configure a web server such as nginx, then point your domain and enable HTTPS. Google Antigravity is the development tool; the VPS web server is what actually answers visitors’ requests. No official Google step-by-step guide for this exact path was available as of October 2026, so treat framework-specific commands and Antigravity behavior as items to verify in your project.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
What you are deploying
“Deploying from Antigravity” does not mean the Antigravity editor hosts your public site. Antigravity creates or edits a project. Your production build is then served by software running on the VPS.
As an Amazon Associate I earn from qualifying purchases.
Recommended Free Tools
- Static site: the build produces HTML, CSS, JavaScript, images and other assets. nginx can serve those files directly.
- Server application: the project must keep a runtime process (for example, a Node-based server) running. nginx normally sits in front of it as a reverse proxy.
- Database-backed application: the VPS also needs the database, credentials, backups and update procedures required by the application. A truncated third-party VPS discussion mentions this category but does not establish a complete Antigravity-specific recipe.
Keep these roles separate. Running an Antigravity command-line session over SSH or opening the Antigravity IDE through Remote Desktop is a development workflow, not a substitute for nginx or an application process serving your domain.
Choose the deployment shape before touching the VPS
| Project result | What goes on the VPS | How visitors are served | Operational burden |
|---|---|---|---|
| Static production build | The output directory, such as dist/, build/ or out/ |
nginx reads files from a web root | Lower: no application process is required |
| Node or other server application | Source, declared dependencies, environment variables and a running server process | nginx forwards requests to the application on a local port | Higher: process supervision, logs, updates and recovery are your responsibility |
| Antigravity running remotely | The CLI or IDE session and its supporting tools | It does not host the public site by itself | Separate development-session security and access work |
If the generated project is a browser-only site, use the static path. If it has server-side rendering, API routes, authentication code that runs on the server, or a database, follow the server-application path and confirm the framework’s production start command.
#1 Best Overall
Prepare the project in Antigravity
Remove development-only material
Before committing or copying anything, remove files and folders that were created only for experiments. Typical examples include test-data.json, debug.log and a temporary tmp/ directory. Do not delete a file merely because its name looks temporary; first check whether the application imports it at runtime.
Find hard-coded local addresses
Search the project for localhost, 127.0.0.1 and development ports. A browser bundle that still calls http://localhost:3000 will call the visitor’s own computer, not your VPS. Replace those values with a production configuration mechanism supported by your framework. Keep secrets out of the repository and provide them through the VPS environment or a protected server-side configuration file.
Free tools Windows power users keep installed
One-click scans. No signup required.
Check dependencies and case
A development machine can hide undeclared packages, incorrect import capitalization and files that exist only in a local folder. Ensure every package used in production is declared in the project’s dependency manifest and that import paths match the actual filename exactly. Linux filesystems are commonly case-sensitive even when a development computer is not.
Commit a deployable revision
Put the cleaned project in a Git repository and commit the exact revision you intend to deploy. A repository gives you a repeatable way to return to a known-good version; copying an untracked working folder does not.
Run a production build locally
Do not treat a development server as proof that deployment will work. A production build is the check most likely to reveal missing imports, type errors, case-sensitive paths and packages that were installed locally but never declared.
Rank #2
- Install dependencies using the package manager and lockfile already used by the project. For a Node project, this is commonly
npm ciwhen a compatible lockfile is committed; use the project’s documented equivalent if it uses another package manager. - Run the project’s production build script, usually exposed as
npm run build. If Antigravity generated a different script name, use the script shown in the project manifest rather than guessing. - Record the output directory. Common names are
dist/,build/andout/; Next.js projects commonly create.next/, although that directory is not automatically a standalone static site. - Serve the real output directory locally, not the source directory. For a static output folder,
npx serve -s distis one way to test it; replacedistwith the directory your build actually produced. - Open the local address and exercise the important paths: the home page, a deep link, forms, images, API calls, authentication and any client-side routing. Test a hard refresh on a deep link because a single-page application can appear to work during in-app navigation while failing when nginx receives the URL directly.
Fix build or runtime errors before uploading. If the build depends on environment variables, make a deliberate list of which values are safe for the browser bundle and which must remain server-only.
Provision the VPS safely
The exact control-panel labels differ by provider, but the sequence is consistent. Create the server, identify its public IPv4 address (and IPv6 address if you will use one), and keep a recovery path before changing the web configuration.
- Create an administrative account: use the provider’s initial account only to create a separate user for deployment, grant the minimum administrative privilege needed for package installation and service management, and prefer SSH keys over passwords.
- Update the operating system: install security updates before exposing the site. Reboot if the operating system requires it, then reconnect and verify that the intended user still works.
- Restrict network access: allow HTTP on port 80 and HTTPS on port 443 when the site is ready. Keep your administration port accessible only as broadly as your access plan requires. One 2026 third-party guide recommends a jump host or VPN rather than exposing the VPS SSH port directly to the public internet; that is a security recommendation from that guide, not an official Antigravity requirement.
- Install only what the deployment needs: a static site needs a web server such as nginx. A server application also needs its runtime and any data service it requires. Avoid installing a database or language runtime merely because the generator mentioned it in a development example.
- Set a recovery plan: know how to use the provider’s console or rescue mode, where logs are stored, and how to restore the previous build if a configuration change makes nginx fail.
Copy the project or build to the VPS
Option A: build on the VPS
Clone the repository on the server, install the production dependencies, and run the same build command that passed locally. This is convenient for repeatable deployments, but it means the VPS needs the appropriate build runtime and enough memory and disk space for the build.
git clone YOUR_REPOSITORY_URL /srv/your-site
cd /srv/your-site
npm ci
npm run build
Replace the repository URL, destination and commands with those for your project. Do not put a private access token directly into shell history. If the repository is private, use a deploy key or another narrowly scoped authentication method.
Option B: build elsewhere and copy the output
For a static site, you can build on your workstation or a CI system and transfer only the generated output directory. This keeps build tools off the production server and makes the web root easier to inspect.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →rsync -av --delete dist/ deploy-user@VPS_IP:/var/www/your-site/
The --delete option removes files on the VPS that no longer exist in the local output, so confirm the destination path before running it and keep a backup or versioned release directory if you need instant rollback. Use scp instead if that better matches your access setup.
Use release directories for safer updates
Rather than overwriting the live directory during a large upload, create a dated or versioned release under a path such as /var/www/releases/2026-10-14-001, copy the build there, test its contents, and switch the nginx root to the verified release. Keep the previous release until the new one has passed an external check. The exact switching mechanism is an operational choice; the important point is that an incomplete upload should never be the directory nginx serves.
Serve a static build with nginx
Place the output in a directory readable by nginx, such as /var/www/your-site. Then create a server block for the domain. The following is a minimal pattern; replace the domain and filesystem path.
server {
listen 80;
listen [::]:80;
server_name example.com www.example.com;
root /var/www/your-site;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}
The try_files fallback to /index.html is appropriate for many client-side routers: nginx serves a real asset when it exists and lets the application handle a recognized deep link. If your application is not a single-page app, or if you deliberately want missing paths to return a server-side 404, use a rule that returns 404 when no file matches instead. A Google Cloud Skills lab demonstrates that 404-style pattern in an nginx static-site configuration; the lab targets a container, so only the nginx configuration concept transfers directly.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware match- Save the server block in the location used by your Linux distribution, commonly under
/etc/nginx/sites-available/. - Enable it using the distribution’s normal sites-enabled mechanism, if one is provided.
- Run
sudo nginx -t. Do not reload nginx if this validation reports an error. - Reload after a successful test with
sudo systemctl reload nginx. - Request the server by its IP or a temporary hosts-file entry and check both the home page and a deep link before changing public DNS.
Check file permissions if nginx returns 403. The nginx worker must be able to traverse the parent directories and read the files, while your deployment account should retain ownership or a controlled group-based write permission.
Rank #4
Run a server application behind nginx
A server-rendered or API-enabled project is not deployed by copying its source into nginx’s static root. Start the application with its production command, bind it to a local interface and port, and let nginx proxy public requests to it.
- Install the runtime version required by the project’s manifest.
- Copy the source and lockfile, install production dependencies, and provide server-only environment variables through the VPS’s protected configuration.
- Run the production start command manually first. Confirm that it listens on the expected local port and that it can reach its database or other services.
- Configure a process supervisor appropriate to your operating system so the application restarts after a crash and starts after a reboot. Keep the supervisor configuration separate from the source repository.
- Use an nginx server block with a reverse-proxy location. A common shape is:
server {
listen 80;
server_name example.com;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Port 3000 is only an example. Use the port your application actually listens on, keep it bound to localhost unless another service must reach it, and never expose an administrative or database port just to make the proxy work. If the framework requires WebSocket upgrades, add the framework’s documented upgrade headers and test a live connection.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minutePoint the domain at the VPS
At your DNS provider, create an A record for the domain pointing to the VPS’s IPv4 address. Add an AAAA record only when IPv6 is configured correctly on the server and firewall. Add the www name as a second record or an alias according to your DNS provider’s interface, then make the nginx server_name list match the names you intend to serve.
DNS changes are cached. During the transition, verify which address a resolver returns and test the VPS directly where possible. Do not request a certificate for a hostname that still points elsewhere; certificate validation will reach the wrong server.
Enable HTTPS after HTTP works
Once DNS resolves to the VPS and nginx serves the correct site over HTTP, obtain a certificate from a trusted certificate authority using your chosen ACME client. Certbot is one commonly used client; its exact package and command vary by Linux distribution. Follow the client’s current instructions for nginx, then verify that the resulting configuration still passes sudo nginx -t.
Best Value
Test both the bare domain and www name if you configured both. Confirm that HTTP redirects to HTTPS only after the certificate works, and check that browser requests for images, scripts, API endpoints and fonts do not remain on insecure HTTP URLs. Renewals must be automated and tested; a certificate that works today but silently expires later is not a finished deployment.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Using Antigravity on the VPS is a separate decision
CLI over SSH
One 2026 third-party guide reports that an Antigravity CLI session over SSH detects the remote session and prints a URL to open in a local browser for authorization. This is a single, unverified third-party account rather than an official Google procedure, so confirm the behavior and supported authentication flow in the version you install. Do not make an authorization callback or development port publicly reachable merely to avoid an SSH tunnel.
IDE through Remote Desktop
A separate guide describes installing the Antigravity IDE on a Windows VPS and connecting through Remote Desktop. Closing the RDP window disconnects the desktop while leaving the session running, according to that guide. That keeps an agent or editor active; it still does not publish the website. The public service must remain correctly configured as a static nginx site or as an application behind nginx.
For most production deployments, keeping the editor off the production VPS reduces attack surface and makes builds reproducible. Use a dedicated development or build machine when practical, and transfer a reviewed release to the server.
Verify the deployment from outside the server
- Load the domain over HTTPS from a network that is not the VPS itself.
- Open the home page, refresh a deep link, submit each important form and test authentication or API calls.
- Inspect browser developer tools for 404 responses, mixed-content warnings, failed CORS requests and references to localhost.
- Check the VPS’s nginx access and error logs while making a request. For a server application, also inspect the application process logs.
- Confirm that a reboot brings back the web server and application process, and that the domain still serves the intended release.
- Check disk usage, certificate renewal status and the availability of a recent backup before announcing the site.
Common failures and the fastest fix
| Symptom | Likely cause | What to check |
|---|---|---|
| The build fails on the VPS but passed locally | Different runtime version, undeclared dependency, case mismatch or missing environment variable | Compare runtime versions, use the committed lockfile, inspect the first build error and verify every required variable |
| Home page works but refreshing a deep link returns 404 | nginx is not falling back to the single-page application’s entry file | Review the try_files rule and decide whether this project is actually a client-side router |
| Every asset returns 404 | nginx root points at the project source or the wrong output directory | List the deployed directory and confirm that index.html and the generated asset folder are under the configured root |
| nginx refuses to reload | Syntax error, duplicate server name or invalid include | Run sudo nginx -t and correct the reported file before reloading |
| 502 Bad Gateway | The proxied application is stopped, listening on another port or bound incorrectly | Check the process supervisor, application logs and local connectivity to the configured upstream |
| Browser reports mixed content | The built site still requests an HTTP asset or API URL | Search source and built files for http://, update production configuration and rebuild |
| Domain shows another site | DNS still points to an old address or nginx selected a different server block | Inspect DNS answers, the VPS address and the exact server_name values |
| Certificate validation fails | DNS is not reaching this VPS, the hostname is missing from nginx, or port 80/443 is blocked | Verify DNS, firewall rules and the HTTP server block before rerunning the ACME client |
VPS versus a managed host
A VPS gives direct control over the operating system, web server, runtime and deployment layout. That control is useful for custom server applications, private services and unusual networking requirements. It also transfers security updates, monitoring, backups, incident response and recovery work to you.
A managed or shared host can be easier when the project is a straightforward static build or a supported server application. Third-party hosting instructions describe Git deployment and browser-based file managers as alternatives to administering nginx yourself. The trade-off is less control over the operating system and build environment. Compare the choices on control, maintenance responsibility, how the host handles your build output, domain and HTTPS setup, and whether the application runtime you need is supported. VPS pricing and provider plans are not established here, so obtain current regional quotes before choosing on cost.
Make future releases repeatable
- Keep the source, lockfile and build script in version control.
- Document the required runtime version, environment variables and exact output directory.
- Build and test a candidate revision before touching the live release.
- Upload to a new release directory or staging location rather than replacing a working build blindly.
- Run nginx configuration validation before every reload.
- Record the deployed commit or release name so you can identify what is live.
- Retain the previous known-good release until the new one has passed external checks.
- Schedule operating-system updates, dependency updates, certificate-renewal checks and backups.
The practical boundary is simple: Antigravity helps you create the project, your build process produces a deployable artifact, and the VPS’s web server or application process serves it. Keeping those stages explicit makes failures easier to diagnose and lets you move between a managed host and a VPS without changing the site’s fundamental release process.
The Bottom Line
For a static Antigravity project, deploy the verified production output to a VPS directory and serve it with nginx; for a server application, run its production process behind nginx. Then validate DNS, HTTPS, deep links, logs and rollback before declaring the site live.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




