Step 9
Updates
How to apply a new Fchat release without losing data.
Before you update
!
Always back up first
Even small migrations can fail unexpectedly on real data. Run the backup commands from the Backups chapter before touching anything.
Upgrade steps
- Download the new ZIP from your CodeCanyon downloads page.
- Back up Postgres + MinIO (see previous chapter).
- Extract the new ZIP next to your current install:
fchat-new/. - Copy your existing
.envandstorage/intofchat-new/. - Switch directories:
mv fchat fchat-old && mv fchat-new fchat && cd fchat. - Rebuild and run migrations:bash
docker compose build --no-cache docker compose up -d docker compose exec app php artisan migrate --force docker compose exec app php artisan tenants:migrate --force docker compose exec app php artisan config:clear docker compose exec app php artisan translations:sync
- Verify the platform still loads. If anything is wrong, restore the backup and contact support.
Tenant migrations
Tenant databases follow their own migration directory (database/migrations/tenant/). The command tenants:migrate iterates every tenant and applies pending migrations. Safe to re-run.
Zero downtime (advanced)
For paying tenants, use a blue/green pattern:
- Provision a second VPS, restore the latest DB and storage backup.
- Apply the upgrade on the second VPS, verify thoroughly.
- Flip the DNS A record to the new VPS IP.
- Once DNS has propagated, decommission the old VPS.
Rollback
If the upgrade goes wrong:
- Switch directories back:
mv fchat fchat-broken && mv fchat-old fchat. - Restore the pre-upgrade DB dump.
docker compose up -d.