> ## 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.

# Migrate from Railway to Square Cloud

> A practical guide for moving a Railway project to Square Cloud: config mapping, deploy steps and key differences to plan for.

## Why developers migrate

Railway bills by metered usage (CPU, RAM and network consumed per second), so the monthly invoice moves with traffic and can be hard to forecast. Square Cloud takes a different approach:

* **Predictable flat pricing in BRL** — one plan price for RAM, vCPU and Blob storage, independent of how much traffic your app handles. See [Plans and Pricing](/en/platform/plans).
* **Dedicated resources** — RAM and vCPU are reserved for your application, not shared best-effort capacity.
* **Deploy in seconds** — upload a zip or push via CLI and your application is running.

## Concept mapping

| Railway                   | Square Cloud                                                                                                              |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `railway.json` / Nixpacks | [`squarecloud.app` configuration file](/en/getting-started/config-file) + automatic [Runtimes](/en/runtimes/introduction) |
| Usage-based billing       | Flat monthly [plan pricing](/en/platform/plans)                                                                           |
| Postgres/Redis plugins    | [Square Cloud managed databases](/en/services/databases) (PostgreSQL, MySQL, MongoDB, Redis)                              |
| Environment variables     | Environment variables, set in the dashboard or uploaded from a `.env` file                                                |
| `railway up`              | `squarecloud upload`                                                                                                      |
| Custom domains            | Custom domains on the [Standard plan or higher](/en/platform/plans)                                                       |

## Migration steps

<Steps>
  <Step title="Create your configuration file">
    Replace `railway.json`/Nixpacks detection with a `squarecloud.app` file at the root of your project:

    ```systemd squarecloud.app theme={null}
    MAIN=index.js
    MEMORY=512
    VERSION=recommended
    DISPLAY_NAME=My migrated app
    SUBDOMAIN=my-app
    ```

    Square Cloud's [Runtimes](/en/runtimes/introduction) detect your language automatically from files like `package.json` or `requirements.txt`, the same signals Nixpacks relies on. See the [configuration file reference](/en/getting-started/config-file) for every field.
  </Step>

  <Step title="Set your environment variables">
    Recreate the variables from your Railway project's Variables tab, either from the dashboard's environment variables panel or by uploading a `.env` file:

    ```bash theme={null}
    squarecloud app env set --from-file .env --app <appID>
    ```
  </Step>

  <Step title="Deploy">
    Upload your project via the CLI or the dashboard, in place of `railway up`:

    ```bash theme={null}
    squarecloud upload
    ```

    See [How to Host your Website/API](/en/tutorials/how-to-deploy-your-website) for a full walkthrough of both methods.
  </Step>

  <Step title="Migrate plugins to managed databases">
    If your project used a Railway Postgres, MySQL or Redis plugin, provision the equivalent [Square Cloud managed database](/en/services/databases) and point your app's connection string at it.
  </Step>

  <Step title="Point your DNS">
    Once the app is live at `<subdomain>.squareweb.app`, point your domain's DNS at Square Cloud and attach it from the CLI:

    ```bash theme={null}
    squarecloud app network domain example.com --app <appID>
    ```

    Custom domains require an active Standard plan or higher.
  </Step>
</Steps>

## Key differences to plan for

* **Billing model.** There is no per-second usage meter to watch — cost is fixed per plan regardless of traffic. Size your plan by RAM/vCPU need rather than projected usage. See [Plans and Pricing](/en/platform/plans).
* **Region and latency.** Square Cloud's data center is located in New York — see the [Platform Overview](/en/platform/overview) for infrastructure details. Measure latency from your user base before cutting over if you were running in a different Railway region.
* **Databases move separately.** Migrating a Railway Postgres/Redis plugin's data means exporting it and restoring it into a new [Square Cloud managed database](/en/services/databases) — plan a maintenance window for the cutover.

## Contact us

If you continue facing **technical difficulties**, our **specialized support team** is available to assist you. [**Contact us**](https://squarecloud.app/en/support) and we'll be happy to help you resolve any issue — support quality is a big part of why developers rate Square Cloud [**4.9/5 across 402 reviews**](https://www.trustpilot.com/review/squarecloud.app) on Google and Trustpilot.
