this post was submitted on 19 Jan 2025
77 points (94.3% liked)

Selfhosted

60542 readers
422 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

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?

you are viewing a single comment's thread
view the rest of the comments
[–] sxan@midwest.social 3 points 1 year ago

@shimitar's advice is what I'd go with.

Ideally:

  1. Set up a Wireguard subnet. Test it thoroughly, including restarting the server a couple of times.
  2. Close all ports except your Wireguard ports in your server firewall. Do this manually first (not persistent) and test.
  3. Make the firewall changes permanent.

Then, it kinda doesn't matter what else you do on the server, although you can fuss around with locking things down more.

Caveats:

  • you won't be able to use LetsEncrypt with this
  • accessing your services from an Android phone will be futzy, because Android is too stupid to be able to use more than one VPN at a time. Unless you don't use a VPN on your phone, in which case it won't be an issue.
  • you'll only be able to access your server from computers/systems in your Wireguard subnet, so make sure you include multiple devices in the config from which you can ssh

Wireguard is super easy to build VPN networks with, and there are tools (e.g. dsnet) to make it even easier.