Professional Flask Project Development
To deploy robust web applications using Flask on Square Cloud, it’s essential to follow development best practices and production environment configuration.Essential Technical Prerequisites
- Python and pip: Make sure Python and pip are installed on your system. If you don’t have them, download from the official Python website and Pip.
- Square Cloud account: Create your account via the signup page using your email address.
- Active paid plan: A paid plan is required to ensure adequate resources for Flask applications. Check our available plans and choose the one that fits your needs.
Flask Environment Setup
With Python and pip installed, create your Flask project. First, install the required dependencies:Terminal
app.py
) and add the following code to implement a basic Flask application:
app.py
Production Environment Setup with Waitress
For professional production deployment, it is recommended to use the Waitress WSGI server, which provides improved stability and performance for Flask applications.app.py
Dependency Management with requirements.txt
Therequirements.txt
file is an essential component that lists all external libraries required for your project. Make sure to include all used dependencies, excluding Python’s built-in modules such as random
and datetime
. This file must be included when submitting your application to Square Cloud.
requirements.txt
Square Cloud Configuration File
Learn about: how to create the configuration file for Square Cloud.
The
squarecloud.app
file is an essential configuration file used to set up your application on Square Cloud. It defines the name, description, version, main file, and other fundamental settings.START Field Configuration
In the Square Cloud configuration file, the START field is optional and only required if you are using a custom script to start the website or API. In the provided example, the START field is not necessary.Purchasing a Plan Before Uploading Your Project
Before uploading your project to Square Cloud, it’s important to understand that a plan purchase is required. The plan you choose will depend on the resources your application needs. See our available plans.Wondering how much RAM and CPU your plan needs to host a Flask application? Don’t worry — we’re here to help. Flask is known for being lightweight, especially for small projects or learning purposes. Our Standard plan offers 4GB of RAM and 4vCPU, which should be sufficient for most Flask applications. However, if you’re working on a larger project and need extra stability, we recommend considering our Pro plan. With additional resources, you can maintain stability during traffic spikes. To purchase, just click here.
Uploading Your Project to Square Cloud
After preparing all project files, upload them to Square Cloud to host your application professionally.Go to the Square Cloud Dashboard and upload your project files.

Additional Resources and Documentation
For more detailed information about Flask and its advanced tools, visit the official Flask documentation. There you will find in-depth technical guides, specialized tutorials, and full API documentation to make the most of Flask’s features.Troubleshooting
Domínio Personalizado
Para usar domínio personalizado (ex:
meusite.com
) ao invés da URL padrão https://meusite.squareweb.app/
, você precisa do plano Standard ou superior. O subdomínio é definido pelo campo SUBDOMAIN no arquivo de configuração. Veja: Como configurar seu domínio personalizado.Requisitos Mínimos de RAM
Mínimo: 512MB de RAM para websites/APIs simples. Para sites com frameworks (Next.JS, React, Vue, Angular, etc.), sugerimos sempre pelo menos 1GB de RAM. Para aplicações maiores, use mais RAM para evitar erro LACK_OF_RAM e garantir performance.
Não foi possível encontrar esse site.
Verifique se o subdomínio/domínio corresponde ao configurado no campo SUBDOMAIN ou nas configurações de domínio personalizado. Se você acabou de enviar o site, aguarde até 60 segundos para a Square liberar o primeiro acesso.

Site demorou demais para responder...
Verifique se configurou corretamente a porta 80 e host 0.0.0.0 na aplicação. Recomendamos usar as variáveis de ambiente forçadas da Square: PORT e HOST do arquivo 
.env
.