Fireship · @fireship
Raspberry Pi versus AWS // How to host your website on the RPi4
Uploaded January 14, 2021 · Length 8:39
Summary
Hosting a website on Raspberry Pi 4 using Node.js, Nginx, and Linux, comparing to AWS cloud hosting.
- raspberry pi hosting
- node js web app
- nginx load balancing
- linux server setup
- aws alternative
- self hosted website
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
this week in tech amazon took the
- 0:01
fastest growing social media app of all
- 0:03
time
- 0:04
and migrated it to its new serverless
- 0:06
platform putting it in the highly
- 0:07
undesirable position
- 0:08
of requiring a reverse cloud migration
- 0:11
most companies migrate from
- 0:12
on-prem to the cloud but this
- 0:14
unfortunate app needs to do the exact
- 0:16
opposite because nobody in town wants to
- 0:18
touch it whether you agree with the
- 0:19
politics of that or not
- 0:20
one thing is undeniable tech monopolies
- 0:23
have a lot of power over your business
- 0:25
so don't walk around here thinking you
- 0:26
have free will because you don't i can
- 0:28
crush you anytime
- 0:29
i want and a lot of influence over the
- 0:32
content we consume
- 0:33
as end users that being said if you're
- 0:35
some kind of weirdo who doesn't trust
- 0:37
the cloud
- 0:38
this video is for you we'll take a
- 0:39
raspberry pi and turn it into a physical
- 0:42
server
- 0:42
that can host a web application on the
- 0:44
internet or in other words you'll build
- 0:46
your own mini
- 0:47
amazon web services from scratch along
- 0:49
the way you'll learn some cool things
- 0:50
about linux networking nginx node.js
- 0:53
and why if you have a large scale app
- 0:55
and get kicked off of aws
- 0:56
you're pretty much screwed to follow
- 0:58
along the first thing you'll need is a
- 1:00
raspberry pi
- 1:01
i'm using the model 4 which has a quad
- 1:03
core processor
- 1:04
and 8 gigabytes of ram and ironically i
- 1:06
bought it as a kit from amazon for about
- 1:08
120 bucks
- 1:10
it comes with a power supply all the
- 1:11
cords you need as well as a memory card
- 1:13
with linux pre-installed
- 1:15
the linux flavor is designed
- 1:16
specifically for raspberry pi
- 1:18
it's called noobs and feels pretty
- 1:20
similar to ubuntu
- 1:21
now i'm not going to go through the
- 1:22
physical hardware setup here which is
- 1:24
really just a matter of plugging in
- 1:26
different size cords to different sized
- 1:28
holes i'll be starting from the noob's
- 1:29
operating system
- 1:30
with the only extra piece of software
- 1:32
installed being vs code
- 1:34
now our goal here is to create a node.js
- 1:36
web application
- 1:37
that can serve html from the raspberry
- 1:39
pi to the rest of the internet
- 1:41
throughout the world
- 1:42
but before we do that let's talk about
- 1:43
some of the challenges and how it
- 1:45
compares to hosting a website on the
- 1:47
cloud
- 1:47
the first issue is scale we're working
- 1:49
with a fixed amount of computing power
- 1:51
it's a great value and only a fraction
- 1:53
of the price for an equal amount of
- 1:54
computing power on aws
- 1:56
when averaged out for three years the
- 1:58
issue is that our app can only grow so


