Updating a single-image Sourcegraph instance (sourcegraph/server)

This document describes the exact changes needed to update a single-node Sourcegraph instance. Always refer to this page before upgrading Sourcegraph, as it comprehensively describes the steps needed to upgrade, and any manual migration steps you must perform.

Upgrade procedure

  1. Read our update policy to learn about Sourcegraph updates.
  2. Find the relevant entry for your update in the update notes on this page. If the notes indicate a patch release exists, target the highest one.
  3. After checking the relevant update notes, refer to the standard upgrade procedure to upgrade your instance.

Multi-version upgrade procedure

  1. Read our update policy to learn about Sourcegraph updates.
  2. Find the relevant entry for your update in the update notes on this page. If the notes indicate a patch release exists, target the highest one. These notes may contain relevant information about the infrastructure update such as resource requirement changes or versions of depencies (Docker, externalized databases).
  3. After checking the relevant update notes, refer to the multi-version upgrade procedure to upgrade your instance.

Unreleased

Upgrade notes for the next version will appear here.

v4.4.1 ➔ v4.4.2

Notes:

v4.3 ➔ v4.4.1

Upgrade notes for the next version will appear here.

v4.2 ➔ v4.3.1

v4.1 ➔ v4.2.1

v4.0 ➔ v4.1.3

v3.43 ➔ v4.0

Patch releases:

  • v4.0.1

v3.42 ➔ v3.43

Patch releases:

  • v3.43.1
  • v3.43.2

v3.41 ➔ v3.42

Patch releases:

  • v3.42.1
  • v3.42.2

v3.40 ➔ v3.41

No upgrade notes.

v3.39 ➔ v3.40

Patch releases:

  • v3.40.1
  • v3.40.2

v3.38 ➔ v3.39

Patched releases:

  • v3.39.1

v3.37 ➔ v3.38

Patch releases:

  • v3.38.1

v3.36 ➔ v3.37

No upgrade notes.

v3.35 ➔ v3.36

No upgrade notes.

v3.34 ➔ v3.35

Patch releases:

  • v3.35.1

Notes:

  • There is a known issue with the Code Insights out-of-band settings migration not reaching 100% complete when encountering deleted users or organizations.

v3.33 ➔ v3.34

No upgrade notes.

v3.32 ➔ v3.33

No upgrade notes.

v3.31 ➔ v3.32

No upgrade notes.

v3.30 ➔ v3.31

Notes:

  • The built-in main Postgres (pgsql) and codeintel (codeintel-db) databases have switched to an alpine-based Docker image. Upon upgrading, Sourcegraph will need to re-index the entire database. All users that use our bundled (built-in) database instances must read through the 3.31 upgrade guide before upgrading.

v3.29 ➔ v3.30

Patch releases:

  • v3.30.1
  • v3.30.2
  • v3.30.3

v3.28 ➔ v3.29

No upgrade notes.

v3.27 ➔ v3.28

No upgrade notes.

v3.26 ➔ v3.27

Notes:

v3.25 ➔ v3.26

No upgrade notes.

v3.24 ➔ v3.25

No upgrade notes.

Notes:

  • Go 1.15 introduced changes to SSL/TLS connection validation which requires certificates to include a SAN. This field was not included in older certificates and clients relied on the CN field. You might see an error like x509: certificate relies on legacy Common Name field. We recommend that customers using Sourcegraph with an external database and and connecting to it using SSL/TLS check whether the certificate is up to date.

v3.23 ➔ v3.24

No upgrade notes.

v3.22 ➔ v3.23

No upgrade notes.

v3.21 ➔ v3.22

No upgrade notes.

v3.20 ➔ v3.21

Notes:

  • This release introduces a second database instance, codeintel-db. If you have configured Sourcegraph with an external database, then update the CODEINTEL_PG* environment variables to point to a new external database as described in the external database documentation. Again, these must not point to the same database or the Sourcegraph instance will refuse to start.
  • Turn off database secrets encryption. In Sourcegraph version 3.20, we would automatically generate a secret key file (/var/lib/sourcegraph/token) inside the container for encrypting secrets stored in the database. However, it is not yet ready for general use and format of the secret key file might change. Therefore, it is best to delete the secret key file (/var/lib/sourcegraph/token) and turn off the database secrets encryption.

v3.19 ➔ v3.20

No upgrade notes.

v3.18 ➔ v3.19

No upgrade notes.

v3.17 ➔ v3.18

No upgrade notes.

v3.16 ➔ v3.17

Patch releases:

  • v3.17.2

v3.15 ➔ v3.16

No upgrade notes.

v3.14 ➔ v3.15

No upgrade notes.