Upgrade Graylog on Ubuntu
This guide describes the recommended way to upgrade Graylog on Ubuntu 22.04 and 24.04.
Prerequisites
Before proceeding, ensure that the following prerequisites are met:
-
You must be a Graylog administrator to perform a system upgrade.
-
Review the release notes for your target Graylog version to identify breaking changes and required configuration updates.
-
Back up data for all services before upgrading to enable rollback if needed. See Backup and Restore Best Practices for details.
-
Ensure all system components are compatible with your target Graylog version.
-
If you are upgrading MongoDB (or self-managed OpenSearch, if used as your search backend) do so before upgrading Graylog.
Software Verification
To verify your current version of Graylog or any of its dependencies before upgrading, use the following commands:
Graylog
sudo apt list --installed | grep graylog
Data Node
sudo apt list --installed | grep graylog-datanode
MongoDB
sudo apt list --installed | grep mongod
Upgrade with Self-Managed OpenSearch
This guide describes the upgrade process for Graylog environments using Graylog Data Node as a search backend. If you have deployed Graylog with self-managed OpenSearch, then you will only need to follow the process described in subsequent sections to upgrade the Graylog service.
If you wish to upgrade OpenSearch to a Graylog-supported version, you must do so before you upgrade Graylog. See the OpenSearch documentation for more information on upgrading OpenSearch.
To verify your current version of OpenSearch before upgrading, run the following command:
sudo apt list --installed | grep opensearchUpgrade Graylog
To ensure data consistency, all Graylog Server instances must be stopped before upgrading. Graylog releases may include database migrations, and running different Graylog versions within the same environment can lead to errors or inconsistent MongoDB data. For this reason, rolling upgrades of the Graylog service are not recommended.
To upgrade the Graylog service, follow the steps below.
Stop the Graylog service:
Copysudo systemctl stop graylog-server.serviceHint: In a multi-node cluster, stop Graylog on all nodes before upgrading packages. This ensures that database migrations run only after all nodes are offline.Monitor the status of the Graylog service to verify it has stopped:
Copyps -aefww | grep graylogOnce the service has stopped, update the local package cache:
Copysudo apt-get updateTo display all available versions of Graylog:Graylog Open ▼Copysudo apt-cache policy graylog-serverGraylog Enterprise▼Copysudo apt-cache policy graylog-enterpriseGraylog Security▼Copysudo apt-cache policy graylog-enterpriseIf you have a lock on the Graylog package, you may then be prompted to remove it before allowing the upgrade to execute:
Copysudo apt-mark unhold graylog-serverDownload and install the latest Graylog 7.0 repository:
Graylog Open ▼Copywget https://packages.graylog2.org/repo/packages/graylog-7.0-repository_latest.deb
sudo dpkg -i graylog-7.0-repository_latest.deb
sudo apt-get update
sudo apt-get install graylog-serverGraylog Enterprise ▼Copywget https://packages.graylog2.org/repo/packages/graylog-7.0-repository_latest.deb
sudo dpkg -i graylog-7.0-repository_latest.deb
sudo apt-get update
sudo apt-get install graylog-enterpriseGraylog Security ▼Copywget https://packages.graylog2.org/repo/packages/graylog-7.0-repository_latest.deb
sudo dpkg -i graylog-7.0-repository_latest.deb
sudo apt-get update
sudo apt-get install graylog-enterpriseVerify that the updated Graylog packages have been installed:
Copysudo apt list --installed | grep graylogIf the release notes for your target version indicate configuration changes are necessary, make these changes in the
server.conffile. To open the file:Copysudo nano /etc/graylog/server/server.confStart the Graylog service:
Copysudo systemctl start graylog-server.serviceHint: In a multi-node cluster, start the leader node first after upgrading. Once the leader is running, you may start all follower nodes.
Upgrade Data Node
Graylog Data Node must be on the same version as your Graylog service. For example, if you have upgraded Graylog to 7.0, then you must also upgrade Data Node to the 7.0 release.
To complete a rolling upgrade of three or more Data Node servers, follow the steps below.
To begin the Data Node upgrade process, you must first log in to the Graylog interface and navigate to System > Cluster Configuration > Data Node Upgrade. Note that after upgrading Graylog, you will receive a warning on this page that there is a version mismatch between Graylog and your Data Nodes.
Select Rolling Upgrade.
Graylog will indicate the Data Node (by its hostname) that should be upgraded first, so for the first node listed, click Start Upgrade Process. This disables shard replication temporarily for the upgrade to proceed safely.
Hint: Unlike upgrading the Graylog service, upgrading the Data Node service requires that you start on a follower node first and finish with the leader node. The Graylog interface will indicate the correct upgrade order.Now, navigate to the physical Data Node host on which you are performing the upgrade and stop the Data Node service:
Copysudo systemctl stop graylog-datanodeMonitor the status of the Data Node service to verify it has stopped:
Copyps -aefww | grep graylog-datanodeOnce the service has stopped, update the local package cache:
Copysudo apt-get updateTo display all available versions of Data Node:Copysudo apt-cache policy graylog-datanodeIf you have a lock on the Graylog Data Node package, you may then be prompted to remove it before allowing the upgrade to execute:
Copysudo apt-mark unhold graylog-datanodeDownload and install the latest Graylog 7.0 repository:
Copywget https://packages.graylog2.org/repo/packages/graylog-7.0-repository_latest.deb
sudo dpkg -i graylog-7.0-repository_latest.deb
sudo apt-get update
sudo apt-get install graylog-datanodeTo verify that the updated Data Node packages have been installed:
Copysudo apt list --installed | grep graylog-datanodeIf the release notes for your target version indicate configuration changes are necessary for Data Node, then make these changes in the
datanode.conffile. To open the file:Copysudo nano /etc/graylog/datanode/datanode.confStart the Data Node service:
Copysudo systemctl start graylog-datanodeReturn to the Graylog interface and select Confirm Upgrade for the node indicated. This re-enables shard replication and signals Graylog that the node upgrade is complete.
Repeat all the previous steps for the remaining nodes, upgrading them one at a time in the order indicated by Graylog.
Incremental Upgrade
When upgrading across multiple Graylog versions (for example, from 5.x to 7.x), it is essential to perform the upgrade incrementally through every minor version and not just between major releases. Each Graylog version may include important database migrations, configuration updates, or compatibility changes that must be applied in order.
The recommended process is to upgrade one version at a time, following the full sequence of available releases until you reach the target version. Skipping versions may result in failed migrations or inconsistent system behavior.
Incremental Upgrade Path Example
For example, if you are upgrading from Graylog 5.2 to Graylog 7.0, you should follow this path:
Graylog 5.2 → 6.0 → 6.1 → 6.2 → 6.3 → 7.0
This ensures that all intermediate schema changes, configuration updates, and feature migrations are properly applied at each step.
