FchatFchat Docs
Fchat
Fchat Documentation
Everything you need to install, run and operate your platform.
v1.0.0
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

  1. Download the new ZIP from your CodeCanyon downloads page.
  2. Back up Postgres + MinIO (see previous chapter).
  3. Extract the new ZIP next to your current install: fchat-new/.
  4. Copy your existing .env and storage/ into fchat-new/.
  5. Switch directories: mv fchat fchat-old && mv fchat-new fchat && cd fchat.
  6. 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
  7. 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:

  1. Provision a second VPS, restore the latest DB and storage backup.
  2. Apply the upgrade on the second VPS, verify thoroughly.
  3. Flip the DNS A record to the new VPS IP.
  4. Once DNS has propagated, decommission the old VPS.

Rollback

If the upgrade goes wrong:

  1. Switch directories back: mv fchat fchat-broken && mv fchat-old fchat.
  2. Restore the pre-upgrade DB dump.
  3. docker compose up -d.