Articles on: Websites & APIs
This article is also available in:

Deploying 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, Discord, GitHub or Google).
  • 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. For React/Vite, run npm run build locally and zip the contents of the output folder (e.g. dist/), not the folder itself; rename index.html to vite.html for SPA routes. Then drag the .zip file. Websites need at least 512 MB of RAM.
  4. Enter the application name, point to your main file, and enable Web Publication to define your squareweb⁠.app subdomain (this must be set on the first upload).


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: run squarecloud auth login. The CLI shows a short code and opens the authorization page in your browser; approve it and the CLI saves its own key. In CI, use --token <key> (a key created under My Account > Security) or the SQUARECLOUD_API_KEY variable.
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: 10/04/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!