Kubernetes is the way, but you would need the Pies. - I am thinking about doing this myself because I have a kube cluster burning money on GCP right now. - but I am not sure about ARM. - I might start with 2 second-hand mini 86 machines. - I have a feeling I am going to not be able to install something, - some library or service - plus I develop on Mac - if I get a bug in production I dont want to be wondering if its an ARM / 86 difference. - On the other hand - If I had an ARM Macbook, - that would be different.
I personally use a Raspberry Pi 4 with this exact setup to run my development servers that don't need to scale, and that I don't want to pay for yet. The only difference is that I have a reverse proxy set up so that I can run many websites at once off of it, but the Raspberry Pi 4 is honestly such an underrated little computer. Great for risk-free development.
@@1Naif there's a lot of variables besides users that determine if it could but theoretically yes. Probably could. But not very well unless it's a tic tac toe or other simple game server. Real time interaction game play? no, just no.
@@1Naif Hello. I am working on aproject which involves controlling hardware components let's say leds connected to raspberry pi GPIO pins and i want host a webpage on raspberry pi to control the leds from a browser that's not a part of local network. Can I actually achieve this with web socket server. If not please tell any other ways to do this. Please do reply..This is for my college project.
Self-hosting is always the most based way to deploy your stuff. Also extra tip: dockerize it right away! (I mean do not install nginx directly on the machine but use docker-compose to launch and orchestrate the nodejs container and the nginx container)
Self-hosting is a perfect way to lose a lot of time and money, and because time is money is even worst. I'm being paid to do the best with the technologies, time and money we have, not to re-invent the wheel.
Those videos are amazing! I am senior SW dev but sometimes I feel like a trainee when watching this. IT is an infinite topic where innovations pops out on daily routine. Thanks for your work
Hosting out of your own local network is pretty nice for home automation, assuming you secure it properly. You can build and host a web interface that manages devices on your LAN. Super fun stuff. :)
All fun and games until someone start dossing literally your home connection trying to bring down your stupid to-do list webapp hosted on a Raspberry Pi
This video broke down about 4 hours of research into 8 minutes and I love it. Could you do one about converting old computers to Ubuntu Desktop/Server and using Apache2? Love this. Thank you!
One more thing to add is the local IP of the raspberry pi is not static by default, it can get reassigned to another device if your raspberry pi goes offline or the router is restarted. You can mitigate this by assigning a static IP to your raspberry pi on your router based on the raspberry pi's MAC address
Buy a VPS on a provider what is far from US jurisdiction Wireguard to it (Even my home router has a Wireguard plugin :P) Point DNS A record to VPS Some routing and forwarding ??? PROFIT
Man that is fucked up. He should actually make a video about IP4 / TCP / UDP and IP6. I bet most services online could be entirely descentralized without the need for so many servers & the cloud if ISP's would do shit like this.
@@unicodefox I think it means that his website/server that is being forwarded from the Pi to the internet through his router using that public ip dynamic address gets blocked by his ISP
You have to maintain the room temperature as well. I used to host jenkins, application on rasp for interview purpose but rasp was damaged 8 months later due to heat issues. Remember it will be on 24×7, so need to maintain the temperature.
A word of advice for anybody thinking of trying this: hosting a public website on your local internet is like painting a huge target on your back. Please make sure you know EXACTLY what you're doing before attempting this, or you are likely to get burned.
Of all the business that run in the cloud, across the whole world, you have list only 1 example. There are many reason to not like the cloud but what you mention here, isn't a strong one.
@@Sevenhens you can use it for any port you like. I'm running a couple of webapps on my Pi and fail2ban has been doing great job at banning hammering attempts. Setup jails and banaction = iptables-multiport and it's pretty much idiot-proof.
@@_MPP_ A modern DDOS (layer 7 attack) is nothing more than an http(s) request from millions to billions of zombie computers. It'll absolutely cripple your network, and you'll have no way of knowing what's a legit request or not! EDIT: It seems in the past DDoses were done at lower layers and they CAN be mitigated somewhat using what you described. But I still stand that in 2021, modern DDoses can still cripple a specific website and the only solution is having a gigantic enough bandwidth pipe to take the hit.
@@_MPP_ Btw that's a good setup for network security, all im saying is that a DDos flood is impossible to mitigate since those requests look legitimate. You can ban russian and chinese ips, but with hacked amazon and Google IOTs in the US and Europe, it's now impossible to mitigate against zombie DDos attacks.
1x vCPU and 4GB RAM VPS container in some data centre, with static IP by default, 100Gbit connection to the outside world, pre-installed with some full Linux stack, with 99.98% uptime, for $5 a month - is a very viable alternative to a raspberry pi in a shoe box under the bed.
I made this so many times that it was like showing my computer haha. Glad this info is available for everyone, for the old school people we had to read lots an lots of pages separately to get this working as you are. thank you very much
Good kick-off. As you mentioned on the beginning, I’d be weary of the security aspect. Opening ports and leaving nginx config on default with no hardenining on the OS is not the best idea in general. A good part two would be adding HTTPS and a domain name to the mix (with google domains or whatever) and securing things a bit on the web server. Docker/k8s are also a hot topic, if instead of installing nginx directly on the host you add two different pods, one for the webpage static assets, and one for a backend API that serves the count number you’d end up with a setup that’s closer to real-world scenarios. Just my 2c, thanks for the fun content!
@@cookingandjava7574 he's talking about capital hill in Seattle where there was peaceful protesting with instances of violence like when a 15 year old white kid drove through with guns trying to "kill some black guys", and then he shot a couple people before he got shot himself. White supremacists like to use this example to say that seattle protests were violent because most people don't know what actually happened. They just hear people died so therefore violence on both sides.
Sorry, I'm not equivocating the Seattle riots to the attempted coup we just witnessed. It's just funny to reflect that peaceful protesters in 2020 have a bad habit of going off the rails
@@josealvaradotorre6870 I think that your comment does create the false equivalency that BLM protests also went off the rails like the MAGA insurrections first in Michigan state house and now in the US capitol. BLM protestors at most made property damage and bruised some cops. MAGA protestors came in with guns and killed a cop and helped Nazis plan to kill US officials. It's not the same at all.
A UPS and a better cooler should fix those problems. Maybe also a generator. But If you are really serious... Why not buy a VM in a DataCenter and host it from there?
@@MarkVonBaldi Because you could get taken down like Parler. Better IMHO to use cloud server as a proxy, personally I don't want to open up ports on my home network.
There are obviously a lot of issues here with scalability, containerization... But my most important recommendation to anyone trying to do this is to make sure your raspberry pi is issued a static local IP address by your router. Most routers will automatically use DHCP to dynamically assign IP addresses to internal devices so your raspberry pi will be prone to being reassigned a new IP address at which point your port forward will need to be updated. Instead, you can assign a static IP to the pi based on its hardware ID / MAC address!
Great alternatives for Dynamic Ips + a domain is to use a service that check & update (if necessary) the IP in the DNS config of the domain. I'm running a docker container to update that in Cloudflare. I think Duck DNS is another alternative as well, there are some Docker images available for that as well.
This was hands down the most entertaining episode you did ! Kudos for all the jokes without taking any political stance, I hope more people will follow you example, because this is way too fun to not be done !
@owo グーチmoshi Gov didn’t ban parler is still operates but not allowed to be downloaded in App Store Ans App Store owned by private foaming called Apple In which they hey have freedom to use there services to the way they see it fits If not allowing parler is a thing then be it If you have company would you allow angry chickens on the internet to change what and what you want about your own company I don’t think so
@@ko-Daegu Yes Apple is a private company, but there are legal protections in place that make it so they aren't liable for the content on their platform. When they show a clear bias in their moderation, such legal protections might be removed and they would be held accountable for the illegal activity that happens on their platform, i.e. the large amount of CP that gets posted on twitter.
To host anything from home, you need to get a business internet service from any major ISP, as most ISP will restrict or block outgoing data from port 80. It's as easy as signing up for a normal home service, but it does cost more. Also, by having business service instead of home service, you get a static IP address, and usually you don't have a data usage cap.
Wish this was done like a month ago. Struggled a lot to get this up and running for some reason haha. Would be great to see a follow-up video on security that can be applied for a rasberry pi when hosting your own website.
The thing is that even if they can self host, vendor lock-in might be a major issue. We should really have a decentralized cloud, just like Piper-net :D. Individuals would share their computing power to host the cloud, and the collected fees from clients would be split between automagically.
im actually going with this approach for a website I'm building, we have to build out server infrastructure using hardware we buy and are putting in datacenters in Chicago, San Fran and New York locations for now. Very similar to your project.
I've been thinking to do this, but apart from downtime, do you have a suggestion on how to fortify our deployment if we are going to deploy it on home network?
A Raspberry Pi 4 is a great tool to develop stuff on, it might even run sites if you design your stuff for it optimally, something most developers have forgotten how to. ;) Scaling multiple RP4s is a fun experiment but very inefficient. It's way better to use modern x86 hardware, but you don't need a complete pizza box server setup to get way more power. AMD has released 8 core laptop CPUs that are incredibly powerful for the wattage used, not to mention, they don't have to be big nor break the bank (look up Asus PN50 4800U). But as an experiment anything beyond a RP4 is usually overkill. I think hardware like this makes someone re-evaluate what and how they are making stuff. Do I really need dynamic code that runs every time on the RP4 to display a page counter? Do I or the visitors really need that information? What do I and the visitor do with that information? How do you make your 'service' as lean as possible? Also, can your upload internet connection handle it, it is my understanding that not everyone had a 500/500 fiberglass connection... ;)
V helpful video, mate. Explained something that would've otherwise required me to actually attend class. A note: The first time I coded along through with this video, I kept getting the error: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or blah blah blah on line 13. I solved the error by adding a 0 to the first line of count.txt before starting the server and adding .toString() to newCount on line 13. I'm happy I got it working now, but now I'm confused why it worked for you and not for me. (working on a mac with macOS Sonoma, node v22.1.0) Anyways, great video as always.🍻
0:01 Parler vs AWS (my note; Amazon Web Services); on prem to the cloud. 0:45 raspberry pi model 4, Linux (noobs), nginx, node.js, html... 1:00 Comparative and tutorial: dynamic IP vs static IP, ISP.
The thought of having something *on* the cloud and getting kicked off (especially for a big site) is spooky. AWS definitely has to have some secret sauce. The speed of some AWS data transfers is surprisingly fast.
AWS is very expensive as fuck. My understanding is, that companies use it when they need something _fast_ no matter the cost, or when they need scalability over anything else. Most smaller to medium sized companies can be served from a single rack server in the basement just fine for a fraction of the cost.
I did this with Apache2, but with NGINX seems more friendly. Another tip is use pm2 to run your application if you have some power shortcut it'll rerun the processes automatically. Another point is that you can use the Linux CLI instead the GUI to use less resources. And you can save more money buying an Orange Pi board instead of the Raspberry one.
@@goc9000 If Cloudflare boots you, it's not that big of a deal to switch the DNS to route directly to bare metal. For the time being, Cloudflare is your best bet. No other platform can viably protect you from DDOS attacks. Not saying it's impossible, but it's extremely hard/costly. Bonus points if you can find a Cloudflare alternative in the EU because they have better laws (Germany, Switzerland, Austria, etc)
@John Doe Oooh sry I’m not American I was confused as what he was talking about so I saw other comment I remember him liking or something but saw many said he was talking about what happen recently. But I agree radical lefts are no better (being antifa or others) But could you elaborate how is blm bad I thought it’s basically saying hey slavery is bad & black people lives matter meaning don’t slave something like that
I have own data center. It's very interesting and beautiful because it's working 24/7 if appears error I can configure from scratch that job gives me joy and happiness.
This was awesome! Exactly what I was looking for, I wanted to start hosting a forum for the faculty of my university. This was so informative, specially since I'm new to nginx. I would be curious to know, how to distribute the load with that onto multiple raspberry pies. Would enjoy a follow up video on that very much!
Watched your channel for years and never felt the urge to comment until now. Thank you for filtering your humorous commentary in here; it helps me not feel so isolated as the only conservative (don’t worry, I won’t tell anyone) software engineer, seemingly, in the entire world.
Also worth mentioning that a lot of ISPs blocks incoming traffic to port 80 and 443 for home users. You'll need to use a different port to serve your pages.
For fireships 2021 predictions video I wrote I expected code documentation will need to become even more important/transparent for risk management & as a tool for platform migration. I didn't anticipate it to be from a singular event right when the year starts! I more assumed a series of small tiny wake up calls such as infrastructure brown outs, Industry regulation, or brexit compliance issues, etc would be the type of clarion calls.
So I got jazzed about this video and did it today (took 2 days for the pi to get here) Just wanted to make a note for others following along. If done as he said everything worked the first time. But when I restarted the pi, writeFileSync in line 13 kept throwing argument errors. For whatever reason after the first time I ran it, numbers were no longer a valid data type, so I had to add a const newStringCount = newCount.toString() in line 12 then updating the below variables with the updated name. The rest was super smooth, excited to put some static sites on it tomorrow.
I had this same problem and I though it may have been because of missing semicolons but that wasn't it. when I tried your solution, it worked but instead of getting a number I got the text NaN. edit: I fixed that but placing a 0 in the count.txt.
Thank you for this nice video. I learned a lot from it. Indeed, building your own data center is no easy task. And scaling becomes rapidly an issue. I am not a computer networking expert. But, what do you think of an open-source distributed infrastructure as an alternative to AWS and other cloud services. Users will still get billed, but the revenue will help maintain the infrastructure, and eventually pay full-time developers working on the project, etc. I look forward to hearing from you. Thank you for reading! P.S. Please, no toxic comments.
I trust the cloud but Im taking a master's degree in computer engineering, more specifically networking, distributed systems and security. I bought a RPI 4 so I could host my own website so that I could see a glimpse of how this works.
This is a good video because I would rather make a server out of raspberry pi and bits of driftwood and junk I found in the dumpster in the shady part of town that has bullet holes in it than do business with amazon.
One of the big problems with self-hosting at home, is that regular people don't typically have business lines that allow for multiple external connections at any given time. Standard residential lines throttle it to just one or two tops
Yeah. As a developer, I feel like the tutorial should have been “outside in”. I know how to make an app, but I’m not a network/system admin. How to get “inbound” internet service In which hosting a site is not a terms of service violation, then how to set up DNS, then the router/firewall, then the front end nginx/Apache, and lastly your app using whatever tech you already know.
Yes, scaling is what i need for my website that will probably have only one user, me. Scalability really is the thing that is bothering me so much in this situation.
When Amazon destroyed Parler.... I asked a question on a nodejs Facebook group, if it was safe or smart to bank our entire business on AWS... The group admin blocked me immediately. That said a lot about the world we live in
As someone who has years of network security experience, your question is a correct one. Yes, AWS has crazy levels of redundancy built into their system which can keep you up. The issue is that the threat vector is not simply Layers 1-7 if one is familiar with the OSI model. The threat vector is Layer 8 (an un-official one for human). Regardless if its done via script or manual work, someone will need to give the order to de-platform. The "benefits" of AWS no longer are a benefit, but a liability if the human relationships don't hold. From a business side, AWS grew because the political climate was stable enough to support centralization into such few hands. Between human flight out of areas associated with Big Tech and the increased emphasis to safeguard services and applications from political interference, there will be a massive push to decentralize. You may find George Gilder's Book "Life After Google: The Fall of Big Data and the Rise of the Blockchain Economy" worth reading. When people realize how long they've been toiling away in Big Digital Factories that actively work against their interest, it's going to be a massive shock to the system, one we are just starting to see happen. Hope everything goes well for your business, its getting crazy out there.
You say that, but the only people I've seen using similar memes and jokes are right-wing libertarians. There's a pretty big right-leaning bias in the first half of the video. Kinda disappointing tbh given everything that's happened. While I understand the relevance for this video, I really hope that future videos are truly neutral like past videos have been.
@@iagoofdraiggwyn98 Considering the only people who consider censorship of insurrection and attempts to overthrow the government "spooky" (which is not at all what has been said or implied) are right-wing media outlets, yes. No one bats an eye when we censor child porn because everyone understands that it's objectively bad for society and the victims. It's over a very clear line. I don't know why terrorism, threats of violence/murder, and insurrection are somehow not over that same line. I also want to be clear, this isn't an argument I'm looking to engage in as it would be in bad faith. There is literally nothing you could say that would change my mind on this topic, and you would only be proving yourself as an awful, hateful person by attempting to do so.
Please make an episode 2: How to scale with a raspberry pi :)
@@whateverbefore he meant scale up automatically to infinity based on certain metrics within a few minutes and scale down when idle to save on power.
How to scale a thumb-size raspberry pi to 3-floor server
Kubernetes is the way, but you would need the Pies. - I am thinking about doing this myself because I have a kube cluster burning money on GCP right now. - but I am not sure about ARM. - I might start with 2 second-hand mini 86 machines. - I have a feeling I am going to not be able to install something, - some library or service - plus I develop on Mac - if I get a bug in production I dont want to be wondering if its an ARM / 86 difference. - On the other hand - If I had an ARM Macbook, - that would be different.
Automaticly pls - it should order the extra hw automatically and call someone to add it to the system
Episode 2 is him walking to Microcenter to buy a second rPi
I personally use a Raspberry Pi 4 with this exact setup to run my development servers that don't need to scale, and that I don't want to pay for yet. The only difference is that I have a reverse proxy set up so that I can run many websites at once off of it, but the Raspberry Pi 4 is honestly such an underrated little computer. Great for risk-free development.
Is it capable for WebSocket? I mean can it handle a small online game with 150 users?
@@1Naif there's a lot of variables besides users that determine if it could but theoretically yes. Probably could. But not very well unless it's a tic tac toe or other simple game server. Real time interaction game play? no, just no.
@@1Naif Hello. I am working on aproject which involves controlling hardware components let's say leds connected to raspberry pi GPIO pins and i want host a webpage on raspberry pi to control the leds from a browser that's not a part of local network. Can I actually achieve this with web socket server. If not please tell any other ways to do this. Please do reply..This is for my college project.
@@1Naif Ill be the one that says 'of course'. You could build a super efficient bitwise framework..The pi would eat it up :)
So how do you set up one, do you have links to comprehensive tutorials?
Self-hosting is always the most based way to deploy your stuff. Also extra tip: dockerize it right away! (I mean do not install nginx directly on the machine but use docker-compose to launch and orchestrate the nodejs container and the nginx container)
Self-hosting is a perfect way to lose a lot of time and money, and because time is money is even worst. I'm being paid to do the best with the technologies, time and money we have, not to re-invent the wheel.
@@ArmandSterbend cope
What
I'd say no to containerizing if you're a single dev. It's too much work for nothing. If you're a company, then it's fine to containerize
If you want to learn new things, this is how it's done.
Those videos are amazing! I am senior SW dev but sometimes I feel like a trainee when watching this. IT is an infinite topic where innovations pops out on daily routine. Thanks for your work
Kids :- build Twitter from scratch
Men:- build zoom from scratch
Legends :-build AWS from scratch 8:14
Zoom actually was built from scratch. Annoying sound quality and awful security
@@Gameplayer55055 more like using scratch
I know Kids and men .... Hahahahaha
Damn. I didn't know Scratch was that powerful. Lol
@@player-8740 more like using brainfuck
Hosting out of your own local network is pretty nice for home automation, assuming you secure it properly. You can build and host a web interface that manages devices on your LAN. Super fun stuff. :)
Publish a video about this.
I'd buy a course on this.
@ameeraqel1090 And what would you be willing to pay for such a course. I have this very expertise. :)
All fun and games until someone start dossing literally your home connection trying to bring down your stupid to-do list webapp hosted on a Raspberry Pi
Man chill..
Hahaha
Use fail2ban. Problem solved.
Just use cloudflare.
@@nathanherder1414 fail2ban doesnt help against ddos attacks
This video broke down about 4 hours of research into 8 minutes and I love it. Could you do one about converting old computers to Ubuntu Desktop/Server and using Apache2? Love this. Thank you!
This is the kind of creativity we need in the world right now.
One more thing to add is the local IP of the raspberry pi is not static by default, it can get reassigned to another device if your raspberry pi goes offline or the router is restarted. You can mitigate this by assigning a static IP to your raspberry pi on your router based on the raspberry pi's MAC address
You can use ngrok/cloudflare tunnel though
Host a website on your own network to avoid the big monopolies of the internet!
**ISP blocks outgoing port 80 and 443 traffic**
VPN to an ISP which won't or use Tor onion services.
Buy a VPS on a provider what is far from US jurisdiction
Wireguard to it (Even my home router has a Wireguard plugin :P)
Point DNS A record to VPS
Some routing and forwarding
???
PROFIT
Man that is fucked up. He should actually make a video about IP4 / TCP / UDP and IP6. I bet most services online could be entirely descentralized without the need for so many servers & the cloud if ISP's would do shit like this.
Outgoing? You mean you can't connect to any website at all?
@@unicodefox I think it means that his website/server that is being forwarded from the Pi to the internet through his router using that public ip dynamic address gets blocked by his ISP
You have to maintain the room temperature as well. I used to host jenkins, application on rasp for interview purpose but rasp was damaged 8 months later due to heat issues. Remember it will be on 24×7, so need to maintain the temperature.
Solid design principles in 100 seconds 🤩
Yes I would love that
Yes, please! Could it be a longer episode? The longer, the better!
Please
with examples in JS!
you don't need solid if you don't use classes
A word of advice for anybody thinking of trying this: hosting a public website on your local internet is like painting a huge target on your back. Please make sure you know EXACTLY what you're doing before attempting this, or you are likely to get burned.
This was hilarious, sad and educational, all at the same time.
Yes 😞
+1!!!
What AWS did to parler is *exactly* why I have never liked "the cloud".
There is no "cloud", just someone else's computer.
The term makes it sound like some celestial heavenly place that delivers 1's and 0's
"There is no "cloud" Just someone else's computer."
Wow, that was a perfect way of putting it!
@@kaitsurugi3280 I wish I could take credit for it but I saw it on a sticker years ago lol
Of all the business that run in the cloud, across the whole world, you have list only 1 example. There are many reason to not like the cloud but what you mention here, isn't a strong one.
@@freshhb100 it is the ultimate example.
ddos attackers: it's free real estate
Cloudflare joined the chat
Just install and configure fail2ban, problem solved.
@@Sevenhens you can use it for any port you like. I'm running a couple of webapps on my Pi and fail2ban has been doing great job at banning hammering attempts. Setup jails and banaction = iptables-multiport and it's pretty much idiot-proof.
@@_MPP_
A modern DDOS (layer 7 attack) is nothing more than an http(s) request from millions to billions of zombie computers. It'll absolutely cripple your network, and you'll have no way of knowing what's a legit request or not!
EDIT: It seems in the past DDoses were done at lower layers and they CAN be mitigated somewhat using what you described. But I still stand that in 2021, modern DDoses can still cripple a specific website and the only solution is having a gigantic enough bandwidth pipe to take the hit.
@@_MPP_ Btw that's a good setup for network security, all im saying is that a DDos flood is impossible to mitigate since those requests look legitimate. You can ban russian and chinese ips, but with hacked amazon and Google IOTs in the US and Europe, it's now impossible to mitigate against zombie DDos attacks.
Between AWS and making your own service, there is a lot of room for other solutions ! Traditional hosting services also work nicely !
1x vCPU and 4GB RAM VPS container in some data centre, with static IP by default, 100Gbit connection to the outside world, pre-installed with some full Linux stack, with 99.98% uptime, for $5 a month - is a very viable alternative to a raspberry pi in a shoe box under the bed.
@@gaius100bc 1x vCPU and 4GB RAM VPS for $5 a month? freaking where?
Are you french?
Please expand this to a bigger scale and build an app with it :)
Who wants to see that?
I'd want to see the migration process and it's pains along with the monetary tradeoff happening
I made this so many times that it was like showing my computer haha. Glad this info is available for everyone, for the old school people we had to read lots an lots of pages separately to get this working as you are. thank you very much
Very, very cool! Would be great if you could make a whole series about that. I'd even buy it, if it were a course!!
Good kick-off. As you mentioned on the beginning, I’d be weary of the security aspect. Opening ports and leaving nginx config on default with no hardenining on the OS is not the best idea in general.
A good part two would be adding HTTPS and a domain name to the mix (with google domains or whatever) and securing things a bit on the web server.
Docker/k8s are also a hot topic, if instead of installing nginx directly on the host you add two different pods, one for the webpage static assets, and one for a backend API that serves the count number you’d end up with a setup that’s closer to real-world scenarios.
Just my 2c, thanks for the fun content!
Woaahh sounds so cool
"just in case a natural disaster destroys the raspberry pi like a volcano or peaceful protestors"
ROFL greetings from Seattle
the capitol building is in seattle?
@@cookingandjava7574 he's talking about capital hill in Seattle where there was peaceful protesting with instances of violence like when a 15 year old white kid drove through with guns trying to "kill some black guys", and then he shot a couple people before he got shot himself. White supremacists like to use this example to say that seattle protests were violent because most people don't know what actually happened. They just hear people died so therefore violence on both sides.
_Seattle_ : "Allow us to introduce ourselves"
Sorry, I'm not equivocating the Seattle riots to the attempted coup we just witnessed. It's just funny to reflect that peaceful protesters in 2020 have a bad habit of going off the rails
@@josealvaradotorre6870 I think that your comment does create the false equivalency that BLM protests also went off the rails like the MAGA insurrections first in Michigan state house and now in the US capitol. BLM protestors at most made property damage and bruised some cops. MAGA protestors came in with guns and killed a cop and helped Nazis plan to kill US officials. It's not the same at all.
Most under rated video ............. I had to learn all this stuff the hard way. Countless hours of exploration.
Cant wait for the next upload 'Scaling up the Raspberry PI bong cloud'
it's gonna be a instant hit.
This video is literally my job right now. Kudos.
The problem is heating of processor and electricity fluctuations.
Just one of many problems.
Tip: Use a fan and or heatsink, it helps a lot, may be overclock?, I'm not an expert though.
@@amalirfan 😆😆
A UPS and a better cooler should fix those problems. Maybe also a generator. But If you are really serious... Why not buy a VM in a DataCenter and host it from there?
@@MarkVonBaldi Because you could get taken down like Parler. Better IMHO to use cloud server as a proxy, personally I don't want to open up ports on my home network.
There are obviously a lot of issues here with scalability, containerization...
But my most important recommendation to anyone trying to do this is to make sure your raspberry pi is issued a static local IP address by your router. Most routers will automatically use DHCP to dynamically assign IP addresses to internal devices so your raspberry pi will be prone to being reassigned a new IP address at which point your port forward will need to be updated. Instead, you can assign a static IP to the pi based on its hardware ID / MAC address!
How to do that?
Amen! Finally a good tutorial about this very topic! Had my RP4 sitting on the shelf for months now not being able to get it to work. Thank You!
This is the best channel on RUclips for software devs 🙏
Historical moment: Swearing on Fireship (even if it was censored) xd
it's happened before.
it happened before in the electron vid I think
Situation with aws and parler well justfies that
Censorship could make any cryptoanarchist really mad
Makes me like Fireship even more.
Great alternatives for Dynamic Ips + a domain is to use a service that check & update (if necessary) the IP in the DNS config of the domain. I'm running a docker container to update that in Cloudflare. I think Duck DNS is another alternative as well, there are some Docker images available for that as well.
That’s exactly what he did
And that's why you don't comment before finishing the video.
Fireship just to lyk you became my favorite tech youtuber today
I really enjoyed your Freedom theme running in the 'background'!
This is funny and informative at the same time lol😂
In Portugal, most ISPs allow you to request a Static IP from the Router Administration Panel
This was hands down the most entertaining episode you did ! Kudos for all the jokes without taking any political stance, I hope more people will follow you example, because this is way too fun to not be done !
I totally agree with you. But my biggest problem is why would I invite 300 people into my home? There’s so many things that could go wrong.
“In case your app is destroyed by a volcano or peaceful protesters” SHOTS FIRED 😂😂😂
LOL it came out of nowhere 😂
"shots fired", literally, huh?
@owo グーチmoshi
Gov didn’t ban parler is still operates but not allowed to be downloaded in App Store
Ans App Store owned by private foaming called Apple In which they hey have freedom to use there services to the way they see it fits
If not allowing parler is a thing then be it
If you have company would you allow angry chickens on the internet to change what and what you want about your own company I don’t think so
@owo グーチmoshi how did they violate the camera apps terms of service?
@@ko-Daegu Yes Apple is a private company, but there are legal protections in place that make it so they aren't liable for the content on their platform. When they show a clear bias in their moderation, such legal protections might be removed and they would be held accountable for the illegal activity that happens on their platform, i.e. the large amount of CP that gets posted on twitter.
I didn't learn anything new but it's nice to see someone go through the process
To host anything from home, you need to get a business internet service from any major ISP, as most ISP will restrict or block outgoing data from port 80. It's as easy as signing up for a normal home service, but it does cost more. Also, by having business service instead of home service, you get a static IP address, and usually you don't have a data usage cap.
Most western countries dont have data caps, static ips are not uncommon and all ports are open.
I run servers at home with port forwarding and a static IP on a residential connection
Not a single port is blocked
the only funny youtube channel of all time period !!!
Wish this was done like a month ago. Struggled a lot to get this up and running for some reason haha.
Would be great to see a follow-up video on security that can be applied for a rasberry pi when hosting your own website.
Every video from you channel gives me out of the world feeling....
The thing is that even if they can self host, vendor lock-in might be a major issue. We should really have a decentralized cloud, just like Piper-net :D. Individuals would share their computing power to host the cloud, and the collected fees from clients would be split between automagically.
With a straight face - This was great. Thank you. Very informative.
No one:
Jeff: Different sized cords into different sized holes
What does the no one line add to the joke?
Host your app on port 80 on a raspberry pi. Russia, China and hackers everywhere approves of this video.
8:16 was definitely the best moment! 😂😂
im actually going with this approach for a website I'm building, we have to build out server infrastructure using hardware we buy and are putting in datacenters in Chicago, San Fran and New York locations for now. Very similar to your project.
Can't wait for the follow up where you create a data center with hundreds of Raspberry Pis
Booting my Pi from SSD was the best thing I've done on the RPI. Do it.
I love this channel even more now :)
Excellent video, love the humour and you expain the process really well. Cheers
"Both of which are terrible options, but lets go with the first one... From here we're going to build a NodeJS ap..." 😂
You just gave me all the steps to make my own Minecraft server on the pi, thank you so much
I've been thinking to do this, but apart from downtime, do you have a suggestion on how to fortify our deployment if we are going to deploy it on home network?
very much impressed how dense in information but at the same time rich in content fireship is able to present my favourite topics 🚀
A Raspberry Pi 4 is a great tool to develop stuff on, it might even run sites if you design your stuff for it optimally, something most developers have forgotten how to. ;) Scaling multiple RP4s is a fun experiment but very inefficient. It's way better to use modern x86 hardware, but you don't need a complete pizza box server setup to get way more power. AMD has released 8 core laptop CPUs that are incredibly powerful for the wattage used, not to mention, they don't have to be big nor break the bank (look up Asus PN50 4800U). But as an experiment anything beyond a RP4 is usually overkill. I think hardware like this makes someone re-evaluate what and how they are making stuff. Do I really need dynamic code that runs every time on the RP4 to display a page counter? Do I or the visitors really need that information? What do I and the visitor do with that information? How do you make your 'service' as lean as possible? Also, can your upload internet connection handle it, it is my understanding that not everyone had a 500/500 fiberglass connection... ;)
@Deborah Hearne That very much depends on what the server needs to do.
The comedy in this video should win an award.
I just woke up, how this dude already on topic with today’s events. Lmao
He must be in on the conspiracy! :D
V helpful video, mate. Explained something that would've otherwise required me to actually attend class.
A note:
The first time I coded along through with this video, I kept getting the error: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or blah blah blah on line 13. I solved the error by adding a 0 to the first line of count.txt before starting the server and adding .toString() to newCount on line 13. I'm happy I got it working now, but now I'm confused why it worked for you and not for me. (working on a mac with macOS Sonoma, node v22.1.0)
Anyways, great video as always.🍻
When you said they migrated to serverless i thought they moved to lambda functions for a second hehe
Yeah... i was confused... then I finally got the joke :)
Or S3, :)
was confused too, pretty funny joke tho ahahahh
You gained my subscription as soon as you said "peaceful protestor"
Perfect video in this days. Feels like there Will be a battle between good devs who like a free and open web and the big tech DDR/ccp devs
0:01 Parler vs AWS (my note; Amazon Web Services); on prem to the cloud.
0:45 raspberry pi model 4, Linux (noobs), nginx, node.js, html...
1:00 Comparative and tutorial: dynamic IP vs static IP, ISP.
The thought of having something *on* the cloud and getting kicked off (especially for a big site) is spooky. AWS definitely has to have some secret sauce. The speed of some AWS data transfers is surprisingly fast.
AWS is very expensive as fuck. My understanding is, that companies use it when they need something _fast_ no matter the cost, or when they need scalability over anything else. Most smaller to medium sized companies can be served from a single rack server in the basement just fine for a fraction of the cost.
I did this with Apache2, but with NGINX seems more friendly. Another tip is use pm2 to run your application if you have some power shortcut it'll rerun the processes automatically.
Another point is that you can use the Linux CLI instead the GUI to use less resources.
And you can save more money buying an Orange Pi board instead of the Raspberry one.
I was about to sleep, saw the notification, now sleep no more
You can also use an old laptop to host apps. I slapped on an SSD to an old laptop and it works well on hosting Django apps.
It's probably a good idea to route through Cloudflare, so that a DDOS attack doesn't put down your entire home network.
@@goc9000 If Cloudflare boots you, it's not that big of a deal to switch the DNS to route directly to bare metal. For the time being, Cloudflare is your best bet. No other platform can viably protect you from DDOS attacks. Not saying it's impossible, but it's extremely hard/costly.
Bonus points if you can find a Cloudflare alternative in the EU because they have better laws (Germany, Switzerland, Austria, etc)
even with an old office pc you find you can install linux and set up a webserver like this. good experience and very fun
Like a volcano, or a peaceful protest...
Is he /ourguy/ ?
@@armaldoillo630 for sure
based
For people who don’t know he’s talking about the what happened int he halls of Congress by alt-right wing
@John Doe
Oooh sry I’m not American I was confused as what he was talking about so I saw other comment I remember him liking or something but saw many said he was talking about what happen recently.
But I agree radical lefts are no better (being antifa or others)
But could you elaborate how is blm bad I thought it’s basically saying hey slavery is bad & black people lives matter meaning don’t slave something like that
I have own data center. It's very interesting and beautiful because it's working 24/7 if appears error I can configure from scratch that job gives me joy and happiness.
This was awesome! Exactly what I was looking for, I wanted to start hosting a forum for the faculty of my university. This was so informative, specially since I'm new to nginx. I would be curious to know, how to distribute the load with that onto multiple raspberry pies. Would enjoy a follow up video on that very much!
Watched your channel for years and never felt the urge to comment until now. Thank you for filtering your humorous commentary in here; it helps me not feel so isolated as the only conservative (don’t worry, I won’t tell anyone) software engineer, seemingly, in the entire world.
Also worth mentioning that a lot of ISPs blocks incoming traffic to port 80 and 443 for home users. You'll need to use a different port to serve your pages.
You are doing awesome work, keep the flow running 👍
OMG I always wanted a guide like this :o
Literally done this exact thing with my raspberry pi, even used no-ip, quite easy imo and fun.
For fireships 2021 predictions video I wrote I expected code documentation will need to become even more important/transparent for risk management & as a tool for platform migration. I didn't anticipate it to be from a singular event right when the year starts! I more assumed a series of small tiny wake up calls such as infrastructure brown outs, Industry regulation, or brexit compliance issues, etc would be the type of clarion calls.
This was educational and entertaining.
Thank you very much, Fireship! As a sequel to this, could we ask for an SSL + certbot setup with ARM docker images? That would be super cool!
lol no, that's way too esoteric
So I got jazzed about this video and did it today (took 2 days for the pi to get here)
Just wanted to make a note for others following along. If done as he said everything worked the first time.
But when I restarted the pi, writeFileSync in line 13 kept throwing argument errors.
For whatever reason after the first time I ran it, numbers were no longer a valid data type, so I had to add a const newStringCount = newCount.toString() in line 12
then updating the below variables with the updated name.
The rest was super smooth, excited to put some static sites on it tomorrow.
I had this same problem and I though it may have been because of missing semicolons but that wasn't it. when I tried your solution, it worked but instead of getting a number I got the text NaN. edit: I fixed that but placing a 0 in the count.txt.
Thank you for this nice video. I learned a lot from it.
Indeed, building your own data center is no easy task. And scaling becomes rapidly an issue.
I am not a computer networking expert. But, what do you think of an open-source distributed infrastructure as an alternative to AWS and other cloud services.
Users will still get billed, but the revenue will help maintain the infrastructure, and eventually pay full-time developers working on the project, etc.
I look forward to hearing from you.
Thank you for reading!
P.S. Please, no toxic comments.
I trust the cloud but Im taking a master's degree in computer engineering, more specifically networking, distributed systems and security. I bought a RPI 4 so I could host my own website so that I could see a glimpse of how this works.
This is a good video because I would rather make a server out of raspberry pi and bits of driftwood and junk I found in the dumpster in the shady part of town that has bullet holes in it than do business with amazon.
What a blast! Why I have a couple of raspberry pi s. And I can't wait .Faith restored
I hope you don’t go missing 😋🤞
This video made me really like this channel
One of the big problems with self-hosting at home, is that regular people don't typically have business lines that allow for multiple external connections at any given time. Standard residential lines throttle it to just one or two tops
Did you think this subject (or even this channel) was for regular people in the first place? Who exactly are you talking to?
Yeah. As a developer, I feel like the tutorial should have been “outside in”.
I know how to make an app, but I’m not a network/system admin.
How to get “inbound” internet service In which hosting a site is not a terms of service violation, then how to set up DNS, then the router/firewall, then the front end nginx/Apache, and lastly your app using whatever tech you already know.
Yes, scaling is what i need for my website that will probably have only one user, me. Scalability really is the thing that is bothering me so much in this situation.
When Amazon destroyed Parler.... I asked a question on a nodejs Facebook group, if it was safe or smart to bank our entire business on AWS... The group admin blocked me immediately. That said a lot about the world we live in
As someone who has years of network security experience, your question is a correct one. Yes, AWS has crazy levels of redundancy built into their system which can keep you up. The issue is that the threat vector is not simply Layers 1-7 if one is familiar with the OSI model. The threat vector is Layer 8 (an un-official one for human). Regardless if its done via script or manual work, someone will need to give the order to de-platform. The "benefits" of AWS no longer are a benefit, but a liability if the human relationships don't hold.
From a business side, AWS grew because the political climate was stable enough to support centralization into such few hands. Between human flight out of areas associated with Big Tech and the increased emphasis to safeguard services and applications from political interference, there will be a massive push to decentralize.
You may find George Gilder's Book "Life After Google: The Fall of Big Data and the Rise of the Blockchain Economy" worth reading. When people realize how long they've been toiling away in Big Digital Factories that actively work against their interest, it's going to be a massive shock to the system, one we are just starting to see happen.
Hope everything goes well for your business, its getting crazy out there.
Bonus by doing this: Raspberry pi with a node.js/nginx server is so power efficient that you’re really making a positive environmental effort!
I am planning on building my own web hosting and this appears. 😂😂😂
Cool! You just saved Humanity! 😃. Do a part 2 that addresses any security holes and how to mitigate. Good summary work! 👍
My interpretation of fireship's political stance: everything is crazy, dude
That's just what everybody is thinking lol
Most people seem to be over emotional and under analytical
You say that, but the only people I've seen using similar memes and jokes are right-wing libertarians. There's a pretty big right-leaning bias in the first half of the video.
Kinda disappointing tbh given everything that's happened. While I understand the relevance for this video, I really hope that future videos are truly neutral like past videos have been.
@@PrintAimGame so like, your logic in context is:
censorship is spooky = right wing bias?
@@iagoofdraiggwyn98 Considering the only people who consider censorship of insurrection and attempts to overthrow the government "spooky" (which is not at all what has been said or implied) are right-wing media outlets, yes.
No one bats an eye when we censor child porn because everyone understands that it's objectively bad for society and the victims. It's over a very clear line. I don't know why terrorism, threats of violence/murder, and insurrection are somehow not over that same line. I also want to be clear, this isn't an argument I'm looking to engage in as it would be in bad faith. There is literally nothing you could say that would change my mind on this topic, and you would only be proving yourself as an awful, hateful person by attempting to do so.
best advice ever given to use cloud ☁️
How miserable that we've gotten to this point. Thanks for the content my man.
Hands down 🙌 best video seen in 2021.