Failing to setup Dynamic DNS + Reverse Proxy for Jellyfin

Hey there, let me start by saying im a novice!

1. The problem I’m having:

I have a dynamic IP and I’m trying to setup Caddy to access my Jellyfin server thorugh my domain from anywhere. I followed this tutorial Access your Jellyfin anywhere with Caddy (At the end of the post). But i couldn’t manage to make it work. The domain is setup using Cloudflare.
How should I add the reverse proxy to the Caddyfile? I tried different ways but wasn’t succesful
And how can I make the Dynamic DNS work? I installed all the requiered plugins

2. Error messages and/or full log output:

PS C:\Users\Kilu\Desktop\Caddy> ./caddy run --config Caddyfile
2023/09/23 23:47:02.668 ←[34mINFO←[0m   using provided configuration    {"config_file": "Caddyfile", "config_adapter": ""}
2023/09/23 23:47:02.668 ←[33mWARN←[0m   Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies    {"adapter": "caddyfile", "file": "Caddyfile", "line": 2}
2023/09/23 23:47:02.674 ←[34mINFO←[0m   admin   admin endpoint started  {"address": "localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//"]}
2023/09/23 23:47:02.675 ←[34mINFO←[0m   autosaved config (load with --resume flag)      {"file": "C:\\Users\\Kilu\\AppData\\Roaming\\Caddy\\autosave.json"}
2023/09/23 23:47:02.675 ←[34mINFO←[0m   serving initial configuration
2023/09/23 23:47:02.942 ←[31mERROR←[0m  dynamic_dns     unable to lookup current IPs from DNS records   {"error": "got error status: HTTP 400: [{Code:6003 Message:Invalid request headers}]"}
2023/09/23 23:47:03.411 ←[34mINFO←[0m   dynamic_dns     updating DNS record     {"zone": "", "type": "A", "name": "@", "value": "THIS IS MY PUBLIC IP", "ttl": 0}
2023/09/23 23:47:03.636 ←[31mERROR←[0m  dynamic_dns     failed setting DNS record(s) with new IP address(es)    {"zone": "", "error": "got error status: HTTP 400: [{Code:6003 Message:Invalid request headers}]"}
2023/09/23 23:47:03.636 ←[34mINFO←[0m   dynamic_dns     finished updating DNS   {"current_ips": ["THIS IS MY PUBLIC IP"]}

3. Caddy version:


4. How I installed and ran Caddy:

a. System environment:

Windows 10 Pro, x64

b. Command:

./caddy run --config Caddyfile

c. Service/unit/compose file:

d. My complete Caddy config:

     dynamic_dns {

         # replace with your DNS provider's plugin name and credentials

         provider cloudflare 741cf9c8e478dba13cd122dc0d8fcf37

         domains {

             # DNS zone first, followed by subdomain if any (I know it's weird)


         versions ipv4


5. Links to relevant resources:

This usually means your Cloudflare API token is incorrect.

Also, I hope that isn’t your real token in your post, because you should not publish that. You’ll probably need to get a fresh token if you posted it here.

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