2019-03-08 18:47:06 +00:00
---
title: "Installation"
date: 2019-03-03T16:39:46+01:00
weight: 1
draft: false
---
## Binaries
2019-03-11 16:56:48 +00:00
To get the binary just download the latest release for your OS/Arch from [the release page ](https://github.com/go-acme/lego/releases ) and put the binary somewhere convenient.
2019-03-08 18:47:06 +00:00
lego does not assume anything about the location you run it from.
## From Docker
```bash
2019-03-11 16:56:48 +00:00
docker run goacme/lego -h
2019-03-08 18:47:06 +00:00
```
## From package managers
2023-04-07 12:27:09 +00:00
- [ArchLinux ](https://archlinux.org/packages/community/x86_64/lego/ ) (official):
2019-03-08 18:47:06 +00:00
2022-06-16 22:25:42 +00:00
```bash
2023-04-07 12:27:09 +00:00
pacman -S lego
```
- [ArchLinux (AUR) ](https://aur.archlinux.org/packages/lego-bin ) (official):
```bash
yay -S lego-bin
2022-06-16 22:25:42 +00:00
```
2019-03-08 18:47:06 +00:00
2022-06-16 22:25:42 +00:00
- [FreeBSD (Ports) ](https://www.freshports.org/security/lego ) (unofficial):
2019-03-08 18:47:06 +00:00
2022-06-16 22:25:42 +00:00
```bash
cd /usr/ports/security/lego & & make install clean
```
2019-07-27 05:08:04 +00:00
2022-06-16 22:25:42 +00:00
or
2019-07-27 05:08:04 +00:00
2022-06-16 22:25:42 +00:00
```bash
pkg install lego
```
2019-07-27 05:08:04 +00:00
2019-03-08 18:47:06 +00:00
## From sources
2019-08-13 15:07:06 +00:00
Requirements:
2022-08-03 22:15:33 +00:00
- go1.17+
2019-08-13 15:07:06 +00:00
- environment variable: `GO111MODULE=on`
2022-08-03 22:15:33 +00:00
To install the latest version from sources, just run:
2019-03-08 18:47:06 +00:00
```bash
2022-08-03 22:15:33 +00:00
go install github.com/go-acme/lego/v4/cmd/lego@latest
2019-03-08 18:47:06 +00:00
```
2020-05-16 22:57:55 +00:00
or
```bash
git clone git@github.com:go-acme/lego.git
2022-08-03 22:15:33 +00:00
cd lego
2020-05-16 22:57:55 +00:00
make # tests + doc + build
make build # only build
```