Upgrading
Upgrading Skirl is replacing the program and starting it again: the data stays where it is. When a new version changes the database, it does that itself the first time it starts, after making a copy of it. Read what changed in CHANGELOG.md first: anything you have to do for a release is there.
Upgrading in Docker#
With Docker Compose, as the install guide sets it up, in the folder with compose.yml, fetch the new image and start Skirl on it:
docker compose pulldocker compose up -dFor a container started without Compose, fetch the image, remove the container (its volume, with the data, stays) and start it again with the same line you started it with, the same ports, volume and variables:
docker pull ghcr.io/homelabza/skirl:1docker rm -f skirldocker run -d --name skirl -p 8080:8080 -v skirl-data:/data ghcr.io/homelabza/skirl:1The image's tag decides what an upgrade fetches. 1 (the install guide's) is the newest 1.x, so it never jumps to 2.0.0 by itself; latest is the newest of all. A full version such as 1.0.0 never changes: to upgrade, change it to the new version first. The tags: Images and tags.
Then check that it is healthy again (it says starting for a few seconds first):
docker inspect -f '{{.State.Health.Status}}' skirlhealthyUpgrading without Docker#
Download the new release's archive for your machine and check it, as the install guide does (Checking a download). Then unpack it, put the program in place and restart the service, here for 1.0.1:
tar -xzf skirl_1.0.1_linux_amd64.tar.gzsudo install -m 0755 skirl_1.0.1_linux_amd64/skirl /usr/local/bin/skirlsudo systemctl restart skirlRestart it straight after putting the program in place: the new version's commands (skirl user list and the others) bring the database up to date too, and the old server still running does not expect that.
The log says whether it copied and changed the database:
sudo journalctl -u skirl -n 20From outside, the server answers again when it is back:
curl -s https://notify.example.com/v1/health{"healthy":true}What happens to the database#
On the first start of a new version:
- Skirl reads which version of the database it has. A database that a newer Skirl has already changed is refused, and nothing is touched: "the database has schema version 13, but this skirl carries only up to 12: a newer release of skirl has used it". Run that newer version, or one newer still.
- If the database needs changes, Skirl first writes a copy of it to
backups/skirl-before-<version>-<date and time>.dbin the data directory, and the log says where ("database copied before migrating"). It keeps the last three such copies. If the copy cannot be made, a full disk for one, it changes nothing and stops. - Then it makes the changes, all of them or none: if one fails, the database is as it was, and Skirl stops with an error naming the change that failed.
So the worst case is a server that does not start, with your data unchanged and a copy beside it.
A change that renames something says so once, in the log of the start that made it. 1.0.0-test.9 renames templates saved under auto or forgejo, and Admin → Templates says so too until it is dismissed: Renamed when Skirl was upgraded.
The commands of a new version do the same when they open an older database (skirl user list, for one). skirl backup and skirl restore change nothing: a restored older backup is brought up to date when the server starts.
Going back#
Go back to the older version and the copy of the database taken before the upgrade: the older version cannot read a database the newer one changed. Whatever happened after the upgrade, such as messages that arrived, is lost, so go back only if the new version does not work. The copies in backups/ stay where they are.
Going back in Docker#
Find the name of the copy in the log (the line "database copied before migrating"):
docker logs skirl 2>&1 | grep 'copied before migrating'Stop Skirl, and restore the copy with the older image (here 1.0.0), straight from the volume:
docker stop skirldocker run --rm --volumes-from skirl --entrypoint /skirl ghcr.io/homelabza/skirl:1.0.0 restore --force --data-dir /data /data/backups/skirl-before-1.0.1-20261201T090000Z.dbThen run the older version: with Docker Compose, set image: ghcr.io/homelabza/skirl:1.0.0 in compose.yml and start it again:
docker compose up -dWith docker run, remove the container and run the same line with :1.0.0 in place of :1. Keep the older version's tag until a newer release fixes what went wrong: 1 would fetch the newest again.
Going back without Docker#
Stop Skirl, put the older program back, and restore the copy as the service's user:
sudo systemctl stop skirlsudo install -m 0755 skirl_1.0.0_linux_amd64/skirl /usr/local/bin/skirlsudo ls /var/lib/skirl/backups/sudo -u skirl skirl restore --force --data-dir /var/lib/skirl /var/lib/skirl/backups/skirl-before-1.0.1-20261201T090000Z.dbsudo systemctl start skirlWhere the version shows#
- Admin → Overview, under the title, with how long the server has been up and the size of its database.
- At the foot of Help, for admins only.
- The version command, which also gives the commit, the build date and the database's version:
skirl versionIn Docker:
docker exec skirl /skirl versionA build made from a copy of the repository that is not exactly a version's own says so with + and its commit, as in 1.0.0-test.6+97140aeda559.
What a version number tells you#
- 1.0.1, 1.0.2… (the last number): fixes. Upgrade whenever you like.
- 1.1.0, 1.2.0… (the middle number): new features. Upgrading needs nothing from you.
- 2.0.0 (the first number): an upgrade that needs you to do something, such as change a setting. The release notes say exactly what, and nothing else raises the first number.
- 1.0.0-rc.N: release candidates before 1.0.0, published for trying out.
- 1.0.0-test.N: test builds while the repository is private, never published as images; each is listed with what to test in test-builds.md.
Reading CHANGELOG.md#
CHANGELOG.md, in the top folder of Skirl's repository, has a section for each release, newest first, written for the people who run Skirl: what is new, what changed, what was fixed, and anything you have to do when you upgrade. Read the sections between the version you run and the one you are going to.