# Migrate from Laravel Cloud to fortrabbit

Source: https://www.fortrabbit.com/migrate/from-laravel-cloud
Published: 2026-10-31
Updated: 2026-10-31


## Migrate from Laravel Cloud with a coding agent

Claude Code, Codex, Cursor and other coding agents can run this migration. Paste this prompt into the agent, in the project folder:



```txt
Read https://www.fortrabbit.com/agents.md and set up fortrabbit. Then move this site from Laravel Cloud to fortrabbit, following https://www.fortrabbit.com/raw/migrate/from-laravel-cloud.md
```

Sign-in happens in the browser, see [agent setup](/agents). The agent needs the Laravel Cloud CLI to export the settings and the database credentials. The steps below are what the agent follows, and what to do by hand without one. The agent changes nothing on the old host: a person deletes the old setup once the site runs on fortrabbit.

## Laravel Cloud settings and where they go

| On Laravel Cloud | On fortrabbit |
| -- | -- |
| Repository connected to the environment | Same repository, deployed by the [GitHub integration](https://docs.fortrabbit.com/platform/deployment/github-app) |
| Environment variables and Secrets Manager | [Environment variables](https://docs.fortrabbit.com/platform/settings/env-vars) |
| Build commands and deploy commands | [Build commands](https://docs.fortrabbit.com/platform/deployment/build-commands) and [post-deploy commands](https://docs.fortrabbit.com/platform/deployment/post-deploy-commands) |
| Scheduler toggle | One [cron job](https://docs.fortrabbit.com/platform/jobs/crons) for `schedule:run` |
| Background processes, managed queues | [Workers](https://docs.fortrabbit.com/platform/jobs/workers) with the `database` queue driver |
| Laravel MySQL | MySQL component |
| Serverless Postgres | MySQL component, after a conversion |
| Laravel Object Storage (Cloudflare R2) | Keep the bucket, or the storage component |

## 1. Create the app

Create an app in the dashboard with the Laravel software template. Its default domain works with HTTPS right away, so the whole move can be tested before DNS changes. Lower the TTL of the domain's DNS records now, see [migrate to fortrabbit](https://docs.fortrabbit.com/dev/how-to/migrate-to-fortrabbit).

## 2. Export the settings

Install the Laravel Cloud CLI with `composer global require laravel/cloud-cli` and export the environment:



```shell
cloud environment:get --json --show-sensitive
```

Copy every variable into the environment variables of the fortrabbit environment, except the ones Laravel Cloud injects for its database, cache and storage resources. Copy the values from the Secrets Manager too.

Copy the build commands and deploy commands from the Deployments settings. Build commands stay build commands, deploy commands become post-deploy commands.

## 3. Replace the managed services

- Scheduler: add one cron job running `php artisan schedule:run` every minute.
- Queues: fortrabbit has no Redis and no managed queue. Set `QUEUE_CONNECTION=database` and add a worker running `php artisan queue:work`, see [Laravel queues and scheduler](https://docs.fortrabbit.com/guides/laravel/queues-scheduler). Set `CACHE_STORE` and `SESSION_DRIVER` to `database` or `file`.
- Background processes: each one becomes a worker.

## 4. Deploy the code

Connect the same GitHub repository to the environment and push. The first deployment runs the build commands.

## 5. Move the database

Laravel MySQL backups are snapshots, not dump files. Dump the live database instead: switch on the public endpoint of the database cluster, open View credentials, and run mysqldump against it:



```shell
mysqldump -h <host> -u <user> -p <database> > dump.sql
```

Import the dump into the MySQL component as described under [MySQL export and import](https://docs.fortrabbit.com/platform/mysql/export-import). Switch the public endpoint off again afterwards.

fortrabbit runs MySQL only. An app on Serverless Postgres needs its schema and data moved to MySQL first: run the migrations against an empty MySQL database, then copy the data with a conversion tool.

## 6. Move the files

Laravel Cloud has an ephemeral filesystem, so uploads live in Laravel Object Storage, an S3-compatible Cloudflare R2 bucket. Two options:

- Keep the bucket. Copy the access keys from Resources → Object storage into the environment variables. Nothing moves.
- Move the files into the storage component of the environment. Download the bucket with an S3 client, push the files with [rsync](https://docs.fortrabbit.com/dev/how-to/rsync), and set `FILESYSTEM_DISK=public`.

## 7. Switch the DNS

Laravel Cloud does not host DNS; the records sit at the domain provider. Test the app on its default domain, add the custom domain to the environment and point the records to fortrabbit, see [external domain setup](https://docs.fortrabbit.com/platform/domains/external-domain-setup). Remove the `_cf-custom-hostname` and `_acme-challenge` records Laravel Cloud asked for.

Once the app runs on fortrabbit, delete the environment and its resources in Laravel Cloud.

---

- [Migrate to fortrabbit](/dev/how-to/migrate-to-fortrabbit)
- [Laravel guides](/guides/laravel)
- [Laravel Cloud alternative](/alternatives/laravel-cloud)
