Live data from Hacker News

Self hosting in 2023

grifel.dev

11–20 of 307 posts

Re: Self hosting in 2023

#11
post #8

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).

With dynamic dns static IPs are not as critical. Most routers support them natively. What it does is quite simple - every time the router receives a new IP, it updates your dns entry. Not to mention that most “dynamic” IPs change only while the router is offline and your lease is up. So as long you don’t power it off, it may not change for large intervals of time.

I have had my "dynamic" IP for two years now. I even managed to keep it when I moved to a new unit in the same appt complex

Re: Self hosting in 2023

#12

This is amazing. More devs should build stuff like this for themselves. On the extreme one of the scale there is the amazing Andreas Kling building his own operating system. Building a whole system will give you unprecedented control and understanding. That is what being a hacker is all about.

Having a server under your hand and deploying other things than webpages to automate your infra and life is a very underrated experience.

I don't host my pages myself, but the server(s) I have power the invisible infrastructure which accelerates my life a lot.

Re: Self hosting in 2023

#13

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).

Definitely simpler than setting up everything from group up. Though ATM I would argue that It would take me the exact same amount of time to get another app online :). Regarding IP, in the blog post further down I'm explaining that I also don't have fixed IP and how you can setup DDNS. Thanks for reading!

[deleted]

Re: Self hosting in 2023

#14
post #5

If you don't need all that cloud operations/deployment infrastructure, self hosting a website from home in 2023 is as easy as it was in 2003. Get a DDNS, do the NAT port forwarding, run some apache/nginx/whatever and push your files with sftp or similar to the server. In contrast to 2003, upstreams got better -- even Germany has average upstream speeds of 20mbit/second nowadays [1]. With 20mbit/sec you can do quite s…

> self hosting a website from home in 2023 is as easy as it was in 2003. Get a DDNS, do the NAT port forwarding

Did they have CGNAT in 2003? Because that breaks everything.

Re: Self hosting in 2023

#15
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.

Re: Self hosting in 2023

#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.

Re: Self hosting in 2023

#17
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!

Re: Self hosting in 2023

#18
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.

I see 95 mobile, 100 desktop. It's on the front page of HN, so presumably the server is taking a bit longer to respond to all the traffic.

Re: Self hosting in 2023

#19

This is amazing. More devs should build stuff like this for themselves. On the extreme one of the scale there is the amazing Andreas Kling building his own operating system. Building a whole system will give you unprecedented control and understanding. That is what being a hacker is all about.

And I have to say that this "physical" server running and seeing it just makes the experience of web developing much more "real". At least for me :)

It is. I still get awe inspired that some markup I type and put on this disk here can be accessed across the world. Like I can physically touch the tape if I want to. It reminds me of how wondrous this whole thing felt like when I first discovered the internet in the 90s.

Re: Self hosting in 2023

#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 they explored the static-site generation support in Next.js, which would have avoided any regressions in server-rendering performance, making this a non-issue.

> Long story short the library introduced a huge performance downgrade that was not caught by existing tests. > Because benchmarks were using only Vercel’s (creators of NextJS) “Edge” infrastructure. And the bug was happening everywhere but not there.

Indeed, there was a regression, but it was not due to lack of tests as a whole. The linked threads point to issues both self-hosting (serverful) as well as on Vercel (serverless). There was a week between a fix being reported through the opened issue and a fix being placed on a canary release. Regressions will happen – the best thing is ensuring more tests are added and things are fixed quickly.

> We need alternative independent hosting to ensure that the community does not get stuck with a single provider.

You can (and will always be able to) host Next.js, both completely static (drop files in an S3 bucket) or on a server (Docker, EC2, whatever you want).

Just wanted to clarify those things. Your new site looks great, nice work.

Post reply on HN