🚀 Introduction
- Before you begin, make sure you have Python on your system. If you don’t have them yet, you can download them from the official Python website.
- Next, you will need to create an account on Square Cloud, which can be done through the login page. You can use your email, GitHub, or both to create the account.
- Finally, you need to have an active paid plan on your account. You can view our plans and purchase one according to your needs here.
⚙️ Creating the squarecloud config file
Learn about: how to make the configuration file for Square Cloud.
The squarecloud.app file is a configuration file that will be used to
configure your application; it will be used to define the name, description,
version, main file, among other things.
▶️ Start Application
-
If the
STARTfield is not defined in the configuration file, Square Cloud will runpython MAINto execute the Python file specified in theMAINfield. If theSTARTfield is defined in the configuration file, the value in theSTARTfield will be executed directly. For more information on configuration file parameters, visit configuration parameters. -
Square Cloud uses
pip installto install all dependencies listed in therequirements.txt.
🖥️ Preparing Your Python Project
📁 Essential Configuration Files
When preparing your Python project for deployment on Square Cloud, ensure that you include your configuration file (squarecloud.app/.config) and the essential files of your application in a zip file.
The configuration (
squarecloud.app/.config) file must be located in the root of the zip file. Otherwise, Square Cloud will not be able to find it during deployment.🗑️ Files to Exclude Before Uploading
ffmpeg: This software is pre-installed in the Square Cloud environment, so there’s no need to include this folder in your project..venv: This folder contains the virtual environment for your project. Square Cloud provides an isolated environment, so this folder is not required.poetry.lock: Since Square Cloud does not currently support Poetry, this file should be excluded to avoid any potential issues during deployment.
🤔 Why Exclude These Files?
Excludingffmpeg, .venv and poetry.lock is important for several reasons:
- Clean Environment: Square Cloud creates a fresh environment for your project. Including these files is unnecessary and could lead to conflicts with the cloud environment’s configurations.
- Efficiency: Removing these files reduces the size of your upload, making the process faster and more streamlined.
-
Compatibility: Excluding
poetry.lockensures that there are no compatibility issues, as Square Cloud relies onrequirements.txtfor installing dependencies.
📄 Required Files
- main.py (Example of main file).
- requirements.txt (Dependency file).
- OR [pyproject.toml] (Dependency file).
- squarecloud.app (file that contains the Square Cloud configuration).
💡 Troubleshooting
The main file is invalid or corrupted
The main file is invalid or corrupted
This error occurs when the file defined as “main” for your application in
the configuration file does not exist, is written incorrectly, or the path
is incorrect. If your main file is inside a folder, for example, you should
enter
folder/file.js.Bad Memory
Bad Memory
The minimum amount of RAM required to host a bot is 256MB, and for a
website/API, it’s 512MB. However, depending on the size and complexity of
your application, it may be advisable to allocate a larger amount of RAM to
avoid the
LACK_OF_RAM
error.
📤 Uploading Project to Square Cloud
After preparing your project files, you can now upload them to Square Cloud and host your project.- Dashboard Upload
- CLI Upload
Access the Square Cloud
Dashboard and upload your project
files.


