traefik/docs/content/getting-started/install-traefik.md
2019-09-23 14:32:04 +02:00

2.3 KiB

Install Traefik

You can install Traefik with the following flavors:

Use the Official Docker Image

Choose one of the official Docker images and run it with the sample configuration file:

docker run -d -p 8080:8080 -p 80:80 \
    -v $PWD/traefik.toml:/etc/traefik/traefik.toml traefik:v2.0

For more details, go to the Docker provider documentation

!!! tip

* Prefer a fixed version than the latest that could be an unexpected version.
ex: `traefik:v2.0.0`
* Docker images are based from the [Alpine Linux Official image](https://hub.docker.com/_/alpine).
* All the orchestrator using docker images could fetch the official Traefik docker image.

Use the Binary Distribution

Grab the latest binary from the releases page.

??? info "Check the integrity of the downloaded file"

```bash tab="Linux"
# Compare this value to the one found in traefik-${traefik_version}_checksums.txt
sha256sum ./traefik_${traefik_version}_linux_${arch}.tar.gz
```

```bash tab="macOS"
# Compare this value to the one found in traefik-${traefik_version}_checksums.txt
shasum -a256 ./traefik_${traefik_version}_darwin_amd64.tar.gz
```

```powershell tab="Windows PowerShell"
# Compare this value to the one found in traefik-${traefik_version}_checksums.txt
Get-FileHash ./traefik_${traefik_version}_windows_${arch}.zip -Algorithm SHA256
```

??? info "Extract the downloaded archive"

```bash tab="Linux"
tar -zxvf traefik_${traefik_version}_linux_${arch}.tar.gz
```

```bash tab="macOS"
tar -zxvf ./traefik_${traefik_version}_darwin_amd64.tar.gz
```

```powershell tab="Windows PowerShell"
Expand-Archive traefik_${traefik_version}_windows_${arch}.zip
```

And run it:

./traefik --help

Compile your Binary from the Sources

All the details are available in the Contributing Guide