How can I configure Caddy as a reverse-proxy to handle both nextcloud and node-red on different servers

1. The problem I’m having:

Before I had installed Caddy and Nextcloud, I was able to connect to NodeRed from everywhere, currently it is impossible.

I want to use caddy as reverse-proxy (running on server1) for nextcloud (running on server 2) and NodeRed (running on server1). Nextcloud is running fine, but NodeRed could not be connected to.
In the router, the ports 80, 443 and 18800=>1880 are forwarded (to server 1).
So far I can connect to NodeRed only using http, https is not configured.
question: Is it possible using caddy to connect NodeRed using http?

2. Error messages and/or full log output:

Caddy shows no errors or debug entries, the browsers shows:

Chromium (linux, same WLAN):

Diese Website kann keine sichere Verbindung bereitstellen
mydomain.ddns.net hat eine ungültige Antwort gesendet.
ERR_SSL_PROTOCOL_ERROR
(This website cannot provide a secure connection
mydomain.ddns.net has sent an invalid response.)

Safari (Mobile, LTE):
Safari could not open the page, since the server does not answer

Brave (Mobile, LTE):
An SSL error has occurred and a secure connection to the server cannot be made.

Testing http curl -v mydomain.ddns.net:18800 (Port 18800 is fowarded to 1880 in the router) works on both, (LTE and WLAN), but https not (.OpenSSL/3.0.13: error:0A00010B:SSL routines::wrong version number)

* Connected to mydomain.ddns.net (xx.xxx.xx.xxx) port 18800
> GET / HTTP/1.1
> Host: mydomain.ddns.net:18800
> User-Agent: curl/8.5.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Access-Control-Allow-Origin: *
< Content-Type: text/html; charset=utf-8
< Content-Length: 1571
< ETag: W/"623-vTZkh+zZikS4a6Al/TJ6XuJddK0"
< Date: Mon, 28 Jul 2025 11:32:48 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
< 
<!DOCTYPE html>
<html>
...
...
</body>
</html>
* Connection #0 to host mydomain.ddns.net left intact

3. Caddy version:

v2.10.0 h1

4. How I installed and ran Caddy:

With docker.

docker compose up 

a. System environment:

Docker version 28.3.2 running on raspberrypi (Linux smarthome4 6.12.25+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.25-1+rpt1 (2025-04-30) aarch64 GNU/Linux)

b. Command:

docker compose up (on server 1, 192.168.0.14)

c. Service/unit/compose file:

docker-compose.yml:

services:
  caddy:
    image: caddy:latest
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
      - "443:443/udp"
    volumes:
      - ./conf:/etc/caddy
      - ./certs:/certs
      - ./site:/srv
      - caddy_data:/data
      - caddy_config:/config

volumes:
  caddy_data:
  caddy_config:

d. My complete Caddy config:

{
	debug
}
mydomain.ddns.net:1880 {
	reverse_proxy 192.168.0.14:1880
}
mydomain.ddns.net:443 {
	reverse_proxy 192.168.0.93:11000
}

5. Links to relevant resources:

I will close this Topic. The solution using vpn seems easy and fast.

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