Upgrading
Brainitive releases often. This page shows how to update a Docker or a manual installation. Read the release notes first: Help → Changelog in the app, or the Releases page on GitHub.
Back up first
Always take a backup of the database and your uploads before an update. See Backups.
Never wipe the database
Never run php artisan migrate:fresh, migrate:reset, migrate:refresh or db:wipe on a real installation. They delete every table. An update only needs php artisan migrate --force, which adds what's new and keeps your data.
Docker
Back up (see Backups).
Pull the newest image of your tag and restart:
bashdocker compose pull docker compose up -dCheck the logs:
bashdocker compose logs -f app
That's all. When the app container starts, it runs the migrations, queues a search index rebuild if needed and caches the configuration. The queue, scheduler and realtime containers restart with the new image too.
- If you pinned a version with
BRAINITIVE_IMAGE(for example:1.45), change the tag in.envto move to a newer minor version. - If you build from source:
git pull && docker compose up -d --build. - From time to time, download the newest
compose.yamland compare it with yours. New releases may add services or settings.
Manual install
Run these in your installation folder (/opt/brainitive in this guide).
Back up the database,
storage/and.env.Put up the maintenance page (optional, recommended for large updates):
bashsudo -u www-data php artisan downGet the new code:
bashgit pullInstall dependencies and build:
bashcomposer install --no-dev --optimize-autoloader npm ci npm run build npm --prefix realtime ci --omit=dev # if you run the realtime serverUpdate the database and caches:
bashsudo -u www-data php artisan migrate --force sudo -u www-data php artisan optimizeRestart the background processes:
bashsudo -u www-data php artisan queue:restart sudo systemctl restart brainitive-realtime # if you run the realtime server sudo systemctl reload php8.4-fpm # clears PHP's opcode cacheBring the site back:
bashsudo -u www-data php artisan up
The search index rebuilds itself in the background when an update changed it. The scheduler and the queue worker take care of it.
After the update
- Open Instance admin → Overview and check for failed jobs.
- Run
php artisan uploads:auditonce. It lists uploads with executable or HTML/SVG extensions saved by older versions (--deleteremoves them). - If something went wrong, see Troubleshooting.
Going back
Migrations change the database, so going back to an older version means restoring the backup you took before the update. Then run the older image tag (Docker) or check out the older code (manual install).

