this post was submitted on 19 Jul 2024
15 points (72.7% liked)

Selfhosted

40006 readers
681 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
 

Hi i just wanted to know if it is possible to host instance completely without renting anything.

if you have a video on it can you please share it here?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 8 points 3 months ago* (last edited 3 months ago) (4 children)

Short answer: yes, you can self-host on any computer connected to your network.

Longer answer:
You can, but this is probably not the best way to go about things. The first thing to consider is what you are actually hosting. If you are talking about a website, this means that you are running some sort of web server software 24x7 on your main PC. This will be eating up resources (CPU cycles, RAM) which you may want to dedicated to other processes (e.g. gaming). Also, anything you do on that PC may have a negative impact on the server software you are hosting. Reboot and your server software is now offline. Install something new and you might have a conflict bringing your server software down. Lastly, if your website ever gets hacked, then your main PC also just got hacked, and your life may really suck. This is why you often see things like Raspberry Pis being used for self-hosting. It moves the server software on to separate hardware which can be updated/maintained outside a PC which is used for other purposes. And it gives any attacker on that box one more step to cross before owning your main PC. Granted, it's a small step, but the goal there is to slow them down as much as possible.

That said, the process is generally straight forward. Though, there will be some variations depending on what you are hosting (e.g. webserver, nextcloud, plex, etc.) And, your ISP can throw a massive monkey wrench in the whole thing, if they use CG-NAT. I would also warn you that, once you have a presence on the internet, you will need to consider the security implications to whatever it is you are hosting. With the most important security recommendation being "install your updates". And not just OS updates, but keeping all software up to date. And, if you host WordPress, you need to stay on top of plugin and theme updates as well. In short, if it's running on your system, it needs to stay up to date.

The process generally looks something like:

  • Install your updates.
  • Install the server software.
  • Apply updates to the software (the installer may be an outdated version).
  • Apply security hardening based on guides from the software vendor.
  • Configure your firewall to forward the required ports (and only the required ports) from the WAN side to the server.
  • Figure out your external IP address.
  • Try accessing the service from the outside.

Optionally, you may want to consider using a Dynamic DNS service (DDNS) (e.g. noip.com) to make reaching your server easier. But, this is technically optional, if you're willing to just use an IP address and manually update things on the fly.

Good luck, and in case I didn't mention it, install your updates.

[–] [email protected] 1 points 3 months ago (1 children)

You make good points here for the beginner however there are better alternatives and solutions for basically everything you mentioned here. The biggest I want to address is conflicts on your system. Generally running servers on metal is just outright bad practice. Containerize. Always containerize. There are lots of great options. Docker, podman, Lxc, helm, flatpak.. hell. Snap if you must. Running servers on metal is generally is just asking for trouble unless the system’s entire purpose is for that. Also the cg-nat situation. Personally been behind it for a few years but it’s not a problem as long as you have a reverse proxy tunnel in place. Not a hard fix at all.

[–] [email protected] 1 points 3 months ago

I do agree with what you are saying, but for a complete beginner, and a very general overview, I didn't want to complicate things too much. I personally run my own stuff in containers and am behind CG-NAT (it's why I gave it a mention).

That said, if you really wanted to give the new user that advice, go for it. Rather than just nit pick and do the "but actshuly" bit, start adding that info and point out how the person should do it and what to consider. Build, instead of just tearing down.

load more comments (2 replies)