Help unable to connect

1. The problem I’m having:

iam unable to connect to the https address. 
iam trying to connect my jellfin via reverse proxy to the outside world.
i am using the ddns from my asus router. and the jellfin is installed as is not in docker or something like this.. 

also i opend port 80 and 443 at the router

2. Error messages and/or full log output:

caddy[4015]: {"level":"info","ts":1706449301.4439585,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":""}

caddy[4015]: {"level":"warn","ts":1706449301.4444268,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":2}

caddy[1586]: {"level":"info","ts":1706449301.4448192,"logger":"admin.api","msg":"received request","method":"POST","host":"localhost:2019","uri":"/load","remote_ip":"127.0.0.1","remote_port":"43112","headers":{"Accept-Encoding":["gzip"],"Cache-Control":["must-revalidate"],"Content-Length":["321"],"Content-Type":["application/json"],"Origin":["http://localhost:2019"],"User-Agent":["Go-http-client/1.1"]}}

caddy[1586]: {"level":"info","ts":1706449301.445058,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}

caddy[1586]: {"level":"info","ts":1706449301.4451141,"logger":"http.auto_https","msg":"server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS","server_name":"srv0","https_port":443}

caddy[1586]: {"level":"info","ts":1706449301.445122,"logger":"http.auto_https","msg":"enabling automatic HTTP->HTTPS redirects","server_name":"srv0"}

caddy[1586]: {"level":"debug","ts":1706449301.4451373,"logger":"http.auto_https","msg":"adjusted config","tls":{"automation":{"policies":[{}]}},"http":{"servers":{"remaining_auto_https_redirects":{"listen":[":80"],"routes":[{},{}]},"srv0":{"listen":[":443"],"routes":[{"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","upstreams":[{"dial":"localhost:8096"}]}]}]}],"terminal":true}],"tls_connection_policies":[{}],"automatic_https":{}}}}}

caddy[1586]: {"level":"info","ts":1706449301.4452348,"logger":"http","msg":"enabling HTTP/3 listener","addr":":443"}

caddy[1586]: {"level":"debug","ts":1706449301.4452436,"logger":"http","msg":"starting server loop","address":"[::]:443","tls":true,"http3":true}

caddy[1586]: {"level":"info","ts":1706449301.4452472,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}

caddy[1586]: {"level":"debug","ts":1706449301.4452615,"logger":"http","msg":"starting server loop","address":"[::]:80","tls":false,"http3":false}

caddy[1586]: {"level":"info","ts":1706449301.4452648,"logger":"http.log","msg":"server running","name":"remaining_auto_https_redirects","protocols":["h1","h2","h3"]}

caddy[1586]: {"level":"info","ts":1706449301.4452672,"logger":"http","msg":"enabling automatic TLS certificate management","domains":["jellyfin.odedreut80110.asuscomm.com"]}

caddy[1586]: {"level":"info","ts":1706449301.4453213,"logger":"http","msg":"servers shutting down with eternal grace period"}

caddy[1586]: {"level":"error","ts":1706449301.445354,"logger":"tls","msg":"job failed","error":"jellyfin.odedreut80110.asuscomm.com: obtaining certificate: unable to acquire lock 'issue_cert_jellyfin.odedreut80110.asuscomm.com': context canceled"}

caddy[1586]: {"level":"info","ts":1706449301.4454193,"msg":"autosaved config (load with --resume flag)","file":"/var/lib/caddy/.config/caddy/autosave.json"}

caddy[1586]: {"level":"info","ts":1706449301.4454405,"logger":"admin.api","msg":"load complete"}

caddy[1586]: {"level":"info","ts":1706449301.44552,"logger":"tls.obtain","msg":"acquiring lock","identifier":"jellyfin.odedreut80110.asuscomm.com"}

systemd[1]: Reloaded Caddy.

caddy[1586]: {"level":"info","ts":1706449301.4464986,"logger":"admin","msg":"stopped previous server","address":"localhost:2019"}

systemd[1]: Stopping Caddy...

caddy[1586]: {"level":"info","ts":1706449329.1819098,"msg":"shutting down apps, then terminating","signal":"SIGTERM"}

caddy[1586]: {"level":"warn","ts":1706449329.1820827,"msg":"exiting; byeee!! 👋","signal":"SIGTERM"}

caddy[1586]: {"level":"info","ts":1706449329.182174,"logger":"http","msg":"servers shutting down with eternal grace period"}

caddy[1586]: {"level":"error","ts":1706449329.18257,"logger":"tls","msg":"job failed","error":"jellyfin.odedreut80110.asuscomm.com: obtaining certificate: unable to acquire lock 'issue_cert_jellyfin.odedreut80110.asuscomm.com': context canceled"}

caddy[1586]: {"level":"info","ts":1706449329.1826153,"logger":"admin","msg":"stopped previous server","address":"localhost:2019"}

caddy[1586]: {"level":"info","ts":1706449329.182643,"msg":"shutdown complete","signal":"SIGTERM","exit_code":0}

systemd[1]: caddy.service: Deactivated successfully.

systemd[1]: Stopped Caddy.

systemd[1]: Starting Caddy...

caddy[4146]: caddy.HomeDir=/var/lib/caddy

caddy[4146]: caddy.AppDataDir=/var/lib/caddy/.local/share/caddy

caddy[4146]: caddy.AppConfigDir=/var/lib/caddy/.config/caddy

caddy[4146]: caddy.ConfigAutosavePath=/var/lib/caddy/.config/caddy/autosave.json

caddy[4146]: caddy.Version=v2.7.6 h1:w0NymbG2m9PcvKWsrXO6EEkY9Ru4FJK8uQbYcev1p3A=

caddy[4146]: runtime.GOOS=linux

caddy[4146]: runtime.GOARCH=amd64

caddy[4146]: runtime.Compiler=gc

caddy[4146]: runtime.NumCPU=12

caddy[4146]: runtime.GOMAXPROCS=12

caddy[4146]: runtime.Version=go1.21.5

caddy[4146]: os.Getwd=/

caddy[4146]: LANG=en_IL

caddy[4146]: LANGUAGE=en_IL:en

caddy[4146]: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin

caddy[4146]: NOTIFY_SOCKET=/run/systemd/notify

caddy[4146]: HOME=/var/lib/caddy

caddy[4146]: LOGNAME=caddy

caddy[4146]: USER=caddy

caddy[4146]: INVOCATION_ID=4715be060b314a2ea3454d7fed54cdad

caddy[4146]: JOURNAL_STREAM=8:47281

caddy[4146]: SYSTEMD_EXEC_PID=4146

caddy[4146]: {"level":"info","ts":1706449329.2810054,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":""}

caddy[4146]: {"level":"warn","ts":1706449329.2816067,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":2}

caddy[4146]: {"level":"info","ts":1706449329.2819114,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//127.0.0.1:2019","//localhost:2019","//[::1]:2019"]}

caddy[4146]: {"level":"info","ts":1706449329.28197,"logger":"http.auto_https","msg":"server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS","server_name":"srv0","https_port":443}

caddy[4146]: {"level":"info","ts":1706449329.2819774,"logger":"http.auto_https","msg":"enabling automatic HTTP->HTTPS redirects","server_name":"srv0"}

caddy[4146]: {"level":"debug","ts":1706449329.2819943,"logger":"http.auto_https","msg":"adjusted config","tls":{"automation":{"policies":[{}]}},"http":{"servers":{"remaining_auto_https_redirects":{"listen":[":80"],"routes":[{},{}]},"srv0":{"listen":[":443"],"routes":[{"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","upstreams":[{"dial":"localhost:8096"}]}]}]}],"terminal":true}],"tls_connection_policies":[{}],"automatic_https":{}}}}}

caddy[4146]: {"level":"info","ts":1706449329.2820728,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc0005dcb00"}

caddy[4146]: {"level":"info","ts":1706449329.2821786,"logger":"http","msg":"enabling HTTP/3 listener","addr":":443"}

caddy[4146]: {"level":"debug","ts":1706449329.2822812,"logger":"http","msg":"starting server loop","address":"[::]:443","tls":true,"http3":true}

caddy[4146]: {"level":"info","ts":1706449329.282286,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}

caddy[4146]: {"level":"debug","ts":1706449329.282303,"logger":"http","msg":"starting server loop","address":"[::]:80","tls":false,"http3":false}

caddy[4146]: {"level":"info","ts":1706449329.282306,"logger":"http.log","msg":"server running","name":"remaining_auto_https_redirects","protocols":["h1","h2","h3"]}

caddy[4146]: {"level":"info","ts":1706449329.2823086,"logger":"http","msg":"enabling automatic TLS certificate management","domains":["jellyfin.odedreut80110.asuscomm.com"]}

caddy[4146]: {"level":"info","ts":1706449329.2824168,"msg":"autosaved config (load with --resume flag)","file":"/var/lib/caddy/.config/caddy/autosave.json"}

caddy[4146]: {"level":"info","ts":1706449329.2824357,"msg":"serving initial configuration"}

systemd[1] : Started Caddy.

caddy[4146]: {"level":"info","ts":1706449329.2839026,"logger":"tls.obtain","msg":"acquiring lock","identifier":"jellyfin.odedreut80110.asuscomm.com"}

caddy[4146]: {"level":"warn","ts":1706449329.2859483,"logger":"tls","msg":"storage cleaning happened too recently; skipping for now","storage":"FileStorage:/var/lib/caddy/.local/share/caddy","instance":"17b53d25-ce7f-4f7a-8659-2c7464631914","try_again":1706535729.285947,"try_again_in":86399.999999749}

caddy[4146]: {"level":"info","ts":1706449329.2859788,"logger":"tls","msg":"finished cleaning storage units"}

3. Caddy version:

v2.7.6 h1:w0NymbG2m9PcvKWsrXO6EEkY9Ru4FJK8uQbYcev1p3A=

4. How I installed and ran Caddy:

from https://caddyserver.com/docs/install under Ubuntu part : 

sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy

a. System environment:

Ubuntu 22.04.3 LTS - Desktop in headless mode?

b. Command:

sudo systemctl status caddy
sudo systemctl reload caddy
sudo systemctl stop caddy
sudo systemctl restart caddy
sudo journalctl -u caddy --no-pager | less +G > ~/debug.log

c. Service/unit/compose file:

no Docker/systemd/Kubernetes/make
i am using reguler systemctl

d. My complete Caddy config:

{
	debug
}

jellyfin.odedreut80110.asuscomm.com {
	reverse_proxy localhost:8096
}

I don’t think this domain resolves to an IP address with DNS. It seems like odedreut80110.asuscomm.com does though. Are you sure your DDNS supports subdomains?