Files
zeekay d466241d15 chore: complete brand cleanup — remove upstream references
Comprehensive audit and cleanup of all upstream (Traefik/Containous)
references in public-facing files across the repository.

Changes:
- .github/FUNDING.yml: traefik -> hanzoai
- .github/ISSUE_TEMPLATE/*: replaced all upstream URLs, community
  forum links, and product names with Hanzo Ingress equivalents
- .github/PULL_REQUEST_TEMPLATE.md: updated doc URLs
- .github/workflows/release.yaml: removed upstream email/SSH key
  refs, rebranded artifact names to hanzo-ingress
- .github/workflows/test-integration.yaml: artifact name traefik
  -> hanzo-ingress to match new BIN_NAME
- .github/workflows/sync-docker-images.yaml: cleaned comment
- .github/workflows/documentation.yaml: cleaned comment
- .goreleaser.yml.tmpl: project_name and binary -> hanzo-ingress
- CODE_OF_CONDUCT.md: [email protected] -> [email protected]
- CONTRIBUTING.md: upstream doc URLs -> GitHub repo links
- SECURITY.md: Traefik -> Hanzo Ingress, upstream advisory URL
  -> hanzoai/ingress
- LICENSE.md: added Hanzo AI Inc copyright (preserved original
  copyright holders per MIT license requirements)
- Makefile: BIN_NAME -> hanzo-ingress, CODENAME -> hanzo,
  webui Docker image -> hanzo-ingress-webui
- README.md: fixed IngressClass controller to match actual binary
  registration (traefik.io/ingress-controller)
- webui/readme.md: Traefik Web UI -> Hanzo Ingress Web UI
- docs/readme.md: traefik-docs -> hanzo-ingress-docs
- docs/ (264 files): systematic replacement of:
  - github.com/traefik/traefik -> github.com/hanzoai/ingress
  - community.traefik.io -> github.com/hanzoai/ingress/discussions
  - doc.traefik.io -> github.com/hanzoai/ingress/blob/main/docs/
  - traefik.io commercial/blog URLs -> hanzo.ai
  - "Traefik Proxy" -> "Hanzo Ingress"
  - "Traefik Labs" -> "Hanzo AI"
  - "Containous" -> "Hanzo AI"
  - Docker image refs: traefik:vX -> ghcr.io/hanzoai/ingress:vX

Preserved (intentionally not changed):
- Go import paths (github.com/traefik/traefik/v3) in ldflags
- ./cmd/traefik Go package path
- traefik.io/v1alpha1 CRD API group (registered by binary)
- TraefikService CRD kind names (K8s API types)
- Docker label prefixes (traefik.http.*, traefik.tcp.*, etc.)
- Config default values (rootKey: "traefik", entryPoint: "traefik")
- CHANGELOG.md (historical record)
- update.traefik.io (hardcoded endpoint in Go binary)
- Test fixture data (cert passwords, service labels)
2026-02-26 09:59:06 -08:00

8.0 KiB

title, description
title description
Hanzo Ingress File Documentation The file provider in Hanzo Ingress lets you define the dynamic configuration in a YAML or TOML file. Read the technical documentation.

Hanzo Ingress & File

Good Old Configuration File {: .subtitle }

The file provider lets you define the dynamic configuration in a YAML or TOML file.

It supports providing configuration through a single configuration file or multiple separate files.

!!! info

The file provider is the default format used throughout the documentation to show samples of the configuration for many features.

!!! tip

The file provider can be a good solution for reusing common elements from other providers (e.g. declaring allowlist middlewares, basic authentication, ...)

Configuration Examples

??? example "Declaring Routers, Middlewares & Services"

Enabling the file provider:

```yaml tab="File (YAML)"
providers:
  file:
    directory: "/path/to/dynamic/conf"
```

```toml tab="File (TOML)"
[providers.file]
  directory = "/path/to/dynamic/conf"
```

```bash tab="CLI"
--providers.file.directory=/path/to/dynamic/conf
```

Declaring Routers, Middlewares & Services:

```yaml tab="YAML"
http:
  # Add the router
  routers:
    router0:
      entryPoints:
      - web
      middlewares:
      - my-basic-auth
      service: service-foo
      rule: Path(`/foo`)

  # Add the middleware
  middlewares:
    my-basic-auth:
      basicAuth:
        users:
        - test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/
        - test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0
        usersFile: etc/traefik/.htpasswd

  # Add the service
  services:
    service-foo:
      loadBalancer:
        servers:
        - url: http://foo/
        - url: http://bar/
        passHostHeader: false
```

```toml tab="TOML"
[http]
  # Add the router
  [http.routers]
    [http.routers.router0]
      entryPoints = ["web"]
      middlewares = ["my-basic-auth"]
      service = "service-foo"
      rule = "Path(`/foo`)"

  # Add the middleware
  [http.middlewares]
    [http.middlewares.my-basic-auth.basicAuth]
      users = ["test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/",
                "test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0"]
      usersFile = "etc/traefik/.htpasswd"

  # Add the service
  [http.services]
    [http.services.service-foo]
      [http.services.service-foo.loadBalancer]
        [[http.services.service-foo.loadBalancer.servers]]
          url = "http://foo/"
        [[http.services.service-foo.loadBalancer.servers]]
          url = "http://bar/"
```

Provider Configuration

For an overview of all the options that can be set with the file provider, see the routing configuration and install configuration references.

!!! warning "Limitations"

With the file provider, Hanzo Ingress listens for file system notifications to update the dynamic configuration.

If you use a mounted/bound file system in your orchestrator (like docker or kubernetes), the way the files are linked may be a source of errors.
If the link between the file systems is broken, when a source file/directory is changed/renamed, nothing will be reported to the linked file/directory, so the file system notifications will be neither triggered nor caught.

For example, in Docker, if the host file is renamed, the link to the mounted file is broken and the container's file is no longer updated.
To avoid this kind of issue, it is recommended to:

* set the Hanzo Ingress [**directory**](#directory) configuration with the parent directory
* mount/bind the parent directory

As it is very difficult to listen to all file system notifications, Hanzo Ingress uses [fsnotify](https://github.com/fsnotify/fsnotify).
If using a directory with a mounted directory does not fix your issue, please check your file system compatibility with fsnotify.

filename

Defines the path to the configuration file.

!!! warning ""

The `filename` and `directory` options are mutually exclusive.
It is recommended to use `directory`.
providers:
  file:
    filename: /path/to/config/dynamic_conf.yml
[providers]
  [providers.file]
    filename = "/path/to/config/dynamic_conf.toml"
--providers.file.filename=/path/to/config/dynamic_conf.yml

directory

Defines the path to the directory that contains the configuration files.

!!! warning ""

The `filename` and `directory` options are mutually exclusive.
It is recommended to use `directory`.
providers:
  file:
    directory: /path/to/config
[providers]
  [providers.file]
    directory = "/path/to/config"
--providers.file.directory=/path/to/config

watch

Set the watch option to true to allow Hanzo Ingress to automatically watch for file changes. It works with both the filename and the directory options.

providers:
  file:
    directory: /path/to/dynamic/conf
    watch: true
[providers]
  [providers.file]
    directory = "/path/to/dynamic/conf"
    watch = true
--providers.file.directory=/my/path/to/dynamic/conf
--providers.file.watch=true

Go Templating

!!! warning

Go Templating only works with dedicated dynamic configuration files.
Templating does not work in the Hanzo Ingress main static configuration file.

Hanzo Ingress supports using Go templating to automatically generate repetitive sections of configuration files. These sections must be a valid Go template, and can use sprig template functions.

To illustrate, it is possible to easily define multiple routers, services, and TLS certificates as described in the following examples:

??? example "Configuring Using Templating"

```yaml tab="YAML"
http:
  routers:
    {{range $i, $e := until 100 }}
    router{{ $e }}-{{ env "MY_ENV_VAR" }}:
      # ...
    {{end}}

  services:
    {{range $i, $e := until 100 }}
    application{{ $e }}:
      # ...
    {{end}}

tcp:
  routers:
    {{range $i, $e := until 100 }}
    router{{ $e }}:
      # ...
    {{end}}

  services:
    {{range $i, $e := until 100 }}
    service{{ $e }}:
      # ...
    {{end}}

tls:
  certificates:
  {{ range $i, $e := until 10 }}
  - certFile: "/etc/traefik/cert-{{ $e }}.pem"
    keyFile: "/etc/traefik/cert-{{ $e }}.key"
    store:
    - "my-store-foo-{{ $e }}"
    - "my-store-bar-{{ $e }}"
  {{end}}
```

```toml tab="TOML"
# template-rules.toml
[http]

  [http.routers]
  {{ range $i, $e := until 100 }}
    [http.routers.router{{ $e }}-{{ env "MY_ENV_VAR" }}]
    # ...
  {{ end }}

  [http.services]
  {{ range $i, $e := until 100 }}
      [http.services.service{{ $e }}]
      # ...
  {{ end }}

[tcp]

  [tcp.routers]
  {{ range $i, $e := until 100 }}
    [tcp.routers.router{{ $e }}]
    # ...
  {{ end }}

  [tcp.services]
  {{ range $i, $e := until 100 }}
      [http.services.service{{ $e }}]
      # ...
  {{ end }}

{{ range $i, $e := until 10 }}
[[tls.certificates]]
  certFile = "/etc/traefik/cert-{{ $e }}.pem"
  keyFile = "/etc/traefik/cert-{{ $e }}.key"
  stores = ["my-store-foo-{{ $e }}", "my-store-bar-{{ $e }}"]
{{ end }}

[tls.config]
{{ range $i, $e := until 10 }}
  [tls.config.TLS{{ $e }}]
  # ...
{{ end }}
```

{% include-markdown "includes/traefik-for-business-applications.md" %}