The pieces
Two kinds of application
TheSUBDOMAIN line of the configuration file decides which kind you create:
HTTPS is handled for you: the certificate is issued and renewed by Square Cloud, and requests reach your server as plain HTTP on port 80.
The life of an application
1
Upload creates it
You send a
.zip with your code and the configuration file. Square Cloud picks the runtime from RUNTIME or from the extension of MAIN, creates the container with the RAM you asked for and starts it. The application gets an ID that never changes.2
It runs until you stop it
Applications don’t sleep when idle. With
AUTORESTART=true, an application that crashes is started again.3
A commit updates it
A commit sends new files to the same application. The ID, the address, the settings and the environment variables stay. The new code runs after a restart.
4
Deleting it frees the RAM
The RAM goes back to your plan’s pool. A stopped application keeps its RAM reserved.
What runs at each start
Every start, including a restart and an automatic restart, goes through the same three steps:- Environment variables are loaded. The ones you set, plus
PORT,HOSTand the others Square Cloud sets for you. - Dependencies are installed from your dependency file:
package.json,requirements.txtand so on. Node.js installs only when there is nonode_modulesfolder yet, so the first start takes longer than the next ones. - Your code starts, with the
STARTcommand or, without one, the default command of the runtime for yourMAINfile.
START, and it runs at every start. The runtimes page lists the default command and the dependency file of each language.
What is kept
Environment variables are kept through restarts and commits.
Files your application writes while it runs, such as a SQLite file, a JSON file or uploaded images, live on its 10 GB disk and survive a restart. Two things take them away: a commit that sends a file with the same name, and a snapshot restore. So:
- Keep data in a managed database and files in Blob Storage.
- If the application does write data files, list them in
squarecloud.ignore, so a commit from your machine doesn’t replace the server’s copy with an older one. - Take a snapshot before a risky change.
Resources and limits
- RAM is the one number you choose, with
MEMORY. It comes out of your plan’s pool and also sets the application’s vCPUs and bandwidth. - Disk is 10 GB per application and per database.
- Square Shield watches RAM, CPU, disk and the requests an application makes to external APIs. An application that goes over a limit is stopped, or has its requests limited, and its log says why. See the limit statuses.
Pick your tool
Every tool below manages the same applications, so you can use the one that fits each task and mix them freely:Next steps
Quickstart
Put a first application online in a few minutes.
After your first deploy
Update, restart, read logs and take snapshots.
Plans and pricing
How much RAM each plan gives you to share.
Limits
Minimum RAM, vCPUs, network, disk and the limit statuses.

