Professional Phoenix Application Development
- Before starting, make sure you have Erlang/OTP and Elixir installed on your system. If you don’t have them yet, download them from the official Elixir installation guides.
- Phoenix is built on top of Elixir and the Erlang VM (BEAM). Ensure your environment matches the Phoenix version requirements in the Phoenix docs.
- Next, create an account on Square Cloud through the signup page and ensure you have an active paid plan appropriate for your application’s needs here.
Phoenix Configuration
Install the Phoenix project generator if you don’t already have it:http://localhost:4000.
Creating the Square Cloud Configuration File
Learn more about: how to create the configuration file for Square Cloud.
The
squarecloud.app file defines your application’s name, description, version, entry point, and other essential settings.Configuring the START Field
Phoenix applications typically run as releases in production. A common start command after building a release is:START field in squarecloud.app to the command you use to run the release (for example the full sequence or a script that performs the release and starts the app).
Purchasing a Plan Before Uploading the Project
Before deploying your Phoenix project to Square Cloud, ensure you have an active plan that meets your application’s CPU and memory needs. Phoenix is highly concurrent and benefits from CPU and memory. For most apps the Standard plan is a good starting point; high-traffic or CPU-intensive applications should use Pro.Not sure how much RAM and CPU a Phoenix app needs? It depends on concurrency, pooled connections and background jobs. Start with Standard for typical web apps and scale up if you observe resource limits.
Building Phoenix for Production
Example production build steps (adjust for your project and asset toolchain):MIX_ENV=prod mix phx.server, but releases are recommended for production stability.
When using squarecloud.app, point the START command to the final start step (release binary) or to a deployment script that runs the above steps.
Uploading the Project to Square Cloud
After preparing your project, you can upload it to Square Cloud using the dashboard or the CLI.- Upload via Dashboard
- Upload via CLI
Access the Square Cloud Dashboard and upload your project files.

Additional Resources
Official docs and references:- Phoenix: https://hexdocs.pm/phoenix
- Elixir: https://elixir-lang.org
- Releases: https://hexdocs.pm/mix/1.14.0/Mix.Tasks.Release.html
Troubleshooting
Custom Domain
To use a custom domain (e.g.,
mysite.com) instead of the default URL https://mysite.squareweb.app/, you need the Standard plan or higher. The subdomain is defined by the SUBDOMAIN field in the configuration file. See: How to set up your custom domain.Minimum RAM Requirements
Minimum: 512MB RAM for simple websites/APIs. For sites with frameworks (Next.JS, React, Vue, Angular, etc.), we always recommend at least 1GB RAM. For larger applications, use more RAM to avoid LACK_OF_RAM error and ensure performance.
Could not find this site.
Check if the subdomain/domain matches what's configured in the SUBDOMAIN field or in the custom domain settings. If you just uploaded the site, wait up to 60 seconds for Square to enable first access.

Site took too long to respond...
Check if you correctly configured port 80 and host 0.0.0.0 in the application. We recommend using Square's forced environment variables: PORT and HOST from the 
.env file.

