this post was submitted on 22 Jun 2024
34 points (97.2% liked)

Selfhosted

40219 readers
1155 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
 

Hello fellow lemmings! As mentioned in the title, I'm barely just getting started with the self hosting thing and such.

I have a small personal project for which I'd like to self host my own "ugly-90's-HTML" blog (I just love the look and feel you know).

I've got a desktop machine that I could use as a server, and I also just purchased my own domain from cloudflare (for commitment), but I'm a bit stuck on the actual "putting-my-stuff-online" thing and I don't want to do anything stupid.

I know there's a lot of learning I still need to do, but that's the reason I'm starting this project. Any help would be welcomed.

I have 3 cents of basic networking knowledge (I made my own Ethernet cable conection to my gateway :D); I'm using a linux distro as my main desktop; I have created an ssh tunnel with cloudflare so far, and I'm following a little html+css tutorial. The thing is, I've found so many different ways of putting things online, I'm a bit dizzy. I would like something that will teach me the fundamentals without holding my hand too much (a la "next, next, next, confirm, finish"), you know? I mean, I'm learning by essentially making a 90's website... So, yeah.

Thanks in advance <3

[TL;DR] Me want make 90's website, don't know how

you are viewing a single comment's thread
view the rest of the comments
[–] AlexanderESmith@social.alexanderesmith.com 5 points 4 months ago* (last edited 4 months ago)

There's a whole lot of advice here, and practically none is it is aimed at a beginner. You don't need a reverse proxy or SSL to get started.

  1. Install the OS - You've done this already.
  2. Install some kind of http server - Apache is fine, people recommending anything else are overcomplicating. The package is called either apache2 or httpd, depending your flavor of Linux.
  3. Put your files in the web root - Usually /var/www/html/. If the file is something like index.html, it'll load as the default page without having to type http://youraddress/index.html
  4. Restart Apache - different across OSes, Google will get you there. Something like systemctl restart httpd, but "systemctl" might be "service", and "httpd" might be "apache2".

Once you've done that, you have a computer that will serve your html files when someone hits http://[yourIP]/ . At this point, make sure your router/etc is allowing connections on port 80 (the http port), specifically to that one computer. Also, don't allow that computer to connect to the rest of your home network (not getting into a step-by-step here; every home network uses different hardware), because now that the Internet can touch it, it's a target for hackers. If all they can touch is this one computer (start calling it a server), the risk is minimal.

If you want to point a domain at it, that gets into DNS (the Domain Name System; literally how domains are mapped to IPs so humans don't have to remember them). Cloudflare has guides for this.

Since it's your home IP, it might change. Either be fine changing your DNS if your IP changes (which usually isn't often if you have a decent connection), or look into something called "dynamic DNS" (just a thing that grabs your current IP and updates your domain to point at it).

NOW you can start getting into things like SSL. Remember that SSL doesn't protect you from some guy trying to hack your site/server, it just makes it harder for them to view or change content while it's being sent from the server to a site visitor (or back again, if you have a form).

Google "add SSL to Apache", you'll find references to "VirtualHost" and a bunch of config lines starting with "SSLCertificate...". You'll also find plenty of references to "LetsEncrypt" (a free SSL provider) and "Certbot" (a program that lets you generate the certificates with LetsEncrypt). Follow those.

As above with port 80, you'll need to make sure that port 443 (the https port) is allowed for your server through your router. Again, block your server from connecting to the rest of your network. The Internet can touch it, someone will try to hack it. The SSL doesn't save you from this.

As for reverse proxies, you don't need one unless you're getting into load balancing or header manipulation (which means you'll probably never need one for this project).

I'm happy to answer follow-up questions.