I’ve been researching different ways to expose Docker containers to the internet. I have three services I want to expose: Jellyfin, Omnivore (Read-it-later app), and Overseerr.

I’ve come across lots of suggestions, like using Nginx with Cloudflared, but some people mention that streaming media goes against Cloudflared tunnel TOS, and instead recommend Tailscale, or Traefik, or setting up a WireGuard VPN, or using Nginx with a WireGuard VPN.

The amount of conflicting advice has left me confused. So, what would be the best approach to securely expose these containers?

  • @[email protected]
    link
    fedilink
    English
    42 months ago
    1. Never host anything that is externally accessible
    2. If you have to, put it behind a VPN (OVPN, Wireguard, IPSec, Tailscale, etc.)
    3. Certificate based authentication is preferred for VPN tunnels
    4. Always TLS encrypt your actual endpoints. Private CAs are most secure but a pain in the ass. Let’s Encrypt is very simple to set up in most cases.

    Just my 2 cents.

    • slazer2au
      link
      fedilink
      English
      12 months ago

      How is a private CA more secure then an offline CA with cross signed intermediate signing subCA?

        • slazer2au
          link
          fedilink
          English
          12 months ago

          A public CA (Let’s Encrypt, Komodo, GoDaddy, etc) don’t actually sign certificates with their root CA certificate. The root CA creates a subCA (Or signing CA) that actually generates the certificates and the system holding the private keys of the root certificate is shutdown to prevent access but is brought back online every so often to update the revocation list.

          You said a private CA is more secure so I am wondering how that is?

          • @[email protected]
            link
            fedilink
            English
            12 months ago

            Because a private CA allows you to create a certificate and nobody else has the ability to create certificates unless you give them the keys or a signing CA. With Let’s Encrypt, you are trusting every major certificate authority to not create a cert on your domain; coupled with DNS poisoning means you would end up on a legit-looking but counterfeit website of yours.

            • slazer2au
              link
              fedilink
              English
              12 months ago

              Nothing is stopping me from making a certificate from my offline CA for your domain.

              Even if you don’t trust the certificate the traffic is still encrypted.

              • @[email protected]
                link
                fedilink
                English
                12 months ago

                Yea that’s the whole trusting trust thing. You can theoretically set up hour browser to only trust your private CA and not trust any of the publicly trusted CAs. Depends on your threat model I suppose.