> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squarecloud.app/llms.txt
> Use this file to discover all available pages before exploring further.

# After Your First Deploy: Update, Logs, Restart and Snapshots

> What to do once your app is online on Square Cloud: update the code with a commit, read logs, restart, change RAM and settings, take snapshots and delete an app.

Your application is online. This page covers what comes next: updating the code, reading logs, restarting, changing settings, taking snapshots and deleting. Every task works from the dashboard and from the [CLI](https://docs.squarecloud.app/en/cli-reference/quickstart.md).

An upload creates the application once. Every update after that is a commit, which keeps the application's ID, address and settings. On the running application you read logs, restart and take snapshots.

Upload creates the application. Commit updates it and keeps its ID, address and settings.

## Upload once, commit after

This is the one rule to remember:

| | Upload | Commit |
| :- | :- | :- |
| **What it does** | Creates a **new** application, with a new ID | Sends files to an application that **already exists** |
| **When to use it** | The first deploy | Every update after it |
| **What is kept** | Nothing: it starts from the zip | The ID, the address, the settings and the environment variables |

> [!WARNING]
>
> Uploading the project again does not update your application: it creates a **second one**, which takes more of your plan's RAM. To update, commit.

## See logs and status

> [tab] Dashboard
>
> Open the application. **Overview** shows its status and resource usage, and the **Realtime console** streams what the application prints. **Logs** keeps the saved output.

> [tab] CLI
>
> ```bash theme={"system"}
> squarecloud app status
> squarecloud app logs
> squarecloud app logs -f    # follow the logs as they arrive
> ```

The console only shows output: there is no shell to type commands into. If the application stopped and the log doesn't say why, check the [limit statuses](https://docs.squarecloud.app/en/platform/limitations-and-restrictions.md#limit-exceeded-statuses) and the [troubleshooting guide](https://docs.squarecloud.app/en/platform/troubleshooting/app-wont-start.md).

## Update your code

> [tab] Dashboard
>
> Open **Files** and click **Commit files**. Send the changed files or a `.zip` of up to 100 MB, which is extracted in place, and tick the option to restart the application so the new code runs.

> [tab] CLI
>
> From the project folder:
>
> ```bash theme={"system"}
> squarecloud commit --restart
> ```
>
> The CLI zips the folder, leaving out what [`squarecloud.ignore`](https://docs.squarecloud.app/en/getting-started/squarecloud-ignore) lists, and sends it to the application whose ID the first upload wrote into your configuration file. See [`squarecloud commit`](https://docs.squarecloud.app/en/cli-reference/deploy#squarecloud-commit).

> [tab] GitHub
>
> Link the repository once and every push to the chosen branch deploys by itself. See [GitHub deploys](https://docs.squarecloud.app/en/cli-reference/github-deploys.md). To run tests or a build first, deploy from a pipeline: see [CI/CD](https://docs.squarecloud.app/en/cli-reference/ci-cd.md).

A commit replaces the files it sends and leaves the others where they are. The new code only runs after a **restart**. [What is kept](https://docs.squarecloud.app/en/platform/how-it-works.md#what-is-kept) shows what a restart, a commit and a restore do to the application's files.

You can also edit a file in place in the dashboard's file manager, or from the [VS Code extension](https://docs.squarecloud.app/en/vscode-extension/features.md).

## Start, stop and restart

> [tab] Dashboard
>
> The **Start**, **Stop** and **Restart** buttons are on the application's **Overview**.

> [tab] CLI
>
> ```bash theme={"system"}
> squarecloud app restart
> squarecloud app stop
> squarecloud app start
> ```

A stopped application keeps its files and settings, and keeps its share of your plan's RAM reserved. Applications don't sleep when idle: one that is running stays running.

## Change RAM and settings

**Settings** → **General** changes the name, the description, the start command, the memory and Auto Restart. The RAM you give an application comes out of your plan's total: see [how the RAM is shared](https://docs.squarecloud.app/en/platform/plans.md).

The main file, the runtime and its version can't be changed on an existing application. To change one of them, upload the project as a new application and delete the old one. The [configuration file reference](https://docs.squarecloud.app/en/getting-started/config-file.md#configuration-parameters) lists what is editable.

## Environment variables

Tokens, passwords and connection strings live in **Settings** → **Environment Variables**, not in the code. They survive restarts and commits. After changing one, restart the application to load it. See [Environment variables](https://docs.squarecloud.app/en/platform/environment-variables.md).

## Snapshots

A snapshot is a copy of the application's files at one moment, which you can download as a `.zip` or restore.

* **Take one** before a risky change: open **Snapshots** and click **Take snapshot**, or run `squarecloud app snapshot create`.
* **Restore** replaces the application's files with the snapshot's and starts the application again. What was written after the snapshot is gone.
* **Automatic daily snapshots** of applications come with the Pro and Enterprise plans. On Hobby and Standard, take them yourself.
* **Retention:** the newest snapshot of each application is kept for 30 days; older ones for 7 days.

Manual snapshots have a daily allowance that grows with your plan. See [`squarecloud app snapshot`](https://docs.squarecloud.app/en/cli-reference/snapshots) for the commands.

## Grow

* **Your own domain:** from the Standard plan, attach a domain you already own to a website. See [Website hosting](https://docs.squarecloud.app/en/services/sites.md).
* **More than one application on the same domain:** balance the traffic between them with a [load balancer](https://docs.squarecloud.app/en/services/load-balancer.md).
* **A database:** create a managed [PostgreSQL, MySQL, MongoDB or Redis](https://docs.squarecloud.app/en/services/databases.md) and put its connection URL in an environment variable.
* **Files:** store uploads and media in [Blob Storage](https://docs.squarecloud.app/en/services/blob.md) instead of the application's disk.

## Delete an application

**Settings** → **Danger Zone** → **Delete application**, or `squarecloud app delete`. A deleted application cannot be brought back as it was.

> [!WARNING]
>
> Deleting from the dashboard takes no snapshot. Take one first if you may need the files again.

## Frequently asked questions

> [accordion] I uploaded again and now I have two applications. What do I do?
>
> Delete the one you don't want, in its **Settings** → **Danger Zone**. From now on, update with a commit: **Files** → **Commit files** in the dashboard, or `squarecloud commit`.

> [accordion] I committed, but the old code is still running.
>
> A commit doesn't restart the application. Restart it, or commit with the restart option (`squarecloud commit --restart`).

> [accordion] Does my application sleep when nobody is using it?
>
> No. An application runs around the clock until you stop it. Turn on Auto Restart to bring it back after a crash.

> [accordion] Can I run commands on the server?
>
> No. There is no shell: the console only shows what your application prints. Dependencies are installed from your dependency file at start, and the start command is set by `START` in the configuration file or in **Settings** → **General**.

> [accordion] How do I download my whole project?
>
> Take a snapshot and download it: it is a `.zip` of the application's files.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.