1. The problem I’m having:
I’ve tried doing this so many different ways on different days, but I just can’t get it to work. And it’s especially frustrating since so many people say it’s so easy to do. So hopefully someone here can explain it to me like I’m 5.
I have a QNAP NAS that I’m trying to install Caddy on simply for the reverse-proxy.
I’ve tried installing it via Explore in Container Station, but I have no idea what to do for the Advanced Settings and it doesn’t seem to do anything as is.
I’ve tried installing it via Applications > Create in Container Station, but it says there’s something wrong with my YAML code when websites say the code is fine.
What I’ve done most recently is installed Caddy2 from App Center via the MyQNAP repo, but for some reason I wonder if it’s not as safe as the others.
I do think I might be close doing it this way and my guess is I need to edit Caddy2.sh in the Caddy2 folder and put a Caddyfile somewhere, but to what and where I don’t know. I see /etc/caddy/Caddyfile referenced a lot in documentation, but when I tried to make the dir caddy in etc I got “permission denied”. Is this etc dir not in the root dir, but somewhere else? Sorry, I’m still new to linux. Via the find command I see multiple etc folders.
I don’t see the Caddyfile’s path referenced at all in Caddy2.sh however. It should, right?
And after doing all that I now have a bunch of caddy folders and files way down in my Container folder (it looks like removals didn’t remove everything) that I can see from File Station, but they all seem to just be copies of the defaults.
The one thing I do think I understand is what to put in my Caddyfile. It’s simply:
something.myqnapcloud.com {
reverse_proxy localhost:8920
}
But even that I’m not sure. 8920 is the default port for Jellyfin.
I do know how to ssh, but I’m not great at it as I’m only just now learning linux. I can move around the folders and create and delete stuff, but that’s about it. I’ve read countless webpages and watched several videos on setting up caddy, but they either skip steps or are talking about some other way of setting it up.
Am I correct in understanding that once Caddy is setup that I don’t have to change anything in Jellyfin’s networking page? Like the checkbox enabling HTTPS or the path to the ssl cert? I’ve read the Caddy takes care of everything, but I wonder if the answer to that is, “well, not exactly”.
I also noticed there’s a reverse proxy in QNAP’s Control Panel > Network Access page, which appears to be even simpler than Caddy, but I’m not even sure what to enter for it and I don’t know if it’s a good enough substitute for Caddy or not.
I got everything else I wanted on the NAS set up fine so I’m not a total idiot. I’d just like to make it more secure. Thank you.
2. Error messages and/or full log output:
Permission denied
3. Caddy version:
When I tried via Create in Container Station I tried latest (2.8.4). I’m not sure what version it used when I searched from Explore in Container Station. When I installed it from MyQNAP repo via App Center it said 2.8.2.
4. How I installed and ran Caddy:
a. System environment:
First I tried via Explore in QNAP’s Container Station. Then I tried via Create in in QNAP’s Container Station. Then I tried via MyQNAP repo in QNAP’s App Center.
b. Command:
I haven’t successfully run any Caddy commands. I’m under the impression it’s not even necessary for what I’m trying to do. I did read the Caddy documentation and saw that it said to put caddy and curl in PATH, but I’m not even sure where PATH is on QNAP.
c. Service/unit/compose file:
services:
caddy:
image: caddy:2.8.4
restart: unless-stopped
ports:
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./site:/srv
- caddy_data:/data
- caddy_config:/config
volumes:
caddy_data:
caddy_config:
d. My complete Caddy config:
something.myqnapcloud.com {
reverse_proxy localhost:8920
}
5. Links to relevant resources:
Oh man, I’ve read so many webpages on this topic now that I’m in a daze from it all.