Deploy a static site with one command
Deploy a static site from your terminal in seconds with the vibiz deploy command, automatic HTTPS, preview builds, and instant rollbacks.
On this page 7 sections
To deploy a static site from the command line, run vibiz deploy inside your site directory. Your files are checked by content hash, missing assets are uploaded, and the site goes live immediately at https://<slug>.vibiz.app with HTTPS configured automatically. You do not need to configure build pipelines, link third-party storage buckets, or write custom server configurations.
This guide walks through deploying your first static site, testing changes on preview URLs, rolling back revisions, and connecting a domain name.
How to deploy a static folder in three steps
You can deploy plain HTML, CSS, and client-side JavaScript, or the static export output from any static site generator.
1. Install the CLI and log in
The CLI is distributed as @vibiz/cli on npm and requires Node 20 or newer. You can install it globally or run it directly through npx:
npm install -g @vibiz/cli
vibiz loginThe vibiz login command prints an authorization link. Open the link in your browser, sign in to your thelastapi account, and click Authorize. The CLI generates and saves an account key (vz_sk_…) on your local machine.
2. Initialize the project
Navigate into your site directory or create a new one:
mkdir acme-site && cd acme-site
echo "<h1>Welcome to Acme</h1>" > index.html
vibiz init "Acme Site"The vibiz init command creates the project on thelastapi and writes a ./vibiz.json file containing your project id. By default, initialization provisions hosting, database, auth, and analytics. If you are only deploying static files and do not need a database or user accounts, you can initialize a clean hosting project:
vibiz init "Acme Site" --resources hostingYour project is assigned an address immediately at https://<slug>.vibiz.app.
3. Deploy the files
To push your files to production, run:
vibiz deploy -m "Initial release"The CLI inspects your local directory, hashes each file, uploads only the contents that the host does not already hold, and activates the site. Open https://acme-site.vibiz.app in your browser to verify that your site is live. For a broader overview of the initialization workflow, see the Quickstart.
How content-hash deployments work
thelastapi uses content hashing to make static site deployments fast and deterministic. Before transmitting files, the CLI calculates the SHA-1 hash of each local file and queries the platform to determine which hashes are missing. If an asset (such as an image, stylesheet, or script) has already been uploaded in a previous deployment, the host reuses the existing copy.
Every deployment creates a complete file manifest. Because every release points to a frozen manifest of content hashes, switching between versions requires no file reconstruction.
File limits and upload exclusions
To protect your site and keep deployments fast, the platform applies specific upload boundaries:
| Resource limit | Allowed specification |
|---|---|
| Max builds per day | 30 builds per project per UTC day |
| Max files per deployment | 10,000 files |
| Max single file size | 50 MB |
| File exclusions (automatic) | node_modules, .git, .next, dist, .turbo, vibiz.json, .env* |
| Credential exclusions (automatic) | *.pem, id_rsa, .npmrc |
| Current hosting cost | $0 (recorded in usage at $0; pricing not decided) |
The CLI automatically ignores source control folders, local build caches, and sensitive environment files. It also refuses to deploy system folders or your user home directory. To learn more about upload boundaries and storage architecture, read the Hosting documentation.
If you are building an automated pipeline or want to trigger releases on git push, see how to deploy from CI with one command and one key.
Previewing changes and managing versions
You do not have to push untested edits straight to your live visitors. thelastapi provides staging URLs, version comparisons, and instant rollbacks out of the box.
Deploying a preview build
When you want to verify changes in a live environment without affecting your primary site, add the --preview flag:
vibiz deploy ./site --previewThis builds and uploads your changes to an isolated preview URL. Once you verify that the preview works as expected, promote it to production using the deployment id returned by the CLI:
vibiz promote dep_123456789When you promote a preview, it is rebuilt as production and switches the live traffic over.
Comparing versions and rolling back
Every deployment is recorded in your project history. To inspect recent releases, run:
vibiz versionsThe output displays the deployment id, author, timestamp, commit message, and files changed. To view the exact changes between the live site and the deployment before it, use vibiz diff:
vibiz diffYou can also compare two specific deployments by passing their ids:
vibiz diff dep_old123 dep_new456If a bug slips into production, you can revert instantly. Running vibiz rollback points your live address back to the deployment that preceded the current live release:
vibiz rollbackTo roll back to a specific version from your history, pass its deployment id:
vibiz rollback dep_123456789A production rollback is instantaneous because the platform already holds the entire file manifest. Note that while your static site files revert immediately, databases are not rolled back; any database schema changes or stored data remain in their current state.
If your static site starts needing data storage down the road, read about the cheapest way to host a website and database for a side project.
Connecting a custom domain
Every site is immediately available at its free <slug>.vibiz.app subdomain. When you are ready to point your brand's domain to the site, you have two options: connect a domain you already own, or register one directly.
Connecting an existing domain
To attach a domain you registered at another registrar, run:
vibiz domains add shop.example.comThe CLI prints the exact DNS records to configure at your DNS provider:
| Domain type | Record type | Host/Name | Target value |
|---|---|---|---|
Subdomain (shop.example.com) | CNAME | shop | cname.vibiz.app |
Apex domain (example.com) | A | @ | The IP shown by vibiz domains |
Automatic redirect (www.example.com) | CNAME | www | cname.vibiz.app |
When you connect an apex domain like example.com, www.example.com is configured automatically as a permanent redirect to your primary domain.
After updating your DNS records, run the verification command:
vibiz domains verify shop.example.comOnce DNS resolves, an HTTPS certificate is provisioned automatically. You can check certificate and routing status at any time with vibiz domains.
Buying a domain directly
If you do not have a domain yet, you can search and purchase one using account credits:
vibiz domains search acmesite
vibiz domains buy acmesite.comDomains purchased through thelastapi are routed to your project automatically with zero DNS configuration required. For detailed domain management rules, visit the Domains guide.
If your project sells physical or digital products, you can easily sell from a static site with a checkout link without setting up a backend server.
Deploying over plain HTTP or with AI agents
You do not need the CLI installed to deploy static assets. You can deploy files using standard curl commands or through AI coding agents.
Deploying via the HTTP API
Deploying over raw HTTP follows a three-step cycle: check for missing file hashes, upload the missing binaries, and post the deployment manifest.
# 1. Calculate file hash
SHA=$(shasum -a 1 index.html | cut -d' ' -f1)
# 2. Check if the file is already stored
curl https://thelastapi.dev/v1/files/missing \
-H "Authorization: Bearer $VIBIZ_API_KEY" \
-H 'content-type: application/json' \
-d "{\"shas\":[\"$SHA\"]}"
# 3. Upload missing files
curl -X PUT https://thelastapi.dev/v1/files/$SHA \
-H "Authorization: Bearer $VIBIZ_API_KEY" \
--data-binary @index.html
# 4. Create the deployment
curl https://thelastapi.dev/v1/projects/prj_123/deployments \
-H "Authorization: Bearer $VIBIZ_API_KEY" \
-H 'content-type: application/json' \
-d "{\"files\":[{\"path\":\"index.html\",\"sha\":\"$SHA\",\"size\":$(wc -c < index.html)}]}"The API returns a 202 Accepted response with the deployment id. You can poll GET /v1/deployments/:id until the status changes to ready.
Deploying with AI coding agents
If you use tools like Claude Code, Codex, or Cursor, you can deploy without leaving your editor. Connect the MCP server:
claude mcp add --transport http vibiz --scope user https://thelastapi.dev/mcpYour agent can create projects, generate static files, inspect diffs, and deploy directly using the vibiz_deploy and vibiz_code tool actions.
Monitoring your site after deployment
Once your site is live, you can monitor uptime, traffic, and deployment health through Mission Control:
vibiz healthThis command runs automated health checks against your site, verifying that your address resolves, SSL certificates are valid, and pages return successful HTTP status codes.
To start deploying static sites with a single key and unified CLI, create your account at thelastapi.dev/start.
Frequently asked questions
How much does static site hosting cost on thelastapi?
Hosting is not charged today: builds and live sites are recorded in usage at $0. Pricing is not decided.
How many static deployments can I create in a day?
Projects are limited to 30 builds per UTC day. You can check your remaining build count using `GET /v1/usage`.
What happens to my old files when I run a rollback?
Deployments maintain full file manifests, and previous versions remain stored for as long as your project exists. Running `vibiz rollback` switches production back to the previous deployment manifest immediately.
Which files does the CLI skip when deploying a static site?
The CLI refuses to upload `node_modules`, `.git`, `.next`, `dist`, `.turbo`, `vibiz.json`, `.env*` files, and credentials like `*.pem`, `id_rsa`, and `.npmrc`.