Reverse Proxy with Caddy shows blank page

I am trying to access the GUI for the syncthing instance running on my headless orangepi from other devices on my LAN by reverse proxying with caddy.

  • reloaded syncthing with default configuration
    • added gui name + pw
    • added folder
    • connected device
  • attempting caddy with caddyv2 config provided in syncthing docs
  • ~$ sudo -E caddy run --config syncthing2.caddy --adapter caddyfile
 2025/09/25 13:19:48.281 INFO    using provided configuration    {“config_file”: “syncthing2.caddy”, “config_adapter”: “caddyfile”}
 2025/09/25 13:19:48.286 WARN    caddyfile       Using a path in a site address is deprecated; please use the ‘handle’ directive instead       {“address”: “”}
 2025/09/25 13:19:48.291 INFO    redirected default logger       {“from”: “stderr”, “to”: “stdout”}
 {“level”:“info”,“ts”:1758806388.29951,“logger”:“admin”,“msg”:“admin endpoint started”,“address”:“localhost:2019”,“enforce_origin”:false,“origins”:\[“//localhost:2019”,“//\[::1\]:2019”,“//127.0.0.1:2019”\]}
 2025/09/25 13:19:48.350 INFO    failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size for details.
 {“level”:“info”,“ts”:1758806388.3717754,“msg”:“autosaved config (load with --resume flag)”,“file”:“/home/dionysus/.config/caddy/autosave.json”}
 {“level”:“info”,“ts”:1758806388.3719318,“msg”:“serving initial configuration”}
  • navigate to 192.168.0.X/syncthing → Secure Connection Failed

    • Error code: SSL_ERROR_INTERNAL_ERROR_ALERT
  • put config into block with LAN IP

  • browser prompts with insecure page, click continue anyway

  • blank page

  • 09:29:48:(~)$curl -v 192.168.0.30/syncthing

  * Trying 192.168.0.X:80…
  * Connected to 192.168.0.X (192.168.0.X) port 80 (#0)

  > GET /syncthing HTTP/1.1
  > Host: 192.168.0.X
  > User-Agent: curl/7.88.1
  > Accept: */*

  < HTTP/1.1 308 Permanent Redirect
  < Connection: close
  < Location: https://192.168.0.X/syncthing
  < Server: Caddy
  < Date: Thu, 25 Sep 2025 13:29:54 GMT
  < Content-Length: 0
  <

  * Closing connection 0
  • increased receive buffer size
  $ sudo sysctl -w net.core.rmem_max=7500000
  net.core.rmem_max = 7500000
  $ sudo sysctl -w net.core.wmem_max=7500000
  net.core.wmem_max = 7500000
  • 192.168.0.X/syncthing still loads blank page. No access logs.
  • caddyfile:
{
        log default {
                output stdout
                format json
                level debug
                include *
        }
}

192.168.0.X {
        handle_path /syncthing/* {
                reverse_proxy http://localhost:8384 {
                        header_up Host {upstream_hostport}
                }
        }
}

I did a bunch of trouble shooting last night, and never managed to got it working. That’s why I reset my syncthing config before posting, because I didn’t keep track of all the things I had changed. I would be very grateful if anyone could help me troubleshoot.

That doesn’t tell us that much. This is most likely caddys auto redirect from http to https at work here.

EDIT: Yay, it’s working! It seems the problem was i wasn’t putting the trailing slash when actually attempting to use the reverse-proxy. orangepizero2.local/syncthing/ works as expected!

Does this help?

{
  "level": "info",
  "ts": 1758859427.5001345,
  "logger": "http.log.access.log0",
  "msg": "handled request",
  "request": {
    "remote_ip": "192.168.0.7",
    "remote_port": "41036",
    "proto": "HTTP/2.0",
    "method": "GET",
    "host": "orangepizero2.local",
    "uri": "/syncthing",
    "headers": {
      "Accept": [
        "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
      ],
      "Accept-Encoding": [
        "gzip, deflate, br, zstd"
      ],
      "Upgrade-Insecure-Requests": [
        "1"
      ],
      "Sec-Fetch-Dest": [
        "document"
      ],
      "Sec-Fetch-Site": [
        "cross-site"
      ],
      "Te": [
        "trailers"
      ],
      "User-Agent": [
        "Mozilla/5.0 (X11; Linux x86_64; rv:143.0) Gecko/20100101 Firefox/143.0"
      ],
      "Accept-Language": [
        "en-US,en;q=0.5"
      ],
      "Sec-Gpc": [
        "1"
      ],
      "Sec-Fetch-Mode": [
        "navigate"
      ],
      "Priority": [
        "u=0, i"
      ]
    },
    "tls": {
      "resumed": false,
      "version": 772,
      "cipher_suite": 4865,
      "proto": "h2",
      "server_name": "orangepizero2.local"
    }
  },
  "user_id": "",
  "duration": 5.3166e-05,
  "size": 0,
  "status": 0,
  "resp_headers": {
    "Alt-Svc": [
      "h3=\":443\"; ma=2592000"
    ],
    "Server": [
      "Caddy"
    ]
  }
}
1 Like