# Can't access Cells behind a Caddy reverse proxy

**URL:** <https://forum.pydio.com/t/cant-access-cells-behind-a-caddy-reverse-proxy/2517>\
**Category:** Pydio Cells\
**Tags:** install\
**Created:** [May 24, 2019, 6:30am UTC](https://forum.pydio.com/t/cant-access-cells-behind-a-caddy-reverse-proxy/2517 "2019-05-24T06:30:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vustom](https://avatars.discourse-cdn.com/v4/letter/v/5f9b8f/32.png) [@vustom](https://forum.pydio.com/u/vustom)\
**Post date:** [May 24, 2019, 6:30am UTC](https://forum.pydio.com/t/cant-access-cells-behind-a-caddy-reverse-proxy/2517/1 "2019-05-24T06:30:32Z")

</div>

I’m trying to use Caddy to reverse proxy Pydio Cells (separate from the one build into Cells). I have Cells set to `localhost:8080` with SSL Disabled, so port 80 and 443 are free for Caddy to use.

[This Pydio Cells document](https://pydio.com/en/docs/kb/devops/running-cells-behind-caddy-reverse-proxy) suggests what I’m trying to do is possible, but I haven’t gotten anywhere using the provided Caddyfile, as `pydio.example.com` returns with error 404. I’ve also tried `0.0.0.0:8080` but I end up with an endless loading screen.

I’ve been trying to figure this out for ages, if someone could help that’d be great! 🙂

Caddyfile:

```
https://pydio.example.com:443 {

    log stdout

    timeouts 0

    proxy / http://localhost:8080 {
        insecure_skip_verify
        transparent
        websocket
    }

    tls {
        dns cloudflare
    }

}
```

---

<div class="post-metadata">

**Author:** ![zayn](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zayn](https://forum.pydio.com/u/zayn)\
**Post date:** [May 24, 2019, 9:48am UTC](https://forum.pydio.com/t/cant-access-cells-behind-a-caddy-reverse-proxy/2517/2 "2019-05-24T09:48:18Z")

</div>

Hello @vustom,

With the same Caddyfile as you showed me in your post,  
Could you please modify your `urlInternal` setting in the `pydio.json` to one of those 2 values:

- defaults.urlInternal =\> [http://0.0.0.0:8080](http://0.0.0.0:8080)
- defaults.urlInternal =\> [http://pydio.example.com:8080](http://pydio.example.com:8080)

and restart your Cells.

---

<div class="post-metadata">

**Author:** ![vustom](https://avatars.discourse-cdn.com/v4/letter/v/5f9b8f/32.png) [@vustom](https://forum.pydio.com/u/vustom)\
**Post date:** [May 25, 2019, 1:59am UTC](https://forum.pydio.com/t/cant-access-cells-behind-a-caddy-reverse-proxy/2517/3 "2019-05-25T01:59:11Z")

</div>

Hey @zayn, thanks for the quick reply!

Edit 2: After some more trial and error, I got it working using this setup:

Configure Cells install with:

Internal Url: [pydio.example.com:8080](http://pydio.example.com:8080)  
Self-signed: Y  
Bind to port 80: N  
External Url: [https://pydio.example.com](https://pydio.example.com) (Remove `:8080` if present)

Then change `http://localhost:8080` to `https://localhost:8080` in Caddyfile.

This was clearer in [this Pydio document](https://pydio.com/en/docs/kb/devops/running-cells-behind-apache-reverse-proxy) outlining an example Apache reverse proxy, I just didn’t put the two together till reading that wiki post.

---

<div class="post-metadata">

**Author:** ![vustom](https://avatars.discourse-cdn.com/v4/letter/v/5f9b8f/32.png) [@vustom](https://forum.pydio.com/u/vustom)\
**Post date:** [June 3, 2019, 1:27pm UTC](https://forum.pydio.com/t/cant-access-cells-behind-a-caddy-reverse-proxy/2517/4 "2019-06-03T13:27:40Z")

</div>

I managed to get Cells working using `localhost:8080` as the Internal Url.

On install, choose the following:

Internal Url: localhost:8080  
External Url: [https://pydio.example.com](https://pydio.example.com) (Remove `:8080` if present)

Then set `header_upstream Host` to `localhost` in Caddyfile (If preferred, `{>host}` works instead of `localhost`). I’m pretty sure leaving `transparent` in continues to pass the other headers. End result should be:

```
proxy / https://localhost:8080 {
    insecure_skip_verify
    transparent
    header_upstream Host localhost
    websocket
}

```

@zayn

Do you think this config is preferable over having the FQDN as Internal Url?

---

<div class="post-metadata">

**Author:** ![bsinou](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/bsinou/32/476_2.png) [@bsinou](https://forum.pydio.com/u/bsinou)\
**Post date:** [June 4, 2019, 5:53pm UTC](https://forum.pydio.com/t/cant-access-cells-behind-a-caddy-reverse-proxy/2517/5 "2019-06-04T17:53:56Z")

</div>

Hello,

in such a vanillasetup with a Cells instance behnd a Caddy reverse proxy on a single machine, we usually recommand to use  
Internal URL: [pydio.example.com:8080](http://pydio.example.com:8080)  
ExternalURL: [https://pydio.example.com](https://pydio.example.com)

And for the caddy file:

```auto
proxy / http://localhost:8080 {
    transparent
    websocket
}

```

=\> using a TLS connection locally between your reverse proxy and Cells has a cost and I don’t really see the point if your server is secured  
=\> having the normal transparent directive is required for the integration with other services like webdav to work smoothly
