SafariDesk Update Guide
Use this page to update a self-hosted SafariDesk deployment. The safest update flow is:- Read release notes.
- Back up the database and uploads.
- Pull the new code or images.
- Restart services.
- Run migrations.
- Collect static files.
- Run post-update commands.
- Verify the deployment.
Before Updating
Check the current image tag:- Database migrations
- New environment variables
- Removed environment variables
- Frontend build changes
- License changes
- Manual post-update commands
- Rollback warnings
Update Using Published Images
Edit.env and set the target image tag:
Update From Source
Use this flow when building local images from the monorepo source. Pull code:.env.example:
Updating With the Production Override
If production usesdocker-compose.prod.yml, include it consistently:
docker compose. If your operational standard always uses extra Compose files, either run the direct commands manually or export COMPOSE_FILE before using scripts.
Example:
Environment Variable Changes
When a release changes.env.example, update .env manually.
Compare:
diff is not available, inspect both files directly.
Do not overwrite .env with .env.example; that can erase production secrets.
Changes to backend variables usually require a restart:
VITE_* variables require a rebuilt frontend image because Vite bakes them into the frontend bundle.
Local rebuild:
Database Migrations
Run migrations after the new backend image is running:- Stop and inspect the error.
- Do not repeatedly rerun destructive commands.
- Check database connectivity.
- Check the release notes for manual migration steps.
- Restore from backup if the database is left in a bad state.
Static Files
After an update, collect static files:staticfiles volume at:
collectstatic again and restart Nginx:
Post-Update Verification
Check containers:- Login works.
- Frontend loads without asset errors.
- API calls succeed.
- WebSockets connect.
- Uploads display.
- Email sending still works if configured.
- Background jobs are processed.
Rollback
Rollback depends on whether the failed update ran database migrations. If migrations did not run:- Set
SAFARIDESK_IMAGE_TAGback to the previous tag. - Pull images.
- Restart services.
- Review whether the migrations are backward-compatible.
- If they are not backward-compatible, restore the database backup from before the update.
- Restore uploads if the update changed uploaded file layout.
- Set
SAFARIDESK_IMAGE_TAGto the previous version. - Pull and restart.
Update Checklist
- Release notes reviewed.
.env.examplecompared with.env.- Database and uploads backed up.
- Target image tag selected.
- Images pulled or rebuilt.
- Services restarted.
- pgvector install command run.
- Migrations run.
- Static files collected.
- Email templates synced.
- Health checks pass.
- Frontend reaches API.
- WebSockets work.
- Uploads work.
- Worker and beat are running.
- Rollback path is known.

