Skip to main content

Introduction

On Square Cloud, a website or an API is an application with a SUBDOMAIN whose server listens on port 80. This guide covers the configuration that every stack shares and the deploy itself; the framework guides at the end have the details of each one.

Technical prerequisites

  • Square Cloud Account: Create your account through the signup page, using your email address for registration.
  • Active plan: It’s necessary to have an active plan to ensure adequate resources and optimized performance. Check our available plans and choose the most suitable for your needs.

Square Cloud configuration file

Learn about: how to create the configuration file for Square Cloud.

The squarecloud.app file is an essential configuration file that will be used to configure your application on Square Cloud. It defines name, description, version, main file, among other fundamental configurations.

Essential parameters for websites

Your server must listen on port 80 and on host 0.0.0.0 (all network interfaces): Square Cloud delivers your subdomain’s traffic there. It sets the PORT (80) and HOST (0.0.0.0) environment variables for you, so read the port from PORT and keep a fallback of 80:
Many frameworks, such as Next.js and Nuxt, already read PORT on their own. Static websites don’t need a server or a START parameter at all. Main parameters of the squarecloud.app configuration file:
  • SUBDOMAIN: For website hosting, define this parameter with your desired subdomain. Set it on the first upload: an application uploaded without a subdomain can’t get one later.
  • START: Custom startup command (when necessary).
  • MEMORY: RAM allocated to your application, in megabytes. Websites and APIs need at least 512. Curious why there is a minimum value? See why RAM minimums exist.
The website URL will be: my-subdomain-parameter.squareweb.app

Configuration examples

Example 1: Static website without custom startup command
Example 2: Next.js website with a custom startup command
Run npm run build on your machine first and include the .next folder in the zip: Square Cloud doesn’t install devDependencies, so the build can’t run on the server. With a START command, RUNTIME=nodejs picks the Node.js runtime and no MAIN file is needed. For framework-specific details, see the Next.js guide.

Deploy

Zip the project with the configuration file at the top level and send it, from the dashboard or with one command from the CLI.

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.
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.
Uploading application to Square Cloud
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 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.
App not starting? See the Troubleshooting guide for the most common causes and fixes.

Via CLI

To use this method, your project needs a configuration file named squarecloud.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 squarecloud.ignore lists, and uploads it:
To upload a zip you created yourself, pass it with --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.
App not starting? See the Troubleshooting guide for the most common causes and fixes.
To update the site later, send a commit instead of a new upload: see After your first deploy.

Custom domain

To serve your website from your own domain (e.g., mysite.com) instead of mysite.squareweb.app, you need the Standard plan or higher. Follow how to set up your own domain in the help center.

Support for multiple technologies

Square Cloud offers comprehensive support for various web development technologies, providing flexibility in choosing the most suitable tech stack for your project.

React

Learn how to host your React website on Square Cloud.

Next.js

Learn how to host your Next.js website on Square Cloud.

NestJs

Learn how to host your NestJs application on Square Cloud.

Vite

Learn how to host your Vite website on Square Cloud.

Vue

Learn how to host your Vue website on Square Cloud.

Express

Learn how to host your Express API on Square Cloud.

Flask

Learn how to host your Flask application on Square Cloud.

Django

Learn how to host your Django application on Square Cloud.

FastAPI

Learn how to host your FastAPI application on Square Cloud.

Lavalink

Learn how to host your Lavalink server and stream high-quality music to your Discord bot.

Next steps

App won't start

Fix port conflicts, missing modules and other startup failures.

Environment variables

Keep API keys and connection strings out of your code.

Managed database

Create a database for your website or API.

Contact us

If you continue facing technical difficulties, our specialized support team is available to assist you. Contact us and we’ll be happy to help you resolve any issue: support quality is a big part of why developers rate Square Cloud 4.9/5 across 402 reviews on Google and Trustpilot.