How to setup my own home server and make it available to anyone?

khoi@slrpnk.net to Selfhosted@lemmy.world – 33 points –

I'd like to have my own server at home sorta like a home AWS.

How to set up one and make it available to anyone over the Internet? What tech specs should I buy (RAM, CPU, # of cores, operating system, etc.)?

How much does it cost to keep one running all the time?

41

You are viewing a single comment

First of all you need that your ISP actually gives you an IP that points back to your home network. It's not uncommon that your IP points to some ISP NAT that routes the internet to many houses, making it impossible to expose some device in your network to the internet.

It was my case, then I needed to call them and ask to have an IP that goes directly to my gateway.

After that you can go to your gateway and do port forwarding from the internet to your server in your home. For example, you can forward port 80 from internet to your server private IP on port 80, so when someone browsers your IP it will get whatever page is hosted on your server.

About server tech specs, it depends on what you want to host. I used to host a personal Nextcloud server in a raspberry pi, which is really power efficient and cheap to maintain. Maybe you'll want a server with higher specs that might draw more power. It's really up to what you wanna do specifically.

None of that is needed with cloudflare zero trust + tunneling. You simply install an agent on the machine and configure internal IP:port you want to access the outside in the cloudflare portal, pointing to a domain you own. You can even allow passwords to access internal IPs directly if you want.

Of course you can use a reverse proxy to expose your apps to the internet.

Here's another similar solution that you can self host in a cheap cloud VM:

https://github.com/fatedier/frp

That also requires you to manage updates and security on that device... If you want less work not more zero trust cloudflare is a great free solution. I used to use nginx proxy manager which is free as a reverse proxy but again one less machine to worry about. I literally just migrated days ago and I couldn't be happier.