Migrate from Coolify to fortrabbit
Published
Updated
🐳
From Coolify to fortrabbit.
How to move a Laravel or other PHP app from Coolify, self-hosted or Coolify Cloud, to a fortrabbit app. The code moves through Git, the settings from the environment variables tab, the database as a dump, the volumes with rsync.
Migrate from Coolify 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:
Read https://www.fortrabbit.com/agents.md and set up fortrabbit. Then move this site from Coolify to fortrabbit, following https://www.fortrabbit.com/raw/migrate/from-coolify.md
Sign-in happens in the browser, see agent setup. The agent needs SSH access to the server Coolify deploys to, for the database dump and the volumes. 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.
Coolify resources and where they go
| On Coolify | On fortrabbit |
|---|---|
| Git repository of the application | Same repository, deployed by the GitHub integration |
| Environment Variables tab | Environment variables |
| Nixpacks, Railpack or Dockerfile build | Build commands and post-deploy commands |
| Configuration → Scheduled Tasks | Cron jobs |
| Worker containers or processes | Workers |
| MySQL or MariaDB database resource | MySQL component |
| Persistent storage volumes | Storage component, files copied with rsync |
1. Create the app
Create an app in the dashboard with the software template matching the framework. 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.
2. Copy the settings
- Open the Environment Variables tab of the application and switch to Developer view: it shows all variables in
.envformat. Copy every value except the database credentials and the app URL into the environment variables of the fortrabbit environment. - Read the build: the commands of the Dockerfile or the build pack, such as
composer installandnpm run build, go into the build commands. Migrations and cache commands go into the post-deploy commands. fortrabbit builds without Docker. - Open Configuration → Scheduled Tasks. Each task becomes one cron job, such as
php artisan schedule:runevery minute. - Each queue worker, as a separate container or a process inside one, becomes a worker.
fortrabbit has no Redis. A Laravel app sets the queue, cache and session drivers to database or file, see Laravel queues and scheduler.
3. Deploy the code
Connect the same GitHub repository to the environment and push. The first deployment runs the build commands.
4. Move the database
Dump the database container over SSH on the Coolify server, or through its public port when one is enabled:
docker exec <container> mysqldump -u <user> -p<password> <database> > dump.sql
Through the public port:
mysqldump -h <server-ip> -P <public-port> -u <user> -p <database> > dump.sql
On MariaDB 11 or later, the command is mariadb-dump.
A recent scheduled backup from Coolify works too. Import the dump into the MySQL component as described under MySQL export and import. A PostgreSQL or MongoDB database needs converting to MySQL first, since fortrabbit runs MySQL only.
5. Copy the uploads
Uploads sit in a persistent storage volume of the application. Copy them out of the container with docker cp on the server, or from the bind mount path, then push them to the environment with rsync.
6. Switch the DNS
Test the app on its default domain, add the custom domain to the environment and point the records at the domain provider to fortrabbit, see external domain setup. Coolify creates DNS records only with a connected Cloudflare token: change those records in Cloudflare.
What stays on Coolify
- Docker Compose stacks with several services, and services like Redis, Meilisearch or Postgres next to the app.
- Proxy rules for Traefik or Caddy. fortrabbit runs Apache, so rewrites move into .htaccess.
Once the app runs on fortrabbit, delete the resource in Coolify, and the server when no other resource runs on it.