10

Hello,

Some time ago, I started self-hosting applications, but only on my local network. So far, it's working fine, but I can't access them as soon as I go outside (which is completely normal).

For the past few days I've been looking for a relatively secure way of accessing my applications from outside.

I don't need anyone but myself to have access to my applications, so from what I've understood, it's not necessarily useful to set up a reverse-proxy in that case and it would be simpler to set up a VPN.

From what I've seen, Wireguard seems to be a good option. At first glance, I'd have to install it on the machine containing my applications, port-forward the Wireguard listening port and configure my other devices to access this machine through Wireguard

However, I don't have enough hindsight to know whether this is a sufficient layer of security to at least prevent bots from accessing my data or compromising my machine.

I've also seen Wireguard-based solutions like Tailscale or Netbird that seem to make configuration easier, but I have a hard time knowing if it would really be useful in my case (and I don't really get what else they are doing despite simplifying the setup).

Do you have any opinions on this? Are there any obvious security holes in what I've said? Is setting up a VPN really the solution in my case?

Thanks in advance for your answers!

you are viewing a single comment's thread
view the rest of the comments
[-] friend_of_satan@lemmy.world 1 points 2 weeks ago* (last edited 2 weeks ago)

Run WireGuard on some home machine. (Does not need to be the machine the app you want to access is hosted on.)

Run WireGuard on your road warrior system.

There is no step 3.

I'm doing this right now from halfway around the world from my house and it's been great. Been using iPhone, iPad, and macOS clients connected to linuxserver/WireGuard docker container. Been doing this on many WiFi networks and 5G, no difference.

[-] jaybone@lemmy.zip 0 points 2 weeks ago

Is wire guard a service you pay for? Otherwise how does wire guard in your home machine not need your router to forward ports to it? And then the remote client need to be pointed at your home’s external IP?

[-] friend_of_satan@lemmy.world 2 points 2 weeks ago* (last edited 2 weeks ago)

WireGuard is free. Obviously my instructions didn't go into detail about specifically how to set everything up. Port forwarding is required. Knowing your servers external IP address is required. You also need electricity, an ISP subscription, a home server (preferably running Linux), so on and so forth. This is /c/selfhosted after all.

[-] jaybone@lemmy.zip 1 points 2 weeks ago* (last edited 2 weeks ago)

Yeah that’s fine. The steps were so simple I figured they could work without router config changes if they made some kind of connection handshake in a third party service’s server.

But given all that, I wonder if it makes sense to look into if your router has its own vpn server (or flash the firmware with one that does.)

[-] 0_o7@lemmy.dbzer0.com 0 points 2 weeks ago

Doesn't that need like a static IP address, port forwarding and dealing all kind of network annoyances?

Recommending wireguard to people feels like recommending Arch to first time Linux users.

[-] cmnybo@discuss.tchncs.de 1 points 2 weeks ago

You don't need a static IP address, but you do need a public IP address. You can use dynamic DNS to avoid having to keep track of your IP address. FreeDNS will work fine for a basic setup.

Wireguard is one of the easiest VPN servers to use. If you're not using your ISP's router, it may even have Wireguard built in.

[-] jobbies@lemmy.zip 0 points 2 weeks ago* (last edited 2 weeks ago)

Apologies for the dumb noob question, but if your iOS device is VPNed to your home server, how does it access the open internet? Does it do this via the VPN?

[-] friend_of_satan@lemmy.world 1 points 2 weeks ago* (last edited 2 weeks ago)

WireGuard routes certain traffic from the client (your iPhone) through the server (the computer at your house). If you route all traffic, then when your iPhone accesses the internet, it's as if you were at home. Since that WireGuard server is sitting on your home LAN, it is able to route your phones traffic to anything else on that LAN, or out to the internet.

Wireguard clients have a setting called AllowedIPs that tells the client what IP subnets to route through the server. By default this is 0.0.0.0/0, ::/0, which means "all ipv4 and all ipv6 traffic". But If all you want to access are services on your home LAN, then you change that to 192.168.0.0/24 or whatever your home subnet is, and only traffic heading to that network will be routed through the WireGuard server at your house, but all other traffic goes out of your phone's normal network paths to the internet.

[-] jobbies@lemmy.zip 0 points 2 weeks ago

Ahh. But what if you already used a VPN on the client for normal browsing etc - can you have two VPNs configured?

[-] SpikesOtherDog@ani.social 1 points 2 weeks ago

No, think of a VPN as a network cable. You can only send out of one or the other.

Now, if you are connected to a device that has another VPN to somewhere you want to go, then technically yes you would be using 2 VPN connections.

this post was submitted on 21 Jul 2025
10 points (91.7% liked)

Selfhosted

50093 readers
45 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