Skip to main content

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

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.
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.
When this parameter is set, the runtime environment will be inferred based on the main file extension
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.
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.

DISPLAY_NAME [*]

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

DESCRIPTION

Type: String | Editable: ✅ | Limit: 280 charsDefines the description of your application.

AUTORESTART

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

SUBDOMAIN

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

RUNTIME

Type: String | Editable: ❌Defines a runtime environment manually.
Check the accepted values and environments below.
If you set this parameter, you don’t need to set MAIN; instead, set a custom START command.

START

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

Configuration examples for bots

Here are some examples of configuration for bots:

Configuration examples for sites

Here are some examples of configuration for websites:
The site URL will be: mysite.squareweb.app
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)