this post was submitted on 11 May 2025
354 points (99.4% liked)

Selfhosted

46672 readers
1311 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:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

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

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

Thanks to this community I've learned and I'm feeling inspired. I've loved having an NAS for the last few years, but it's woefully under powered for what I'm using it for these days.

So I've ordered some basic PC parts, gonna build a basic setup using an old CPU I got lying about and try the NAS OS I saw talked about on here recently.

TrueNAS looks like a good option with only slight fears it'll go down the well known path to the dark side like so many free options before.

In any event, I'm looking forward to adding Nextcloud and Jellyfin, to trying out Docker and generally having more control over things.

Thanks again to you all for informing and inspiring.

I'll be back if I get questions!

you are viewing a single comment's thread
view the rest of the comments
[–] _____@lemm.ee 2 points 3 days ago (5 children)

What's the self hosted guide to security when opening up ports to the public ?

[–] dan@upvote.au 10 points 3 days ago* (last edited 2 days ago) (2 children)

Don't. Use a VPN like Tailscale or Wireguard. Tailscale uses the Wireguard protocol but it's very easy to configure, and will automatically set up a peer-to-peer mesh network for you (each node on the VPN can directly reach any other node, without having to route through a central server).

The only things that should be exposed publicly are things that absolutely need to be - for example, parts of Home Assistant need to be publicly exposed if you use the Google Assistant or Alexa integrations, since Google and Amazon need to be able to reach it.

[–] randint@lemmy.frozeninferno.xyz 1 points 1 day ago (1 children)

Offtopic, but do you think it's better to use HTTPS for non-public web services that must be accessed through ssh?

[–] dan@upvote.au 2 points 22 hours ago* (last edited 22 hours ago)

I usually use HTTPS, because a lot of web features only work over HTTPS.

You can use Let's Encrypt DNS challenges to get real TLS certificates for internal hosts, instead of having to use your own CA or self-signed certificates.

[–] possiblylinux127@lemmy.zip 0 points 2 days ago (1 children)

One thing to note: the NAT traversal doesn't always work especially for symmetric NAT. If you want reliable p2p connections I would setup IPv6

[–] dan@upvote.au 3 points 2 days ago* (last edited 2 days ago)

Tailscale has several NAT bypass / hole punching methods for double NAT (including CGNAT) and symmetric NAT, but they don't work in 100% of cases. https://tailscale.com/blog/how-nat-traversal-works

IPv6 is definitely a good solution since then you don't have to deal with NAT at all. IPv6 is pretty easily doable in the USA (at long as you're not using Starlink) but can be harder in other countries that don't have as robust IPv6 infrastructure.

[–] Trimatrix@lemmy.world 4 points 2 days ago

Use tailscale for host nodes, use tailscale docker container in a compose stack with an app that you sidecar to. That way that app is on your tailnet as if it is its own computer. Use tailscale serve for reverse proxying support of the apps. Then, setup a vps node (I use linodes $5 node) with tailscale and configure that to be your DMZ into your tailnet.

For DMZ, use Caddy, UFW, and fail2ban. Also take advantage of ACLs in the Tailscale admin console to only have the VPS able to route traffic to specific apps you want to expose. My current project is to work in Authelia into this setup so a user logs into one exposed app and is able to traverse to other exposed apps through header / token authentication.

Oh also, segment the tailnet using different authentication keys. Each host node should have its own key, all the apps on a host node should have a shared key, and all public facing clients should have a common shared key. That way in case of compromise you can revoke the affected keys without bringing down your network.

[–] yaroto98@lemmy.org 4 points 3 days ago

Basically not to. Open one for a VPN like Wireguard to accept incoming connections, and that's it. Use the VPN to connect to your home network and access your services that way.

[–] crawancon@lemm.ee 2 points 3 days ago

deploy to dmz

filtered by fw

host based isolation

zerotrust

etc

[–] possiblylinux127@lemmy.zip 0 points 2 days ago

Don't

No need to worry about it if you don't take the risk. The internet is constantly being scanned by bots.