Ok, how do I start self-hosting?
I've been following this community for some time in order to learn about self-hosting and, while I have learnt about a bunch of cool web services to host, I'm still lost on where/how to start. Does anyone have, like, a very beginner guide that is not just "install this distro and click these buttons"? I have an old laptop that runs Arch (btw), but I'm not familiar with networking at all. So anything starting from "you can check your IP address using ip a
" would be appreciated.
More specifically, I have a domain that I want to point to an old laptop of mine (I intend to switch to a VPS if/when I feel like the laptop is starting to lose it). How do I expose my laptop to the internet for this to work (ideally without touching my router, because I'll be traveling quite a bit with my laptop and don't mind the occasional downtime). I assume that once I'm able to type my domain name on my mobile and see it open anything from my laptop, I can then setup all the services I want via nginx, but that's step 2. I tried to follow a few online guides but, like I mentioned, they're either too simplistic (no I don't want to move to Ubuntu Server just for this) or too complex (no I don't know how DHCP works).
Thanks in advance
I did try launching a website on my local network, but widening it to the public network is what I was confused about, like you said. But the idea of overlay network sounds interesting, I'll give it a shot. Thanks!
Your router will get a public IP. For example 1.2.3.4. This is the port your ISP is plugged into. (Perhaps the WAN labeled port) this IP is what you want to access from a different network (cell data, friends house, etc). It's important that you confirm the WAN IP on your router is a real public IP. Some providers actually give you a private (CGNAT) IP and its a huge pain in the ass. Going to what is my IP or whatever and compare it to your WAN IP on the router website is a good test. They should be the same. If they are, no matter where you are in the world you can access the wan side of your router. If not, tailscale is a good option.
The other port on a router has a private IP, for example 192.168.0.1. This could look 4+ ports but that's basically just a switch and more or less the same thing.
Anyway, you have to tell your router, if you get something on the WAN port 1.2.3.4 to TCP port 80 you need to forward it to laptop IP 182.168.0.100 TCP port 80.
If this is successful, you need to make sure the laptop firewall allows access to TCP 80 from anywhere. If you can access the laptop website from your phone on WiFi then its pretty safe bet that its allowed from anywhere, unless you told it otherwise.
I like to test public access from on https://canyouseeme.org/
Edit: to add, this will only ever work if you're at home. Each new network you connect to, you will need to access the router and do the exact same thing to provide access to your laptop. Not ideal, and impossible at something like a hotel or hospital. Overlay network give you a second virtual network that you plug a virtual cable into for all your devices, including phones. If you do this you can just use that second virtual IP to access your stuff no matter where you are.
Ah now it makes a lot more sense. I'll have to stick with things like overlay network simply because my ISP is super unreliable (for example, I'm out of wifi right now because of mildly incovenient weather lmao)
Its worth it. Super cool. However, it does need internet to work. It just gets around CGNAT and networks you don't own (hospital, school, hotel, etc) so you can still access your stuff while you're not at home.