What is the configuration file?

The configuration file is a file that contains your application’s parameters, such as the main file, memory, version and other settings. This file is used to configure and deploy your application on the Square Cloud platform.
squarecloud.app
MAIN=main_file.js
DISPLAY_NAME=I am the configuration file
MEMORY=512
VERSION=recommended

Creating the configuration file

Creating the configuration file is very simple: just create a file named squarecloud.app or squarecloud.config and add the configuration parameters inside it.
1

Choose extension

The configuration file can have two extensions: .app or .config. You can use squarecloud.app or squarecloud.config, whichever you prefer. Tip: use .app to help promote Square Cloud. 🥰😂
On macOS, we recommend using the .config extension.
Note: .app or .config refers to the file extension, not the file name.
2

Create file

Create a file with the selected extension and add the configuration parameters inside it.

Configuration parameters

Below you can see all the configuration parameters available for your configuration file.
ParameterTypeEditableLimitUsage
MAIN*String32 charsDefines the main application file. Ex.: index.js, main.py, etc.
VERSION*String-Language version (Ex.: recommended).
MEMORY*Integer-Amount of memory in megabytes.
DISPLAY_NAME*String32 charsDisplay name of the application.
DESCRIPTIONString280 charsDescription/metadata of the application.
AUTORESTARTBoolean-Auto-restart (true or false).
STARTString256 charsCustom start command.
SUBDOMAINString63 charsWebsite subdomain (if applicable).
Editable parameters (✅) can be modified in the dashboard after deployment. Non-editable (❌) parameters require a full reupload of the application to make changes.

Detailing the configuration parameters

Below you can see the configuration parameters you can use in your configuration file.

MAIN [*]

Type: String | Editable: ❌ | Limit: 32 charsDefines the main application file.
MAIN=index.js
MAIN=src/loaders/index.js
This setting is IGNORED if you use the START parameter.

MEMORY [*]

Type: Integer | Editable: ✅ | Limit: Minimum 256MB (bot), 512MB (site)Defines the amount of memory your application will use.
MEMORY=256
The value must be specified in megabytes (MB).

VERSION [*]

Type: String | Editable: ❌ | Values: recommended, latest or specific version
We recommend using recommended for optimal stability.
Defines the language version for your application.
VERSION=recommended
Languagerecommendedlatest
JavaScript [Node.js]22.18.024.5.0
Python3.13.63.13.6
JavaJDK 23JDK 25
Elixir1.18.41.18.4
Rust1.89.01.89.0
PHP8.4.118.4.11
Go1.24.61.24.6
C#9.0.19.0.1

DISPLAY_NAME [*]

Type: String | Editable: ✅ | Limit: 32 charsDefines the display name of your application.
DISPLAY_NAME=Admin BOT

DESCRIPTION

Type: String | Editable: ✅ | Limit: 280 charsDefines the description of your application.
DESCRIPTION=This bot is designed to help you with your daily tasks.

AUTORESTART

Type: Boolean | Editable: ✅ | Values: true, false | Default: falseDefines whether the application should automatically restart on failure.
AUTORESTART=true

SUBDOMAIN

Type: String | Editable: ✅ | Limit: 63 chars | Default: undefinedDefines the subdomain for your site (web applications only).
SUBDOMAIN=mysite
The final URL will be: mysite.squareweb.app

START

Type: String | Editable: ✅ | Limit: 256 chars | Default: undefinedDefines a custom start command.
START=npm run start
This parameter overrides the default MAIN behavior.

Configuration examples for bots

Here are some examples of configuration for bots:
# Required parameters.
MAIN=index.js
MEMORY=512
VERSION=recommended
DISPLAY_NAME=Robin bot
# Example with all parameters.
MAIN=index.js
MEMORY=512
VERSION=recommended
DISPLAY_NAME=Robin bot
DESCRIPTION=This bot was created to help with your daily tasks.
START=npm run start
AUTORESTART=true

Configuration examples for sites

Here are some examples of configuration for websites:
The site URL will be: mysite.squareweb.app
# Example with all parameters.
MAIN=index.js
MEMORY=1024
VERSION=recommended
DISPLAY_NAME=My site
DESCRIPTION=My site is really cool!
SUBDOMAIN=mysite
START=npm run build && npm run start
AUTORESTART=true
next.config.js as MAIN is only used to let the system recognize the project as a JavaScript or TypeScript project (another .ts/.tsx file)
# Example for a Next.js site.
MAIN=next.config.js
MEMORY=2048
VERSION=recommended
DISPLAY_NAME=Next.js site
DESCRIPTION=This site was built with Next.js.
SUBDOMAIN=nextjs
START=npm run build && npm run start
AUTORESTART=true