Hey guys,

after reading up on selfhosting for weeks now I finally decided to take the plunge today and tried setting up my own nextcloud & jellyfin instances. For this purpose I am using a mini PC. (similiar to an Intel NUC)

Now I would like to make both services available to the internet so I could show images to friends while I’m at their place / watch movies with them.

The problem is I am currently not very educated on which security measures I would have to take to ensure that my server / mini PC doesn’t immediately become an easy target for a hacker, especially considering that I would host private photos on the nextcloud.

After googling around I feel like I find a lot of conflicting information as well as write-ups that I don’t fully grasp with my limited knowledge so if you guys have any general advice or even places to learn about all these concepts I would be absolutely delighted!

Thank you guys sooo much in advance for any and all help, the c/selfhosted community has been nothing but a great resource for me so far!!!

35 points

I am using Tailscale.

permalink
report
reply
17 points

Another vote for Tailscale. Relatively easy to set up and can has some pretty cool features I’m still learning about. I also share my Jellyfin server with family and friends and it meets expectations.

permalink
report
parent
reply
3 points
Deleted by creator
permalink
report
parent
reply
1 point

Yea basically so I send an invite link for my Jellyfin server. They sign up and install the app then use the Tailscale IP to connect to the Jellyfin server. Usually pretty easy but if they don’t really understand I can do it for them once and then it’s good to go.

permalink
report
parent
reply
24 points
*

In the spirit of selfhosting, you can also host headscale. Its an open source implementation of the proprietary tailscale control plane.

It allows you to get over the 5 device limit (different depending on tiers), as well as keep your traffic on your devices. And, imo, it is pretty stable.

The only issue is that the control plane (by nature) has to be publically accessible. But imo it’s way less of a security target than a massive app like nextcloud.

Edit: device limits were wrong

permalink
report
parent
reply
3 points

It allows you to get over the 5 device limit, as well as keep your traffic on your devices. And, imo, it is pretty stable.

I believe tailscale raised the device limit relatively recently but I agree with you in that I prefer to self-host this type of thing.

permalink
report
parent
reply
6 points

AFAIK it’s now 100, so basically unlimited for personal use.

permalink
report
parent
reply
1 point

Thanks for the correction, edited the post.

permalink
report
parent
reply
3 points

It comes down to using secure passwords, 2 factor authentication, and updating software as soon as you can.

Check out Cloudflare’s zero tier tunnel to only expose the services you need without port forwarding. Added benefit of masking your home’s IP behind Cloudflare to prevent DDOS. Only downside is you need your own domain.

permalink
report
reply
2 points

This is what I’ve ended up doing. I originally wanted to use the DNS proxy option, but I was getting people randomly scanning my home IP anyway.

permalink
report
parent
reply
3 points

Why would anyone DDOS a random home server? I don‘t think OP has to worry about that.

permalink
report
parent
reply
1 point

Depends on the hardware, but my weak server can sometimes be overwhelmed with random ip trying to find a vulnerable service (accessing random port and path combination)

permalink
report
parent
reply
1 point

The multifactor can’t be understated as part of your security stance! I turn it on and enforce it on my home network for any service I host that supports it. And like mentioned elsewhere, only 80 and 443 are opened and they go straight through a proxy.

permalink
report
parent
reply
18 points

If you are just exposing port 80 and 443 (standard web ports) cloudflare proxy is free and will work well to hide your IP.

Get yourself a domain name then use Cloudflare DNS to set an A record pointing to your home IP. If you have a dynamic IP (one that occasionally changes) you’ll want to read this: https://developers.cloudflare.com/dns/manage-dns-records/how-to/managing-dynamic-ip-addresses/

permalink
report
reply
5 points

My approach was to set it all up internally, create a wireguard VPN accesspoint and only open that up. That way I don’t have as much to worry as much within the network (still use generated passwords for things) and able to access it anywhere.

Granted, you asked about opening up to the www. I’d suggest buying a domain through cloudfront, setting up an nginx instance that proxies traffic (think nextcloud.mydomain.com), and have it only accept connections from cloudfront servers.

That allows you SSL termination, pretty good bot coverage, and a nice domain name to share as needed.

permalink
report
reply
26 points

I went for wireguard VPN instead of exposing services. Its much more safe afaik, but you have to configure each device you want to give access (aka scanning QR code). You also dont need to buy a domain for that. Exposed services would be easier to use, especially if you want to use it on many devices

permalink
report
reply

Selfhosted

!selfhosted@lemmy.world

Create post

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!

Community stats

  • 3.5K

    Monthly active users

  • 3.3K

    Posts

  • 71K

    Comments