# Cells sync/grpc behind traefik

**URL:** <https://forum.pydio.com/t/cells-sync-grpc-behind-traefik/4985>\
**Category:** Pydio Cells\
**Created:** [February 14, 2023, 9:05pm UTC](https://forum.pydio.com/t/cells-sync-grpc-behind-traefik/4985 "2023-02-14T21:05:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nappy](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/nappy/32/2000_2.png) [@nappy](https://forum.pydio.com/u/nappy)\
**Post date:** [February 14, 2023, 9:05pm UTC](https://forum.pydio.com/t/cells-sync-grpc-behind-traefik/4985/1 "2023-02-14T21:05:14Z")

</div>

I configured cells like this:

```auto
version: "3.8"
services:

    cells:
        image: pydio/cells
        restart: unless-stopped
        networks:
            - traefik
            - default
        volumes:
            - cellsdir:/var/cells
            - data:/var/cells/data
        environment:
            - CELLS_SITE_BIND=:443
            - CELLS_SITE_EXTERNAL=https://pydio.${DOMAIN}
        labels:
            - "traefik.enable=true"
            - "traefik.docker.network=traefik"
            - "traefik.http.routers.pydio.rule=Host(`pydio.${DOMAIN}`)"
            - "traefik.http.routers.pydio.tls=true"
            - "traefik.http.routers.pydio.service=pydio"
            - "traefik.http.services.pydio.loadbalancer.server.scheme=https"
            - "traefik.http.services.pydio.loadbalancer.server.port=443"
        depends_on:
            - mysql

    mysql:
        image: mysql:8
        restart: unless-stopped
        environment:
            MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
            MYSQL_DATABASE: cells
            MYSQL_USER: pydio
            MYSQL_PASSWORD: ${MYSQL_PASSWORD}
        command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci]
        volumes:
            - mysqldir:/var/lib/mysql

volumes:
    data:
        driver: local
    cellsdir:
        driver: local
    mysqldir:
        driver: local

networks:
    traefik:
        external: true

```

traefik.toml

```auto
defaultEntryPoints = ["websecure"]

[serversTransport]
  insecureSkipVerify = true

[entryPoints]
  [entryPoints.web]
    address = ":80"
  [entryPoints.web.http]
    [entryPoints.web.http.redirections]
      [entryPoints.web.http.redirections.entryPoint]
        to = "websecure"
        scheme = "https"
        permanent = true

  [entryPoints.websecure]
    address = ":443"

[certificatesResolvers.letsencrypt.acme]
  email = "admin@example.com"
  storage = "acme.json"
  [certificatesResolvers.letsencrypt.acme.dnsChallenge]
    provider = "cloudflare"
    delayBeforeCheck = "30"

[retry]

[api]
  dashboard = true

[providers.docker]
  exposedbydefault = false

[providers]
  [providers.file]
    filename = "/dynamic_conf.toml"
    watch = true
    

```

Cells Sync fails to select a sync folder:

> cannot connect (authorization error 403) : unexpected HTTP status code received from server: 403 (Forbidden); malformed header: missing HTTP content-type

According to everything I read and tried this configuration should work. What I am missing here?

If I bypass cloudflare and connect to traefik directly I get this error instead:

> unexpected HTTP status code received from server: 404 (Not Found); transport: received unexpected content-type “text/plain; charset=utf-8”

---

<div class="post-metadata">

**Author:** ![jaimedelano](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/jaimedelano/32/2342_2.png) [@jaimedelano](https://forum.pydio.com/u/jaimedelano)\
**Post date:** [April 12, 2023, 2:58pm UTC](https://forum.pydio.com/t/cells-sync-grpc-behind-traefik/4985/2 "2023-04-12T14:58:05Z")

</div>

Is Cloudflare gRPC enabled? Default setting is disabled.  
Follow the instructions below to enable gRPC:

- Log in to your Cloudflare account
- Select the appropriate domain
- Click the Network app
- Toggle the gRPC

---

<div class="post-metadata">

**Author:** ![nappy](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/nappy/32/2000_2.png) [@nappy](https://forum.pydio.com/u/nappy)\
**Post date:** [April 13, 2023, 3:06pm UTC](https://forum.pydio.com/t/cells-sync-grpc-behind-traefik/4985/3 "2023-04-13T15:06:21Z")

</div>

Thanks for your response, the option was indeed missing from my setup.  
Now after adding it though, I get the same error as If I bypass cloudflare:

> unexpected HTTP status code received from server: 404 (Not Found); transport: received unexpected content-type “text/plain; charset=utf-8”

Is this page still up to date? From my understanding I choose the left path with SSL enabled (using a self signed cert) on Cells by setting

```auto
CELLS_SITE_BIND=:443
CELLS_SITE_NO_TLS=0
CELLS_SITE_EXTERNAL=https://pydio.${DOMAIN}

```

or am I still missing something?

> **[Setup Cells Server for CellsSync](https://pydio.com/en/docs/kb/client-applications/setup-cells-server-cellssync)**
>
> This article shows some tips and tricks to correctly configure Pydio Cells for the Pydio CellsSync client application.

According to this page [Traefik Proxy gRPC Examples - Traefik](https://doc.traefik.io/traefik/user-guides/grpc/) grpc shoud just work if accessing the service through https. The cells website is working.

---

<div class="post-metadata">

**Author:** ![jaimedelano](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/jaimedelano/32/2342_2.png) [@jaimedelano](https://forum.pydio.com/u/jaimedelano)\
**Post date:** [April 13, 2023, 6:06pm UTC](https://forum.pydio.com/t/cells-sync-grpc-behind-traefik/4985/4 "2023-04-13T18:06:48Z")

</div>

Unfortunately I can’t be of more help to you in this regard, as I don’t use Traefik.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex032/uploads/pydio/original/2X/6/61f19fa52ec15fd4250db51aea351adba0e831fd.png) [@system](https://forum.pydio.com/u/system)\
**Post date:** [June 12, 2023, 6:06pm UTC](https://forum.pydio.com/t/cells-sync-grpc-behind-traefik/4985/5 "2023-06-12T18:06:53Z")

</div>

Closed on June 12, 2023, 6:06pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
