Updating
install a new version safely.
A new version can add columns and tables to the database. npm run upgrade-check backs up first, applies every change in one transaction and records the new version. Older code never runs on a newer database.
01Before you update
- Read the Changelog of the new version.
- Download the new version from your CodeCanyon downloads page.
- Keep
.envand thedatafolder. If you changed source files (for examplesrc/shared/product.ts), note your changes: you will apply them again on the new version. - Pick a quiet moment. Renders and analyses that are running when the server stops go back to the queue and start again afterwards.
02Plain Node.js
cd /opt/vodmill
sudo systemctl stop vodmill
sudo -u vodmill npm run backup -- --with-media # a full copy with the video files (leave --with-media out if the disk is short)
# replace the files with the new version (keep .env and the data folder), then:
sudo chown -R vodmill:vodmill /opt/vodmill
sudo -u vodmill npm ci
sudo -u vodmill npm run build
sudo -u vodmill npm run upgrade-check -- --dry-run # shows what would change, changes nothing
sudo -u vodmill npm run upgrade-check # backs up, then applies it
sudo systemctl start vodmill
One way to replace the files without touching your data: unpack the new version next to the old one, then copy .env and move the data folder into it, and point the service at the new folder (or swap the folder names).
03Docker
docker build -t vodmill:new .
docker stop vodmill
docker run --rm --env-file .env -v vodmill-data:/app/data vodmill:new npm run upgrade-check
docker rm vodmill
docker tag vodmill:new vodmill
docker run -d --name vodmill --restart unless-stopped -p 127.0.0.1:8787:8787 --env-file .env \
-v vodmill-data:/app/data vodmill
04What upgrade-check answers
| Answer | Meaning |
|---|---|
| No database in … yet: a new install. | Start the server and it creates one. |
| Up to date: the code and the database are both 1.0.0. Nothing to do. | Same version on both sides (this is the answer on a 1.0.0 install). |
| The database is at X; this code is Y. Changes to apply: … | The answer of --dry-run. Run it without --dry-run to back up and apply. |
| Updated the database from X to Y. | Changes applied; the backup taken first is named. Start the server. |
| Stop: the database was last used by Vodmill X, but this code is Y. | You installed an older version than the one that last used the data. Install X or newer, or restore a backup made with Y. Exit code 1. |
If anything fails while applying, the transaction is rolled back and the database stays exactly as it was. The server records its version in the database on every start and refuses to start on a database written by a newer version (src/server/routes/system.ts). Starting a new version without running upgrade-check also works, because the server adds missing columns and tables on start, but then there is no backup first.
05After the update
curl https://your-domain/healthzshows the new version.- The console's System health page shows the app version and the schema version.
- Render one clip to confirm ffmpeg and the fonts still work.
- Reload the app in the browser (Ctrl+Shift+R) if it still shows the old interface.
External programs are yours to update separately: sudo apt upgrade for ffmpeg, the whisper.cpp folder, and yt-dlp if you use it.