this post was submitted on 03 Mar 2025
9 points (90.9% liked)

Selfhosted

43307 readers
293 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
 

Hello!!! <3

So i'm trying to host my own lil website server! I already got httpd on my fedora (GNU/Linux) device, forwarded the 80 port to my router and - TADA I can access my simple index.html site from anywhere now via the IPv4 address! I even tried it on my phone at work, and I was able to reach my home server!

I have now purchased some nice domain smorty.dev rather cheaply on porkbun but - as you may find out when clicking on the link - it doesn't forward to my server yet ;(

I have already setup the A address record thingy on porkbun, which can even be verified by running ping smorty.dev in the terminal, as it retrieves the current IPv4 address of my router

CODE BLOCK

maria@fedora:~$ ping smorty.dev
PING smorty.dev (79.241.82.75) 56(84) bytes of data.
64 bytes from www.smorty.dev (79.241.82.75): icmp_seq=1 ttl=63 time=8.35 ms
64 bytes from www.smorty.dev (79.241.82.75): icmp_seq=2 ttl=63 time=6.53 ms
64 bytes from www.smorty.dev (79.241.82.75): icmp_seq=3 ttl=63 time=5.94 ms
^C
***
smorty.dev ping statistics
***
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 5.937/6.937/8.345/1.024 ms

I searched online and found some people talking about a Windows HOSTS file, so I found the equivalent for GNU/Linux, which is /etc/hosts and that file now looks like this
CODE BLOCK

maria@fedora:~$ cat /etc/hosts
# Loopback entries; do not change.
# For historical reasons, localhost precedes localhost.localdomain:
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
# See hosts(5) for proper format and other examples:
# 192.168.1.10 foo.example.org foo
# 192.168.1.13 bar.example.org bar
79.241.82.75 www.smorty.dev
127.0.0.1 www.smorty.dev

Soooo there is clearly a connection there, but the actual forwarding in the browser to my website doesn't seem to work ;(

I am *somewhat sure I exported this correctly...

IMAGE OF ROUTER INTERFACE

EDIT: I completely forgot to mention what the address records look like... and maybe they are kinda important for my problem sooo here they are!

SCREENSHOT FROM ADDRESS RECORDS

if someone here could share some advice maybe - that would be super great :)

you are viewing a single comment's thread
view the rest of the comments
[–] Smorty@lemmy.blahaj.zone 2 points 1 day ago (1 children)

but i wanna have a website others can access too. I tried using VPNs for cool stuff already (like controlling my lil raspberry robot from work with my phone) but I want this website to be available to all the people...

should i just bite the bullet and rent some hosting service? Or is there still hope for me putting "setup home website server" on my resume?

[–] bigDottee@geekroom.tech 1 points 19 hours ago

I’ll pitch in here.. so website dns (porkbun) is configured to point to your home in, great!

2 things need to happen.

  1. Your router needs to expose ports 80 and/or 443 for HTTP and HTTPS access. If you are only doing HTTPS then 80 isn’t really necessary. These ports need forwarded to a reverse proxy, such as NGINX or Apache.
  2. You need to have a reverse proxy setup that can translate the domain name that is being sent to a local IP address:port. You should be able to find some relatively simple/easy reverse proxy configuration generators online to help you get that setup. You’ll want to setup SSL certificates while you’re at this too. Look up “nginx certbot lets encrypt” and that should get you pointed in the right direction.

Once those are done, in theory, you should be able to access your website outside of your home network using your domain name.