# Caddy reverse proxy, node-red, and Tailscale

**URL:** https://discourse.nodered.org/t/caddy-reverse-proxy-node-red-and-tailscale/65150
**Category:** General
**Created:** [15 July 2022 16:45 UTC](https://discourse.nodered.org/t/caddy-reverse-proxy-node-red-and-tailscale/65150 "2022-07-15T16:45:10Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jmorris644](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jmorris644/32/31964_2.png) [@jmorris644](https://discourse.nodered.org/u/jmorris644)
#### Post date: [15 July 2022 16:45 UTC](https://discourse.nodered.org/t/caddy-reverse-proxy-node-red-and-tailscale/65150/1 "2022-07-15T16:45:10Z")

</div>

I am trying to get Caddy to do a reverse proxy using a specific port for some httpIn nodes as well as get my tailscale to let me in the Admin and UI areas. I just cannot get the right Caddyfile config. When I try different things either I get hangups on the httpIn nodes or i get disconnect errors on the tailscale access.

```auto
mydomain.com:8000 {
        @websockets {
                header Connection *Upgrade*
                header Upgrade websocket
        }

        reverse_proxy @websockets localhost:1880

}

mydomain.ts.net {
       @websockets {
               header Connection *Upgrade*
               header Upgrade websocket
       }

        reverse_proxy @websockets localhost:1880

}

```

---

<div class="post-metadata">

### Author: ![Shan](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@Shan](https://discourse.nodered.org/u/Shan)
#### Post date: [15 July 2022 16:51 UTC](https://discourse.nodered.org/t/caddy-reverse-proxy-node-red-and-tailscale/65150/2 "2022-07-15T16:51:41Z")

</div>

I do not use caddy very often, but are you exposing node-RED with a dedicate Root URL? something like `http://localhost/nodered`? If so you might want to adapt the `settings.js` file accordingly to make it reachable via the reverse proxy

---

<div class="post-metadata">

### Author: ![jmorris644](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jmorris644/32/31964_2.png) [@jmorris644](https://discourse.nodered.org/u/jmorris644)
#### Post date: [15 July 2022 19:54 UTC](https://discourse.nodered.org/t/caddy-reverse-proxy-node-red-and-tailscale/65150/3 "2022-07-15T19:54:21Z")

</div>

I am using a dedicated httpAdminRoot in settings.js for node-red. I am not quite following what you are trying to tell me.

---

<div class="post-metadata">

### Author: ![Shan](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@Shan](https://discourse.nodered.org/u/Shan)
#### Post date: [16 July 2022 09:36 UTC](https://discourse.nodered.org/t/caddy-reverse-proxy-node-red-and-tailscale/65150/4 "2022-07-16T09:36:03Z")

</div>

This is was the setting I was mentioning about. Do you have some logs from Caddy or your browser that might help solving this issue? Without them it is hard figure out what might be happening

---

<div class="post-metadata">

### Author: ![jmorris644](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jmorris644/32/31964_2.png) [@jmorris644](https://discourse.nodered.org/u/jmorris644)
#### Post date: [16 July 2022 11:34 UTC](https://discourse.nodered.org/t/caddy-reverse-proxy-node-red-and-tailscale/65150/5 "2022-07-16T11:34:38Z")

</div>

There are no logs in the Caddy log dir. And what I get back from the browser is just a single line wrap.

If I remove the custom dir from settigns.js I get the same result.

I should mention that this is working for HttpIn nodes just fine.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [14 September 2022 11:35 UTC](https://discourse.nodered.org/t/caddy-reverse-proxy-node-red-and-tailscale/65150/6 "2022-09-14T11:35:11Z")

</div>

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