How to upgrade between Nightingale versions, what to watch out for, and which files to replace.
Upgrades between minor versions of V6, V7, and V8 use the same method.
Upgrade Steps
- Back up data: before upgrading, back up the MySQL database contents, back up the binary, and back up the
etcandintegrationsdirectories — just in case. Once you have a safety net, you can operate with confidence. - For binary deployments, replace the binary, replace the integrations directory (you can move the old one out of the way with
mv integrations integrations.bakand use the new one directly), and diff old/new config files to manually fill in differences (in practice you should hardly need to change config files, since they have not been adjusted for a long time). - For container deployments, pull the latest image, diff the configs to fill in differences, and restart the containers.
- When accessing Nightingale again, force-refresh the browser to avoid the browser caching old js/css files.
About DB Schema
If the DB account used by Nightingale has create-table and alter-table permissions, you do not need to manually modify the DB schema. Nightingale checks at startup whether the schema needs upgrading and automatically alters tables if so. If the DB account does not have these permissions, you’ll need to adjust the schema manually — recent changes can be found in migrate.sql. If automatic schema migration fails, please open an issue and we’ll follow up as soon as possible.
In theory the database supports both MySQL and Postgres, but the community lacks long-term Postgres contributors, so we recommend using MySQL first.
FAQ
How to use older Docker images
Go to Docker Hub and pick the tag you need, then pull it and specify the corresponding tag in your docker-compose.yml.
FAQ
Q1: Will upgrading lose data?
A: n9e upgrades do not automatically wipe data. Still, back up before upgrading:
- Database
mysqldumpbackup; - Configuration file
n9e.tomlbackup; - The first startup after upgrading runs schema migration automatically — check the logs to confirm success.
Q2: Can I upgrade across major versions (e.g., v6 → v9)?
A: We recommend upgrading one major version at a time (v6 → v7 → v8 → v9), not skipping. Each major version may have schema breaking changes, and skipping levels may not migrate cleanly.
Q3: Alert rules stopped working after upgrade?
A:
- Check whether the alert engine is healthy;
- Check whether old PromQL is still compatible in the new version (a very small number of old functions are deprecated);
- Check whether data source URLs / auth are still valid.