this post was submitted on 19 Aug 2023
104 points (95.6% liked)

Selfhosted

40006 readers
786 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'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

you are viewing a single comment's thread
view the rest of the comments
[–] goddard_guryon@sopuli.xyz 3 points 1 year ago (1 children)

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!

[–] skankhunt42@lemmy.ca 3 points 1 year ago* (last edited 1 year ago) (1 children)

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.

[–] goddard_guryon@sopuli.xyz 2 points 1 year ago (1 children)

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)

[–] skankhunt42@lemmy.ca 1 points 1 year ago

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.