How to use Auto Restart on Square Cloud
What Auto Restart is
Auto Restart is an exclusive Square Cloud feature that automatically restarts your application if it crashes, helping keep it available without any manual action.
How to enable it
In your squarecloud.app (or squarecloud.config) file, add:
AUTORESTART=true
How it works
When AUTORESTART is enabled and your app crashes, Square Cloud runs a series of checks before restarting it:
- The app crashed or froze.
- The app's uptime was more than 60 seconds.
- The app's exit status was 1.
- The app hasn't restarted in the last 60 minutes.
- The logs don't contain an excluded error — a SyntaxError, a non-existent version, a missing module, or an invalid dependency file. In those cases Auto Restart will not restart the app, because restarting wouldn't fix the problem.
If all the conditions are met, the app is restarted automatically. There is a 60-minute cooldown between automatic restarts.
Best practices
- Review your logs regularly to understand why the app is crashing — Auto Restart keeps it online, but it doesn't fix the root cause.
- Keep your
MAINfile and memory allocation correct and up to date.
Related
For more ways to maximize availability, see How to keep bots online 24/7. If your app keeps crashing on boot, the logs usually point to the cause — see My application won't start: Verifying the start script.
Updated on: 06/13/2026
Thank you!
