Docs cipi.yml Web panel API MCP Guides Compare GitHub Telegram channel
  1. Home
  2. Guides
  3. Move a Laravel app from Forge (or Ploi) to Cipi
Get started

Move a Laravel app from Forge (or Ploi) to Cipi

A step-by-step migration from Laravel Forge or Ploi to a free, open-source Cipi server: mapping each Forge feature to its Cipi equivalent, a fresh server, the app, the .env, the database, files, workers and scheduler, a DNS switch with almost no downtime, and a rollback plan.

By Updated 3 min read

This guide moves one Laravel app from a Forge (or Ploi) server to a new server running Cipi. The old server keeps running until the very last step, so you can stop at any point and nothing breaks.

Key ideas, in plain words#

TermMeaning
Cut-overThe moment traffic moves to the new server (a DNS change)
TTLHow long the world caches a DNS answer. Lower it before the move
DumpA file with the whole database, used to copy it
Rollback planHow to go back: point DNS at the old server again

Forge and Ploi features, in Cipi#

Forge / PloiCipi
Server provisioningwget -O - https://cipi.sh/setup.sh | bash on a fresh VPS
Sitecipi app create (Laravel, Node or custom)
Deploy scriptBuilt-in steps plus cipi app deploy-config, deploy.post in cipi.yml
Quick deployPush-to-deploy webhook, created with the app
Environmentcipi app env (/home/<app>/shared/.env)
Daemons / queue workerscipi worker add, cipi worker horizon enable
SchedulerOn by default per app
Databasescipi db (MariaDB, PostgreSQL)
SSL (Let's Encrypt)cipi ssl install
Backupscipi backup (local and S3, encrypted)
Monitoring, health checkscipi monitor, health checks with auto-rollback
Team accessPanel roles, API tokens with abilities
Monthly planNone: MIT licensed

Before you start#

  • Access to the Forge server (ssh forge@OLD_IP) and your DNS.
  • The app's repository and branch.
  • A new VPS with a fresh Ubuntu 24.04 or 26.04 (choose one).
  • A day before: lower the DNS TTL of the domain to 300 seconds.

1. Install Cipi on the new server#

bash
ssh root@NEW_IP
wget -O - https://cipi.sh/setup.sh | bash

Install the PHP version the app uses today, and PostgreSQL if it's on Postgres:

bash
ssh cipi@NEW_IP
sudo cipi php install 8.4
sudo cipi db install pgsql          # only if needed

2. Create the app#

bash
sudo cipi app create --user=shop --domain=shop.example.com \
    --repository=git@github.com:you/shop.git --branch=main --php=8.4

The summary shows a deploy key. Add it to the repository (GitHub → Settings → Deploy keys, read-only). With a Git provider token saved, Cipi does it for you.

3. Copy the .env#

On the old server, print it:

bash
ssh forge@OLD_IP "cat /home/forge/shop.example.com/.env"

Copy your own keys (Stripe, mail, S3, Pusher, APIs) into the new app and keep Cipi's values for the database and Redis. One exception: APP_KEY must be the old one, or encrypted data and sessions become unreadable.

bash
sudo cipi app env shop --set=APP_KEY=base64:OLD_KEY…
sudo cipi app env shop --set=STRIPE_SECRET=sk_live_…
sudo cipi app env shop                  # or paste the rest in the editor
Keep from CipiBring from Forge
DB_*, REDIS_*, CIPI_*APP_KEY, mail, payments, storage, third-party APIs
APP_URL (switched to https by cipi ssl install)Custom keys your code reads

4. Deploy once#

bash
sudo cipi deploy shop

Migrations create an empty schema; the data comes next. If your Forge deploy script ran extra commands, add them:

bash
sudo cipi app deploy-config shop --extra-artisan=event:cache,icons:cache
sudo cipi app deploy-config shop --node-build='npm ci && npm run build'

5. Rehearse the data copy#

Database, from the old server to the new one:

bash
# on the old server
mysqldump --single-transaction --quick -u forge -p shop | gzip > /tmp/shop.sql.gz
# from your laptop
scp forge@OLD_IP:/tmp/shop.sql.gz . && scp shop.sql.gz cipi@NEW_IP:/tmp/
# on the new server
sudo cipi db restore shop /tmp/shop.sql.gz

Uploaded files in storage/app (skip this if they're on S3):

bash
rsync -az forge@OLD_IP:/home/forge/shop.example.com/storage/app/ /tmp/shop-storage/
sudo rsync -a /tmp/shop-storage/ /home/shop/shared/storage/app/ && sudo chown -R shop:shop /home/shop/shared/storage/app

Test without touching DNS: add NEW_IP shop.example.com to your laptop's /etc/hosts and browse. Remove the line when done.

6. Workers, scheduler, certificate#

bash
sudo cipi worker add shop --queue=emails --processes=2   # one per Forge daemon queue
sudo cipi worker horizon enable shop                     # if Forge ran Horizon
sudo cipi schedule status shop                           # already on

Or write it all in a cipi.yml, so the setup lives with the code:

yaml
workers:
  horizon: false
  queues:
    - { queue: default, processes: 2 }
    - { queue: emails, processes: 2 }
schedule: true

The certificate needs DNS pointing at the new server, so it comes right after the cut-over.

7. Cut-over#

Step 1 of 5Old: artisan down

On the Forge server, php artisan down: visitors see the maintenance page and nothing writes to the old database any more.

bash
# old server
php /home/forge/shop.example.com/artisan down
# dump, copy, restore as in step 5
# DNS: change the A record to NEW_IP, then on the new server
sudo cipi ssl install shop

Stop the old server's workers and scheduler (Forge → Daemons, Scheduler) so they don't process jobs against the old database.

8. Rollback plan#

Until you delete the old server, going back is one DNS change plus artisan up there. Keep it a week, then cancel it.

Troubleshooting#

ProblemFix
The MAC is invalidThe new app has a different APP_KEY: set the old one
Images missingstorage/app not copied, or storage:link missing: redeploy
Deploy fails on ComposerPHP version differs from Forge: cipi app edit shop --php=8.x
Permission denied (publickey) on deployDeploy key not added to the repository
Certificate failsDNS not pointing at the new server yet: dig +short shop.example.com
Jobs processed twiceOld server's workers still running: stop them

Questions

Can I install Cipi on my existing Forge server?

Don't. Cipi expects a fresh Ubuntu 24.04 or 26.04 server and configures Nginx, PHP and users its own way. A new server also gives you a clean rollback: the old one keeps running until you switch DNS.

How long is the downtime?

Seconds to minutes, only for the final database copy. Lower the DNS TTL a day before; use maintenance mode on the old server during the last dump.

Do I need to change my code?

Usually not. Paths change (/home/forge/site → /home/<app>/current), so check hard-coded paths, and the deploy script moves to Cipi's options or cipi.yml.

What happens to my Forge deploy script?

Cipi's deploys already run composer install, migrations, optimize, storage:link and worker restarts. Extra steps go in --extra-artisan, deploy.post in cipi.yml, or a Deployer task.

Can I keep using Envoyer or GitHub Actions?

Cipi deploys with zero downtime on its own, triggered by push, CLI, API or CI. Your CI can call cipi-cli deploy or the webhook.

What do I lose?

Forge's hosted dashboard. Cipi gives you a CLI, an optional self-hosted web panel, a REST API and an MCP server, without a monthly plan.

What if a step fails?

Read the troubleshooting table above first. Then check the matching docs page, open a GitHub issue, or ask in the community. Most commands print the fix when they refuse something.

Try it on your own server

Free and open source. One command on a fresh Ubuntu 24.04 or 26.04 VPS.

wget -O - https://cipi.sh/setup.sh | bash
Read the quickstart