# \[fixed\] Docker Swarm + LetsEncrypt with just labels and command line (no TOML) not working

**URL:** <https://community.traefik.io/t/fixed-docker-swarm-letsencrypt-with-just-labels-and-command-line-no-toml-not-working/1460>\
**Category:** Traefik v2\
**Tags:** letsencrypt-acme, docker-swarm\
**Created:** [September 5, 2019, 2:54am UTC](https://community.traefik.io/t/fixed-docker-swarm-letsencrypt-with-just-labels-and-command-line-no-toml-not-working/1460 "2019-09-05T02:54:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![trajano](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/trajano/32/247_2.png) [@trajano](https://community.traefik.io/u/trajano)\
**Post date:** [September 5, 2019, 2:54am UTC](https://community.traefik.io/t/fixed-docker-swarm-letsencrypt-with-just-labels-and-command-line-no-toml-not-working/1460/1 "2019-09-05T02:54:06Z")

</div>

Similar situation as [Traefik + Docker + LetsEncrypt | Migration v1.7 =\> v2.0 | epic fail! - Traefik v2 (latest) - Traefik Labs Community Forum](https://community.containo.us/t/traefik-docker-letsencrypt-migration-v1-7-v2-0-epic-fail/1396) though I don't use configuration files and I am trying to follow [HTTP Challenge | Traefik | v2.0](https://docs.traefik.io/v2.0/user-guides/docker-compose/acme-http/) as closely as I can.

Pasting the relevant sections of the configuration, but I can add the whole thing later. I am using the staging one so I don't blow my rate limit.

```yaml
  traefik2:
    image: traefik:v2.0.0-rc2
    ports:
      - target: 80
        published: 80
        protocol: tcp
        mode: host
      - target: 443
        published: 443
        protocol: tcp
        mode: host
    command:
      - --certificatesResolvers.staging=true
      - "--certificatesResolvers.staging.acme.email=support@trajano.net"
      - "--certificatesresolvers.staging.acme.caServer=https://acme-staging-v02.api.letsencrypt.org/directory"
      - "--certificatesResolvers.staging.acme.httpchallenge=true"
      - "--certificatesResolvers.staging.acme.httpchallenge.entryPoint=http"
      - "--certificatesResolvers.staging.acme.storage=acme.json"
      - --entryPoints.http.address=:80
      - --entryPoints.https.address=:443

```

My service has

```auto
      labels:
        - traefik.enable=true
        - traefik.http.routers.portfolio.rule=Host(`trajano.net`)
        - traefik.http.routers.portfolio.service=portfolio
        - traefik.http.routers.portfolio.tls.certresolver=staging
        - "traefik.http.services.portfolio.loadbalancer.server.port=80"

```

On my logs

> edge\_traefik2.0.gdv0s3yqsbam@docker-desktop | time="2019-09-05T02:43:33Z" level=info msg=Register... providerName=staging.acme  
> edge\_traefik2.0.gdv0s3yqsbam@docker-desktop | time="2019-09-05T02:43:33Z" level=error msg="Unable to obtain ACME certificate for domains "trajano.net": cannot get ACME client ACME challenge not specified, please select TLS or HTTP or DNS Challenge" providerName=staging.acme routerName=portfolio rule="Host(`trajano.net`)"

And I am like... it's there!

```auto
      - "--certificatesResolvers.staging.acme.httpchallenge=true"

```

---

<div class="post-metadata">

**Author:** ![trajano](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/trajano/32/247_2.png) [@trajano](https://community.traefik.io/u/trajano)\
**Post date:** [September 5, 2019, 3:10am UTC](https://community.traefik.io/t/fixed-docker-swarm-letsencrypt-with-just-labels-and-command-line-no-toml-not-working/1460/2 "2019-09-05T03:10:51Z")

</div>

It appears that this was the cause

> [@trajano](#):
>
> - "--certificatesResolvers.staging.acme.storage=acme.json"

This works

```auto
- "--certificatesResolvers.staging.acme.storage=/tmp/acme.json"

```
