• 2 Posts
  • 15 Comments
Joined 2 years ago
cake
Cake day: December 30th, 2023

help-circle
  • gibdos@lemmy.worldtoSelfhosted@lemmy.worldHelp? Caddy reverse proxy
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    14 hours ago

    One last thing. I assume you checked if your DNS changes got propagated? I tend to use DNS Checker. And even if the changes are propagated, it can sometimes still not work because of DNS cache in

    • your browser
    • your pc
    • your router

    So assuming that you checked the DNS propagation and it was propagated enough, I’d also

    • clean all DNS caches from browser, pc and router
    • try different, large DNS provider (Google, Cloudflare, etc.)
    • try the domain in a different browser / private window
    • try it on my phone over mobile network and not wifi

    I recently had the problem that the custom secure DNS I use on Firefox took almost a day to update their cache, while every other provider had my changes in a couple of minutes at most.


  • Okey, so if you skip the whole DNS and use http://PUBLICIP:PORT for any of your docker services, does your browser reach them?

    You said you have Caddy on bare metal Ubuntu and your services in CasaOS. Sadly I’ve never used that, but is that a VM on your Ubuntu Server and inside that run your docker containers? If so, maybe that’s what’s stopping Caddy from reaching your containers?! Just guessing tbh.


  • You need to point your sub-domain in the Caddyfile to your designated local port. So just add an entry like this to your Caddyfile

    sub.yourdomain.com {
      reverse_proxy XXX.XXX.XXX.XXX:PORT {
       header_up X-Real-IP {remote_host}
      }
      encode zstd gzip
    }```
    
    Replace XXX with your public IP and PORT with the local port in your docker container / compose.



  • The amount of baseless Ubuntu Server hate in this sub is pretty sad. I’ve used Ubuntu Server, without any problems, for more than a decade. And at no point where there any significant changes to the way things are done. So I really think your comment about articles becoming useless has no basis in reality.

    As for using your own hardware. Nothing in this guide necessarily requires a VPS. And you seem to completely ignore the upkeep and electricity costs of having your own hardware at home.

    Not to mention the convenience of a public IP, which is something not every ISP around the world offers. And yes, you can use a dynamic DNS provider to get around that, but then you publish your private IP onto the entire internet.

    The guide was focused on being as simple and convenient as possible, with the target audience being absolute beginners to self-hosting. If it doesn’t speak to you, feel free to write your own.