# Migrating from v1 to v2 and having a difficult time

**URL:** <https://community.traefik.io/t/migrating-from-v1-to-v2-and-having-a-difficult-time/24888>\
**Category:** Traefik v2\
**Tags:** docker\
**Created:** [October 23, 2024, 4:44pm UTC](https://community.traefik.io/t/migrating-from-v1-to-v2-and-having-a-difficult-time/24888 "2024-10-23T16:44:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lastb0isct](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/lastb0isct/32/9452_2.png) [@lastb0isct](https://community.traefik.io/u/lastb0isct)\
**Post date:** [October 23, 2024, 4:44pm UTC](https://community.traefik.io/t/migrating-from-v1-to-v2-and-having-a-difficult-time/24888/1 "2024-10-23T16:44:39Z")

</div>

I am having a tough time making sure that all of my settings are right. I know I need to migrate my labels in my docker compose file from v1 to v2, but there is no easy page that lists "this v1 label = this v2 label".

Here is an example of my v1 traefik labels on one of my containers:

```auto
      - "traefik.enable=true"
      - "traefik.backend=random"
      - "traefik.frontend.rule=Host:random.test.com"
      - "traefik.frontend.auth.forward.address=http://organizr/api/v2/auth?group=1"
      - "traefik.port=8990"
      - "traefik.docker.network=traefik_proxy"
      - "traefik.frontend.headers.SSLRedirect=true"
      - "traefik.frontend.headers.STSSeconds=315360000"
      - "traefik.frontend.headers.browserXSSFilter=true"
      - "traefik.frontend.headers.contentTypeNosniff=true"
      - "traefik.frontend.headers.forceSTSHeader=true"
      - "traefik.frontend.headers.SSLHost=example.com"
      - "traefik.frontend.headers.STSIncludeSubdomains=true"
      - "traefik.frontend.headers.STSPreload=true"
      - "traefik.frontend.headers.frameDeny=false"

```

Here are the labels of my v1 traefik container directly:

```auto
      - "traefik.enable=true"
      - "traefik.backend=traefik"
      - "traefik.frontend.rule=Host:traefik.${DOMAINNAME}"  
      - "traefik.frontend.auth.forward.address=http://organizr/api/v2/auth?group=1"
      - "traefik.port=8080"
      - "traefik.docker.network=traefik_proxy"
      - "traefik.frontend.headers.SSLRedirect=true"
      - "traefik.frontend.headers.STSSeconds=315360000"
      - "traefik.frontend.headers.browserXSSFilter=true"
      - "traefik.frontend.headers.contentTypeNosniff=true"
      - "traefik.frontend.headers.forceSTSHeader=true"
      - "traefik.frontend.headers.SSLHost=example.com"
      - "traefik.frontend.headers.STSIncludeSubdomains=true"
      - "traefik.frontend.headers.STSPreload=true"
      - "traefik.frontend.headers.frameDeny=false"
      - "traefik.frontend.auth.basic.users=${HTTP_USERNAME}:${HTTP_PASSWORD}"

```

Does anyone have an easy drop-in replacement for these? I feel like they're pretty straightforward but the docs don't give me an easy 1-to-1 for this.

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [October 24, 2024, 7:15am UTC](https://community.traefik.io/t/migrating-from-v1-to-v2-and-having-a-difficult-time/24888/2 "2024-10-24T07:15:33Z")

</div>

Compare to [simple Traefik example](https://github.com/bluepuma77/traefik-best-practice/tree/main/docker-traefik-dashboard-letsencrypt) for v2/v3.

---

<div class="post-metadata">

**Author:** ![lastb0isct](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/lastb0isct/32/9452_2.png) [@lastb0isct](https://community.traefik.io/u/lastb0isct)\
**Post date:** [October 24, 2024, 3:57pm UTC](https://community.traefik.io/t/migrating-from-v1-to-v2-and-having-a-difficult-time/24888/3 "2024-10-24T15:57:05Z")

</div>

I have looked at tons of examples and can't find anything that does forward auth address in the new version. I honestly can't find anything that replaces the frontend.headers options that I have specified...are those just not needed anymore?

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [October 24, 2024, 4:53pm UTC](https://community.traefik.io/t/migrating-from-v1-to-v2-and-having-a-difficult-time/24888/4 "2024-10-24T16:53:44Z")

</div>

[Traefik ForwardAuth doc](https://doc.traefik.io/traefik/middlewares/http/forwardauth/).

[Traefik headers doc](https://doc.traefik.io/traefik/middlewares/http/headers/).
