Updating the Server

Preserving the Previous Image

You may wish to preserve the previous image before updating. This is useful if an issue is encountered in upgrades.

docker tag kanidm/server:latest kanidm/server:<DATE>
docker tag kanidm/server:latest kanidm/server:2022-10-24

Update your Image

Pull the latest version of Kanidm that matches your CPU profile

docker pull kanidm/server:latest
docker pull kanidm/server:x86_64_latest

Perform a backup

See backup and restore

Update your Instance

Kani Warning WARNING
It is not always guaranteed that downgrades are possible. It is critical you know how to backup and restore before you proceed with this step.

Docker updates by deleting and recreating the instance. All that needs to be preserved in your storage volume.

docker stop <previous instance name>

You can test that your configuration is correct, and the server should correctly start.

docker run --rm -i -t -v kanidmd:/data \
    kanidm/server:latest /sbin/kanidmd configtest -c /data/server.toml

You can then follow through with the upgrade

docker run -p PORTS -v kanidmd:/data \

Once you confirm the upgrade is successful you can delete the previous instance

docker rm <previous instance name>

If you encounter an issue you can revert to the previous version.

docker stop <new instance name>
docker start <previous instance name>

If you deleted the previous instance, you can recreate it from your preserved tag instead.

docker run -p ports -v volumes kanidm/server:<DATE>

In some cases the downgrade to the previous instance may not work. If the server from your previous version fails to start, you may need to restore from backup.