Before you begin
- A text editor for your HTML and CSS files, such as Visual Studio Code.
- A Square Cloud account: sign up with your email or GitHub.
- An active plan. See the plans and pick the one that fits your project.
Static sites and server-rendered apps
A static site is a set of files that is the same for every visitor: plain HTML pages, or the build output of a framework such as Vite, React, Vue, Angular, Astro or Gatsby. The static runtime serves those files as they are. A server-rendered app builds pages on each request, with server code such as Next.js, Nuxt, React Router or an API. It needs a process that keeps running, so it runs on a language runtime, such as the Node.js runtime, with aMAIN file or a START command.
If your framework can do both, a static build is the lighter choice. Each framework guide shows which options it supports.
Configure Square Cloud
If you upload your application through the dashboard, you can skip this section: the dashboard creates the
squarecloud.app configuration file for you.Configuration file reference
The
squarecloud.app file tells Square Cloud how to run your application: its main file, memory, runtime version, name and, for a website, its subdomain.MAIN that points to an HTML file selects the static runtime:
squarecloud.app
How the static runtime serves files
- The root of the ZIP is the root of your site:
about.htmlis served at/about.html, andblog/index.htmlat/blog/. /servesvite.htmlif it exists, otherwiseindex.html.- When a path does not match any file, the runtime serves
vite.htmlif it exists. This keeps client-side routes of single-page apps working on refresh, whatever the framework: rename theindex.htmlof the build tovite.html. - Without
vite.html, unknown paths return your404.html, or a default 404 page if you don’t have one. - Files are compressed on the fly, and your
squarecloud.appfile is never served.
Prepare the project
Put your files at the root of the ZIP, next tosquarecloud.app:
index.html, orvite.htmlfor a single-page app.- Your CSS, JavaScript, images and fonts, in any folder structure.
404.html, optional: the page for paths that don’t exist.
Framework guides
Each guide shows the build command, the output folder and how to publish it on the static runtime.Vite
React
Vue
Angular
Astro
Gatsby
Preact
Qwik
SolidJS
Nuxt
Troubleshooting
The Square Shield default page appears
The Square Shield default page appears
The page says “Hi, I’m Square Shield”: the runtime did not find
index.html or vite.html at the root of the ZIP. You probably zipped the build folder itself instead of its contents: zip the files inside it.A refresh on a route returns 404
A refresh on a route returns 404
Your single-page app handles routes in the browser. Rename its
index.html to vite.html so unknown paths load the app, and update MAIN.Deploy
Via dashboard
1
Access the Upload Page
Access the upload page and upload your project zip file.
2
Configure Your Environment
After uploading your zip, you will need to configure the name, main file or runtime environment and other settings for your project.
If you are uploading a web project, make sure to select “Web Publication” and set a subdomain to your project.
If you are uploading a web project, make sure to select “Web Publication” and set a subdomain to your project.
3
Deploy Your Project
Finally, click on the “Deploy” button to host your project on Square Cloud.
After deployment, you can monitor your project’s status and logs from the dashboard.
After deployment, you can monitor your project’s status and logs from the dashboard.

4
Confirm Your App Is Live
Your first deploy usually takes less than a minute. In the dashboard, wait for your application status to show as running and check the logs for any startup errors.
If you deployed a website or API, open
If you deployed a website or API, open
https://<your-subdomain>.squareweb.app in your browser: you should see your application responding. If you deployed a bot, send it a command to confirm it is online.
Via CLI
To use this method, your project needs a configuration file namedsquarecloud.app at its root. It tells Square Cloud how to run your application.
Configuration file guide
Learn how to create the
squarecloud.app configuration file that defines your application’s environment.1
Install the CLI
Install the Square Cloud CLI. If you already have it, run the same command to update it:
2
Log In
Run the command below. It opens your browser: approve the login there and the CLI is ready. There is no API key to copy. For scripts and CI, see CLI authentication.
3
Upload Your Project
From your project folder, run the command below. The CLI zips the current folder, leaving out what To upload a zip you created yourself, pass it with
squarecloud.ignore lists, and uploads it:--file:4
Confirm Your App Is Live
Your first deploy usually takes less than a minute. Check your application status and logs directly from the terminal:If you deployed a website or API, open
https://<your-subdomain>.squareweb.app in your browser: you should see your application responding. If you deployed a bot, send it a command to confirm it is online.
Next steps
Environment variables
Keep secrets and settings out of your code and read them at runtime.
Custom domain
Serve your app on your own domain, on the Standard plan and above.
Troubleshooting
Fix an app that does not start or a site that does not respond.

