LinuxCommandLibrary

traefik

Cloud-native HTTP reverse proxy

TLDR

Start Traefik with default configuration

$ traefik
copy
Start with a specific config file
$ traefik --configFile=[traefik.yml]
copy
Enable Docker provider
$ traefik --providers.docker
copy
Enable Docker with specific endpoint
$ traefik --providers.docker.endpoint=unix:///var/run/docker.sock
copy
Set entrypoint for HTTP traffic
$ traefik --entrypoints.web.address=:80
copy
Enable the API dashboard
$ traefik --api.dashboard=true
copy
Check health status
$ traefik healthcheck
copy
Display help
$ traefik --help
copy

SYNOPSIS

traefik [command] [options]

DESCRIPTION

Traefik is a modern HTTP reverse proxy and load balancer designed for microservices. It automatically discovers services through providers like Docker, Kubernetes, and Consul, and configures routing rules dynamically.
Key features include automatic HTTPS with Let's Encrypt, load balancing, circuit breakers, rate limiting, and metrics. Configuration can be provided via files (YAML, TOML), environment variables, or command-line flags.
The web dashboard provides real-time visibility into routers, services, and middlewares. Traefik integrates natively with container orchestrators and service meshes.

PARAMETERS

--configFile file

Load configuration from specified file (traefik.yml, traefik.toml).
--providers.docker
Enable Docker provider for automatic service discovery.
--providers.docker.endpoint endpoint
Docker daemon endpoint (e.g., unix:///var/run/docker.sock).
--providers.file.filename file
Enable file provider with configuration file.
--entrypoints.name.address address
Define entrypoint address (e.g., :80, :443).
--api.dashboard
Enable the web dashboard.
--api.insecure
Allow insecure access to API (for development).
--log.level level
Log level: DEBUG, INFO, WARN, ERROR.
--accesslog
Enable access logging.
--certificatesresolvers.name.acme.email email
Email for Let's Encrypt certificates.
healthcheck
Check Traefik health via /ping endpoint.
version
Display version information.
--help
Display help message.

CAVEATS

The API dashboard should not be exposed publicly without authentication. For Docker provider, Traefik needs access to the Docker socket, which has security implications. Let's Encrypt rate limits apply when using ACME for certificates.

HISTORY

Traefik was created by Emile Vauge and first released in 2015 by Traefik Labs (formerly Containous). It was designed specifically for the cloud-native era and microservices architectures. Traefik 2.0, released in 2019, introduced a new routing architecture with routers, services, and middlewares. It has become one of the most popular reverse proxies for container environments.

SEE ALSO

nginx(1), caddy(1), haproxy(1), docker(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community