# Media doesn't sync behind Caddy – Error 303 when downloading media, upload works fine

**URL:** <https://forums.ankiweb.net/t/media-doesnt-sync-behind-caddy-error-303-when-downloading-media-upload-works-fine/60823>\
**Category:** Help\
**Created:** [May 12, 2025, 11:25pm UTC](https://forums.ankiweb.net/t/media-doesnt-sync-behind-caddy-error-303-when-downloading-media-upload-works-fine/60823 "2025-05-12T23:25:33Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Anon\_0000](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@Anon\_0000](https://forums.ankiweb.net/u/Anon_0000)\
**Post date:** [May 16, 2025, 11:36am UTC](https://forums.ankiweb.net/t/media-doesnt-sync-behind-caddy-error-303-when-downloading-media-upload-works-fine/60823/4 "2025-05-16T11:36:37Z")

</div>

What follows below is just a list of things that I found – it might give you ideas or even help, but it also might be useless.

1. Maybe something you can check: Does it work without caddy, using the server directly?
2. Considering you’re having issues with downloading media, maybe there is a timeout that is set too short? Apparently the Caddyfile contains something like

```auto
handle {
  reverse_proxy http://ADDRESS:PORT {
    transport http {
      read_timeout 60s
      write_timeout 60s
    }
  }
}

```

So if yours contains something similar, maybe try to increase the timeouts?

1. You’re getting `read: connection reset by peer`. Doesn’t that mean that your Anki server (so not caddy) closed the connection earlier than expected? Maybe you can adjust timeouts here as well? Or something like “keep-alive”?
2. No idea what any of those things mean, but apparently header\_up can be useful sometimes when it comes to media: [reverse\_proxy (Caddyfile directive) — Caddy Documentation](https://caddyserver.com/docs/caddyfile/directives/reverse_proxy#header_up).
3. Just because it’s so similiar regarding the error: Maybe check the things Dae mentioned in [Get HTTPError() code:303 when I try to sync](https://forums.ankiweb.net/t/get-httperror-code-303-when-i-try-to-sync/27964) (even though it’s not related to custom sync servers or caddy).

---

_[View the full topic](https://forums.ankiweb.net/t/media-doesnt-sync-behind-caddy-error-303-when-downloading-media-upload-works-fine/60823)._
