run powershell as admin

sc.exe create Caddy binPath= "C:\caddy\caddy.exe run" start= auto
creates windows service


sc.exe start Caddy
runs caddy

sc.exe query Caddy
verify its running

sc.exe stop Caddy
sc.exe start Caddy
stop or restart if you need it


ipconfig


---

chatgpt summary
1️⃣ Caddy installation

Downloaded caddy_windows_amd64.exe

Moved to C:\caddy\ and renamed to caddy.exe

Folder structure:

C:\caddy\
├── caddy.exe
└── Caddyfile

2️⃣ Caddyfile configuration

Open Caddyfile in Notepad

Set it to point to your Jellyfin LAN IP:

tolkki.freemyip.com {
    reverse_proxy 192.168.40.111:8096
}


Save changes

3️⃣ Running Caddy as a Windows service

Create the service:

sc.exe create Caddy binPath= "C:\caddy\caddy.exe run" start= auto


Start the service:

sc.exe start Caddy


Restart Caddy after edits:

sc.exe stop Caddy
sc.exe start Caddy


Verify with:

sc.exe query Caddy


Status should show RUNNING ✅

4️⃣ Jellyfin network settings

Bind Jellyfin to your LAN IP: 192.168.40.111

Dashboard → Networking → Bind to IP Address

Set Public HTTPS port to 443

Restart Jellyfin

5️⃣ Router / firewall configuration

Remove/disable port forward for 8096 → WAN

Leave port 443 open and forwarded to your PC running Caddy

Optional: block 8096 in Windows firewall for extra security

6️⃣ Testing

LAN access: http://192.168.40.111:8096 → works ✅

WAN access: https://tolkki.freemyip.com → works with HTTPS ✅

Caddy handles automatic HTTPS certificates and renewal