Selfhosted
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:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
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.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
view the rest of the comments
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.
I use Wireguard via PiVPN and it's pretty much foolproof. I don't bother with Dynamic DNS but have in the past
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.
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.
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?
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.
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.)
Some routers even run WireGuard natively :) like for instance Ubiquiti. Personally I'd rather run it on my own server though because ubiquiti doesn't have easy IAC features.
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?
Depends on the client configuration. If you route all the traffic through vpn (so, simplified, 0.0.0.0/0) then all their client device network traffic would go through their vpn server at home and is seen as coming from there; otherwise, if you only route specific addressess (like your home network private addressess only) then only those go to their home network and everything else works like it would without a vpn.
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 to192.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.Ahh. But what if you already used a VPN on the client for normal browsing etc - can you have two VPNs configured?
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.
I don't think iOS allows multiple VPNs to be enabled simultaneously. There appears to be only one VPN on/off toggle switch. From what I've seen you can have different vpn profiles but only enable one at a time. I could be wrong though.
Desktop operating systems like macOS, Linux (did I mention yet that I use arch Linux?), BSD, and um.. that other one... oh yeah, Windows do allow this. I'm sure there are a variety of compatibility problems, but in general, multiple VPNs with the same or even different technologies can work together.
Okay, so that's pretty much the setup I had in mind. Good to know there is not much need for an extra step for security, thanks for the answer !
Well, I guess that would still be vulnerable to DDOS attacks, but that would just prevent me from accessing my cinnamon apple-pie recipe from my self hosted recipe manager for some time. A bit mean, but not catastrophic.
I wondered if there would be some other attacks that could compromise my machine with only a wireguard setup, but that's a good sign if there is nothing obvious.
You wouldn't be any more vulnerable to ddos attacks than without WG.