Articles on: Websites & APIs

How to deploy a static site (HTML, React, Vite)?

1. Prerequisites

Before uploading your site, verify that you have:

  • Square Cloud Account: Create your account via the Registration Page (Email or GitHub).
  • Active Plan: A paid plan is required for hosting. Check the pricing here.



Note: Square Cloud has native support for static sites with a premium CDN included, ensuring your site loads fast anywhere in the world.


2. Required File Structure

Make sure your project has at least the main file at the root:


  • index.html: The main file of your site. Or vite.html, if you use the Vite framework.
  • 404.html: (Optional) Custom page for "Not Found" errors.



3. Preparing the Project

Before submitting, verify that all links to CSS files and images are working locally.


Important Notice: If you are uploading directly through the panel (website), you don't need to worry about configuration files right now, as the system will automatically create the squarecloud.app file for you if you upload via the dashboard.



4. How to Host (Upload)

With the files ready, you have two main paths to put your site online:


Option A: Via Dashboard (Easiest)

  1. Access the Square Cloud dashboard.
  2. Click on Upload Application.
  3. Select your project folder or drag the .zip file.
  4. Enter the application name, point to your main file, and check web publishing to define your squareweb.app subdomain.


Tip: Static projects do not need a running "server" (like Node.js or Python); Square Cloud itself already configures an nginx server for you.


Option B: Via CLI


  1. Install the CLI:
npm i -g @squarecloud/cli
  1. Authenticate in the CLI: Get your API token on the My Account page by going to the Authentication section and requesting the API key; next, authenticate in the CLI with the following command.
squarecloud auth login
  1. Create your configuration file: the configuration file, squarecloud.config or squarecloud.app, must be present in your project
  2. Upload:
squarecloud upload
  • Or if you created the zip:
squarecloud upload --file <path/to/zip>

Updated on: 05/26/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!