Installation

Binaries

To get the binary, download the latest release for your OS/Arch from the release page and put the binary somewhere convenient.

lego does not assume anything about the location you run it from.

Download

From Docker

docker run goacme/lego -h
Link to the Docker Hub

From package managers

pacman -S lego

Link to the package

yay -S lego-bin

Link to the package

sudo snap install lego

Note: The snap can only write to the /var/snap/lego/common/.lego directory.

Link to the package

pkg install lego

Link to the package

You can enable GURU repository and then:

emerge app-crypt/lego

Link to the package

brew install lego

or

pkg install lego

Link to the package

pkg_add lego

Link to the package

The lego maintainers are only maintaining the AUR and Snap packages, the other packages are community maintained.

From sources

Requirements:

  • go1.25+.

To install the latest version from sources, just run:

go install github.com/go-acme/lego/v5@latest

or

git clone git@github.com:go-acme/lego.git
cd lego
make        # tests + doc + build
make build  # only build