Live data from Hacker News

Self hosting in 2023

grifel.dev

31–40 of 307 posts

Re: Self hosting in 2023

#31
post #16

The blog that you are currently reading has a perfect PageSpeed score 100 / 100. Unfortunately, no it doesn't. The page that has this blog post scored 95 in performance for mobile in one run and 86 in the next. It scored 91 for desktop. They'd get a higher score by adding text compression and by serving static assets (all of them?) with an efficient cache policy.

Weird, shows up as 100 for me... I'll look into that though! Thanks for heads up!

You're welcome! I dislike the tool for this reason - it changes too much. Though I've found that the guidelines are very good for my sites.

PS I get 100 consistently for your home page, so maybe you have an optimization there that can be replicated?

Re: Self hosting in 2023

#32
post #24

I self host and use a RPi 3B+. Actually I have a total of 3B+ but only one is actually doing anything for the website. I have my database running on a RPi 4b with 4gb. I could easily consolidate to a single Pi but early on I had different plans for each one but just keep 'em running for no good reason. I'm fortunate in that I have a static IP. Initially I was using NOIP and it worked great but then noticed my IP addr…

Have you considered using something like CloudFlare Tunnels? Hides your IP and let's you apply 2-Factor over services you expose.

Re: Self hosting in 2023

#33
post #20

Wanted to clarify some of the points raised about Next.js: > I’ve been using Next.js for a while and hosting the apps built with it on AWS with custom express servers. One day I’ve noticed that my servers are getting red-hot while doing almost nothing, and response times got huge. OP mentions they're hosting a static website now but must have previously been rendering a server-rendered page. It's not clear whether th…

Wow. Didn't expect a response directly from Next.js VP! Before anything I wanted to say that I love Next.js and I'm using it in my projects daily. It's definitely the best solution right now at the market for the project types me and my company is producing :). In regards to the inconsistencies in the article. Yes it was a server rendered page, not this particular blog. A much more complicated project. Also I didn't…

I’m always looking to see how we can improve things. Appreciate your feedback! Let me know if you have any other questions in the future.

Re: Self hosting in 2023

#34

One thing to be mindful of is security. The last you want is for your setup to be compromised, be used to send spam/botnets and then getting perma-banned from your ISP. I would argue it's a lot less risky just to put your static site on S3/Github etc.

Yeah, I would decouple it from any residential ISP, but use a $4 VPS to still self-host. That also removes the need for a DDNS setup. Given some basic Linux skills, all you need is SSH plus nginx+certbot on Debian with unattended-upgrades or similar, that you can point your domain to.

Re: Self hosting in 2023

#35
post #24

I self host and use a RPi 3B+. Actually I have a total of 3B+ but only one is actually doing anything for the website. I have my database running on a RPi 4b with 4gb. I could easily consolidate to a single Pi but early on I had different plans for each one but just keep 'em running for no good reason. I'm fortunate in that I have a static IP. Initially I was using NOIP and it worked great but then noticed my IP addr…

I do similar with the VPS and reverse proxy, but use a wireguard tunnel from my home device to the VPS to allow nginx to hit my local device instead of forwarding a port.

Avoids punching a hole in your local network, avoids issues when your home IP changes, and ensures nothing ends up going over the internet in the clear.

Re: Self hosting in 2023

#36
I'm still not convinced that self hosting is cheaper though.

Where I live, both the electric grid and Fibre connections are unreliable, and the ISP charges about $3/month for a static IP. Assuming 2.5W for a RPi, it takes 1.8kWh a month, costing around $0.25 for electricity. This also has the downside of using residential IPs, having to deal with CGNAT/NAT if the ISP has no static IPs, exposing your home IP, slow disk speeds in SBCs, etc.

Services like Hetzner have private servers for almost the same amount, which gives you faster storage, server IP addresses (for email reputation), DDoS protection, and a whole lot more to sweeten the deal.

The only thing I self host today is a script that runs on my OpenWRT router, that uploads the probed data from my inverter and BMS to monitor my PV setup. I look forward to get rid of it too, once I get better BMS/Inverter.

Re: Self hosting in 2023

#37
I'd never heard of Coolify, but it looks like what I've been searching for, i.e. an all-in-one solution for hosting stuff on a VPS (or Pi). But the docs [1] say it requires a minimum of 30 GB of disk space.

Does anyone know if that is accurate? What could possibly be taking up that 30 GB if all I want to do is host a static site and maybe Deno or Node? I'm fairly certain I set something similar up in the past on a much smaller MicroSD card...

[1] https://docs.coollabs.io/coolify/requirements

Re: Self hosting in 2023

#38
post #24

I self host and use a RPi 3B+. Actually I have a total of 3B+ but only one is actually doing anything for the website. I have my database running on a RPi 4b with 4gb. I could easily consolidate to a single Pi but early on I had different plans for each one but just keep 'em running for no good reason. I'm fortunate in that I have a static IP. Initially I was using NOIP and it worked great but then noticed my IP addr…

I'm planning on a similar setup and avoid exposing the network directly. Didn't have time to do that yet but I'll look into that this week!

Re: Self hosting in 2023

#39

Not to downplay the intent, but hosting static site is much simpler in something like github or netlify. Also in my area business internet with fixed IP is more expensive than what I would pay for decent enough cloud instance($50 vs $10).

Presumably you only need a fixed IP for email delivery. Public sites like blogs could be fronted by a CDN, and you can manage private sites behind a vpn like tailscale etc.

I think a design where you rent a cheap $5-$10 vps with a static IP that forwards SMTP messages both ways through a secure tunnel to your personal mail server in your home would be a good starting point for self hosting.

Re: Self hosting in 2023

#40
Does anybody know how you’d do this if your ISP uses carrier grade NAT? (Eg mobile dongle). My limited understanding is that with CGNAT there isn’t a unique public IP that points to you, (even if only temporarily). So presumably DDNS is out?

I guess IPv6 could/would solve this one day?

Post reply on HN