this post was submitted on 13 Jun 2023
12 points (100.0% liked)

Selfhosted

40183 readers
749 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 1 year ago
MODERATORS
 

I have played around with yunohost and other similar tools. I know how to open ports on router, configure port forwarding. I am also interested on hosting my own stuff for experiments, but I also have a VPN enabled for privacy reasons on my router at all times. If you haven't guessed already, I am very reserved on revealing my home IP for selfhosting, as contradictory as it sounds.

I am aware that it's better to rent a VPS, not to mention the dynamic IP issues, but here it goes: assuming my VPN provider permits port forwarding, is it possible to selfhost anything from behind a VPN, including the virtual machine running all the necessary softwares?

edit: title

edit2: I just realized my VPN provider is discontinuing port forwarding next month. Why?!

you are viewing a single comment's thread
view the rest of the comments
[–] dudeami0@lemmy.dudeami.win 2 points 1 year ago

I currently host a few services (including the lemmy instance I am replying from) behind a commodity $5 VPS, while the services are actually hosted locally. I setup WireGuard to have a simple hard-coded peer-to-peer VPN connection from my local client to the remote VPS, and then setup some iptable rules on the VPS to redirect traffic to the VPN network. This allows me to host behind a NAT (my biggest issue), but also handles IP changes and hides your home's public IP. I am no networking engineer, so I am not sure how safe this is, manually routing packets can be tricky.

There are also a few services this does not work for. So far I've found CS:GO dedicated servers (if the public IP of the local machine differs from the VPS) and email servers cannot be behind a NAT to function properly. Other services likely exist, but you'll be able to run most services. You do lose the originating IP addresses in this case, which can complicate things (the case for email servers).

This process is explained in detail on wickedyoda.com and with a video tutorial.