Upgrade a standalone server (Docker)

This example shows how to upgrade or patch a standalone server version 5 running on Docker.

It is recommended to read the following pages before continuing:

For critical systems, it is recommended to:

  • Backup your server(s), including databases, configuration, and encryption keys to avoid losing data in case of failure.

  • Perform the upgrade in a test environment.

Prerequisites

The following steps assume that Neo4j DBMS 5.x.a Enterprise Edition is running in a Docker container named neo4j-5.x.a, with the /data directory in the container mapped to the /v5/data on the host machine as in the following example:

docker run -d \
    --name=neo4j-5.x.a \
    --publish=7474:7474 --publish=7687:7687 \
    --volume=/path/to/v5/data:/data \
    --env=NEO4J_ACCEPT_LICENSE_AGREEMENT=yes \ (1)
    neo4j:5.x.a-enterprise
1 Only for Enterprise Edition.

If you want to monitor the logs, you should also map the container’s /logs directory to a /logs directory on the host machine.

Upgrade steps

  1. Stop the container neo4j-5.x.a by running:

    docker stop neo4j-5.x.a
  2. Remove the neo4j-5.x.a container:

    docker rm neo4j-5.x.a
  3. Start a 5.y.b container with the /data directory in the container mapped to the same /v5/data on the host machine:

    docker run -d \
        --name=neo4j-5.y.b \
        --publish=7474:7474 --publish=7687:7687 \
        --volume=/path/to/v5/data:/data \
        --env=NEO4J_ACCEPT_LICENSE_AGREEMENT=yes \
        neo4j:5.y.b-enterprise

    The upgrade process takes place during startup.

Monitor the logs

The neo4j.log file contains information on how many steps the upgrade will involve and how far it has progressed.

Neo4j logging output is written to files in the /logs directory. This directory is mounted as a /logs volume.