Updating Zammad¶
Tip
Are you tired of complex setup, configuration, backup and update tasks? Let us handle this stuff for you! 🚀
The easiest and often most cost-effective way to operate Zammad is our cloud service. Give it a try with a free trial instance!
Before updating Zammad, we strongly recommend to take a look at our release notes. You can find information about features and fixes as well as technical remarks and breaking changes.
Be aware that you should not skip major Zammad versions while updating.
That means, for example, your upgrade path from version 2.4 to 5.1 (assuming
this is the current stable) would be:
2.4 → 3.0 → 4.0 → 5.0 → latest stable (5.1)
If you don’t have time for updating all the time, please consider using Zammad hosting for your and your customers’ safety.
Hint
This page describes how to update Zammad only. In case you want to update your host operating system too, have a look at Host Upgrade and Repository Migration.
- Step 1: Ensure dependencies
Before proceeding, double-check that your system environment matches Zammad’s requirements.
- Step 2: Stop Zammad
$ sudo systemctl stop zammad
- Step 3: Backup Zammad
See Backup & Restore (Package) for more information.
- Step 4: Update Zammad
Note
If you update your complete system and there are updates for Zammad and your database server, this could lead to errors because your database may not be online again when Zammad is updated.
In such a case, you might want to exclude Zammad from updating temporarily as you can see in the commands below.
Update package index:
$ sudo apt update
Disable updates for Zammad:
$ sudo apt-mark hold zammad
Update all packages except Zammad:
$ sudo apt upgrade
Re-enable updates for Zammad:
$ sudo apt-mark unhold zammad
Update Zammad:
$ sudo apt upgrade
Update package index:
$ sudo zypper refresh
Disable updates for Zammad:
$ sudo zypper addlock zammad
Update all packages except Zammad:
$ sudo zypper update
Re-enable updates for Zammad:
$ sudo zypper removelock zammad
Update Zammad:
$ sudo zypper update
Update all packages except Zammad:
$ sudo dnf upgrade --exclude zammad
Update Zammad:
$ sudo dnf upgrade
The package comes with maintenance scripts that will run regular tasks during updates for you. However, you should always have a look at the outputs these helper scripts generate. Ignoring said output may lead to incomplete updates that may corrupt data or lead to issues.
- Step 5: Additional steps
- Check release notes
If not already done, check our release notes if extra steps are necessary and perform them, if applicable.
- Updating Elasticsearch
Updating Elasticsearch may be relevant, too. Make sure to have a supported version of Elasticsearch installed (see software prerequisites for supported versions).
If you have to update Elasticsearch, please have a look at their documentation and follow the instructions.
In case your are using plugins for Elasticsearch, make sure they are updated as well (note: starting with Elasticsearch 8, the ingest-attachment is no longer a plugin, it’s now included in Elasticsearch).
- Step 6: Rebuild Elasticsearch index (optional)
Only needed if the release note tells you to rebuild the Elasticsearch index.
Without specifying CPU cores:
$ zammad run rake zammad:searchindex:rebuild
With specifying the number of CPU cores to use (example: 8):
$ zammad run rake zammad:searchindex:rebuild[8]
- Step 7: Log into Zammad
Yes, that’s it!
Hint
Docker Compose stack updates may require extra steps or introduce breaking changes. Always check the Docker Compose release notes for updating instructions first.
Hint
If you want to update Zammad to a specific version, use the VERSION
environment variable
(example
with further explanation) and specify the version number.
- Updating Portainer based Installations
In your Zammad stack, click on Pull and redeploy, activate Re-pull image and redeploy and click on Update.
- Updating Docker Compose based Installations
$ cd zammad-docker-compose
$ git pull
$ docker compose pull
$ docker compose up -d
- Rebuild Elasticsearch index (optional)
Only needed if the release note tells you to rebuild the Elasticsearch index.
Docker Compose:
Without specifying CPU cores:
$ docker compose run --rm zammad-railsserver bundle exec rake zammad:searchindex:rebuild
With specifying CPU cores to use (example: 8):
$ docker compose run --rm zammad-railsserver bundle exec rake zammad:searchindex:rebuild[8]
Portainer:
Open the console via Portainer’s GUI with the standard entrypoint
/bin/bashand run:Without specifying CPU cores:
$ bundle exec rake zammad:searchindex:rebuild
With specifying CPU cores to use (example: 8):
$ bundle exec rake zammad:searchindex:rebuild[8]