docs/content/reference/install-configuration/boot-environment.md
Traefik Proxy’s configuration is divided into two main categories:
This section focuses on setting up the install configuration, which is essential for Traefik’s initial boot.
Traefik offers multiple methods to define install configuration.
!!! warning "Note" It’s crucial to choose one method and stick to it, as mixing different configuration options is not supported and can lead to unexpected behavior.
Here are the methods available for configuring the Traefik proxy:
You can define the install configuration in a file using formats like YAML or TOML.
entryPoints:
web:
address: ":80"
websecure:
address: ":443"
providers:
docker: {}
api:
dashboard: true
log:
level: INFO
[entryPoints]
[entryPoints.web]
address = ":80"
[entryPoints.websecure]
address = ":443"
[providers]
[providers.docker]
[api]
dashboard = true
[log]
level = "INFO"
At startup, Traefik searches for install configuration in a file named traefik.yml (or traefik.yaml or traefik.toml) in the following directories:
/etc/traefik/$XDG_CONFIG_HOME/$HOME/.config/. (the current working directory).You can override this behavior using the configFile argument like this:
traefik --configFile=foo/bar/myconfigfile.yml
Using the CLI, you can pass install configuration directly as command-line arguments when starting Traefik.
traefik \
--entryPoints.web.address=":80" \
--entryPoints.websecure.address=":443" \
--providers.docker \
--api.dashboard \
--log.level=INFO
You can also set the install configuration using environment variables. Each option corresponds to an environment variable prefixed with TRAEFIK_.
TRAEFIK_ENTRYPOINTS_WEB_ADDRESS=":80" TRAEFIK_ENTRYPOINTS_WEBSECURE_ADDRESS=":443" TRAEFIK_PROVIDERS_DOCKER=true TRAEFIK_API_DASHBOARD=true TRAEFIK_LOG_LEVEL="INFO" traefik
When deploying Traefik Proxy using Helm in a Kubernetes cluster, the install configuration is defined in a values.yaml file.
You can find the official Traefik Helm chart on GitHub
ports:
web:
exposedPort: 80
websecure:
exposedPort: 443
additionalArguments:
- "--providers.kubernetescrd.ingressClass"
- "--log.level=INFO"
helm repo add traefik https://traefik.github.io/charts
helm repo update
helm install traefik traefik/traefik -f values.yaml