Install

Instructions for installing etcd from pre-built binaries or from source.

Requirements

Before installing etcd, see the following pages:

Install pre-built binaries

The easiest way to install etcd is from pre-built binaries:

  1. Download the compressed archive file for your platform from Releases, choosing release v3.5.13 or later.

  2. Unpack the archive file. This results in a directory containing the binaries.

  3. Add the executable binaries to your path. For example, rename and/or move the binaries to a directory in your path (like /usr/local/bin), or add the directory created by the previous step to your path.

  4. From a shell, test that etcd is in your path:

    $ etcd --version
    etcd Version: 3.5.13
    ...
    

Build from source

If you have Go version 1.2+, you can build etcd from source by following these steps:

  1. Download the etcd repo as a zip file and unzip it, or clone the repo using the following command.

    $ git clone -b v3.5.13 https://github.com/etcd-io/etcd.git
    

    To build from main@HEAD, omit the -b v3.5.13 flag.

  2. Change directory:

    $ cd etcd
    
  3. Run the build script:

    $ ./build.sh
    

    The binaries are under the bin directory.

  4. Add the full path to the bin directory to your path, for example:

    $ export PATH="$PATH:`pwd`/bin"
    
  5. Test that etcd is in your path:

    $ etcd --version
    

Installation via OS packages

Disclaimer: etcd installations through OS package managers can deliver outdated versions since they are not being automatically maintained nor officially supported by etcd project. Therefore use OS packages with caution.

There are various ways of installing etcd on different operating systems and these are just some examples how it can be done.

MacOS (Homebrew)

  1. Update homebrew:
$ brew update
  1. Install etcd:
$ brew install etcd
  1. Verify install
$ etcd --version

Linux

Although installing etcd through many major Linux distributions’ official repositories and package managers is possible, the published versions can be significantly outdated. So, installing this way is strongly discouraged.

The recommended way to install etcd on Linux is either through pre-built binaries or by using Homebrew.

Homebrew on Linux

Homebrew can run on Linux, and can provide recent software versions.

  • Prerequisites

    • Update Homebrew:

      $ brew update
      
  • Procedure

    • Install using brew:

      $ brew install etcd
      
  • Result

    • Verify installation by getting the version:

      $ etcd --version
      etcd Version: 3.5.13
      ...
      

Installation as part of Kubernetes installation

TBD—Help Wanted

Installation on Kubernetes, using a statefulset or helm chart

The etcd project does not currently maintain a helm chart, however you can follow the instructions provided by Bitnami’s etcd Helm chart.

Installation check

For a slightly more involved sanity check of your installation, see Quickstart.


Last modified February 21, 2024: Add Linux installation instructions (c0eca1f)