I'm now VPS red pilled (and protecting with CloudFlare)

  Рет қаралды 31,477

Web Dev Cody

Web Dev Cody

Күн бұрын

link to code:
github.com/webdevcody/single-... (docker-compose & caddy)
github.com/webdevcody/webdevc... (nextjs14 & dockerfile)
My Products
📖 ProjectPlannerAI: projectplannerai.com
🤖 IconGeneratorAI: icongeneratorai.com
📝 ThumbnailCritique: thumbnailcritique.com
Useful Links
💬 Discord: / discord
🔔 Newsletter: newsletter.webdevcody.com/
📁 GitHub: github.com/webdevcody
📺 Twitch: / webdevcody
🤖 Website: webdevcody.com
🐦 Twitter: / webdevcody

Пікірлер: 363
@AnteZivkovic
@AnteZivkovic 2 ай бұрын
Digital ocean DDOSed you because of your "Why I'd never host my apps on a VPS" video.
@WebDevCody
@WebDevCody 2 ай бұрын
probably 🤣
@AndrieMC
@AndrieMC 2 ай бұрын
isnt aws vps stuf
@yassinesafraoui
@yassinesafraoui 2 ай бұрын
Makes sense it's their style
@rdrbsquknibetsap2559
@rdrbsquknibetsap2559 2 ай бұрын
Just get a ddos protected VPS from OVH, Path you can find providers easily. (Ex. Vibegames path) Which will basically make the server not be able to be hit on L4 and also better specs then Digital Ocean.
@3ventic
@3ventic 2 ай бұрын
@@AndrieMC if you use AWS for VPS (ec2 as they call it) alone, you probably shouldn't be using AWS.
@rodjenihm
@rodjenihm 2 ай бұрын
Next step: hosting everything on Raspberry PI 5 in your room.
@WebDevCody
@WebDevCody 2 ай бұрын
Let’s go!
@PASTRAMIKick
@PASTRAMIKick 2 ай бұрын
unironically yeah
@joshrogan3577
@joshrogan3577 2 ай бұрын
Babe wake up the daily Web Dev Cody DDOS video just dropped
@kathenae
@kathenae 2 ай бұрын
😂😅
@SeibertSwirl
@SeibertSwirl 2 ай бұрын
Oh god I hope this doesn’t become a daily thing, I will have to start up an onlyfans 😅
@algobuddy
@algobuddy 2 ай бұрын
Switching to a VPS with Cloudflare for DOS protection sounds like a smart move to avoid hefty charges. Your step-by-step guide makes it much easier for others to follow suit. Appreciate the insights!
@redetermine
@redetermine 2 ай бұрын
Chatgpt ahh comment
@yousofscodingadventures
@yousofscodingadventures 2 ай бұрын
This is wild, thank you for sharing these videos with us. Happy to see you got things resolved!
@jose6183
@jose6183 2 ай бұрын
Thank you for sharing this! These couple of videos have been really useful. Great content
@markshinkai598
@markshinkai598 2 ай бұрын
This is starting to be a series, But this content is very real and educational
@Kay8B
@Kay8B 2 ай бұрын
If its just for side projects, its a lot easier having your service go down and just rebooting it all back up rather than paying a hefty bill. Cloud is strictly for high traffic businesses in my opinion. Plus you learn so much more setting up your own VPS and securing it yourself.
@rand0mtv660
@rand0mtv660 2 ай бұрын
True. I think it's great knowing how to run a node/go/whatever app and setup nginx or caddy to proxy to it. You realize how much you can do and what problems those managed services actually solve for you. Also in some enterprise cases you cannot just deploy to whatever cloud service and must deploy on premises or are potentially only allowed into VMs so having this knowledge is beneficial.
@darrenhinde2971
@darrenhinde2971 2 ай бұрын
Thank you for sharing all these videos, been insightful especially as I am looking to move from Vercel to AWS and some of these issues I never thought of.
@dr.lazysloth3415
@dr.lazysloth3415 2 ай бұрын
I don't know why anyone would waste time DDOSing your system. You're just a nice guy posting fun educational videos. I am probably to lazy to come up with a reason.
@WebDevCody
@WebDevCody 2 ай бұрын
sometimes a DDoS attack is just random; someone finds an open machine after scanning ip addresses and attacks it; but yes this seems targeted 🤣
@dr.lazysloth3415
@dr.lazysloth3415 2 ай бұрын
@@WebDevCodyye maybe it's just random but it feels targeted from your point of view. It does increase the potential revenue of amazon or cloudflare which might benefit the attacker. Don't know if you can just change the IP..
@rahultech77
@rahultech77 2 ай бұрын
Dude I feel the attacker wants to DDos protect their app, so wants a tutorial from Cody for it 😂
@dr.lazysloth3415
@dr.lazysloth3415 2 ай бұрын
@@rahultech77 that’s probably it 😆
@JamesJGoodwin
@JamesJGoodwin 2 ай бұрын
Hackers and script kiddes (especially) loves attention
@stevanfreeborn
@stevanfreeborn 2 ай бұрын
Thanks for sharing how you are working through this situation. I'm though really sorry about the AWS charges. That just sucks. I'm hoping their understanding and helpful about a credit or refund.
@SalvaToroTorus
@SalvaToroTorus 2 ай бұрын
Nice to follow your journey. Thanks for sharing.
@afailable
@afailable 2 ай бұрын
These videos are so helpful. Thanks so much man
@complikatd
@complikatd 2 ай бұрын
Thanks for sharing these situations with the rest of us. Helps everyone!
@ismailzahhar
@ismailzahhar 2 ай бұрын
GREAT technical video, looking to see more content in your channel on Deployment solutions and options. Great work man
@greob
@greob 2 ай бұрын
Thanks for sharing your experience!
@xemronn2303
@xemronn2303 2 ай бұрын
Great content, your DDOS protection series are basically showing a process how human being is learning from it's own mistakes :D Hopefully it will save some money for others too! One tip from me, you can move this push-image script to a github action, that will build and push image to ECR automatically on every push to master(or only when you manually trigger it). This way you will have kind of automated CD pipeline for your project. GH actions are also free up to 2k run minutes per month making it a decent solution for hobby projects
@teamvashmmo3218
@teamvashmmo3218 2 ай бұрын
Great vid!! I wonder if this would help too: SST is moving to Ion apparently next week and making it so you can setup cloudflare as well as AWS resources, so you can mix and match cloud providers in your infrastructure as code. Would love to see you do the move to Ion and deploy your next.js site to cloudflare
@SeibertSwirl
@SeibertSwirl 2 ай бұрын
Love ya! ❤ you’re doing a great job
@WebDevCody
@WebDevCody 2 ай бұрын
thanks sexy!
@franinja080
@franinja080 2 ай бұрын
Extremely useful video, cheers
@oneguyyyy
@oneguyyyy 2 ай бұрын
Thanks for sharing this with us!
@namtruong6724
@namtruong6724 2 ай бұрын
Hi, thanks for what u've done so far. Yours is probably top youtube channel out there. I have some questions if u don't mind: - Take example you are using docker-compose to serve traffic & app. What if u need to horizontal scale. What kind of infra u'll choose in this case? K8s or sth?, or maybe docker-swarm I guess? - What is different between nginx and caddle u r using, what is the pros/cons of it
@WebDevCody
@WebDevCody 2 ай бұрын
Idk I plan to just scale up vertically as much as possible and see how far it’ll take me. Caddy seems simplier, nginx is probably feature rich
@jonkf7548
@jonkf7548 2 ай бұрын
If you are using a VPS you should set it up to reject all connections except HTTPS coming specifically from Cloudflare's IP ranges (and ssh traffic if you don't have another console available).
@WebDevCody
@WebDevCody 2 ай бұрын
thanks for the suggestion, I ended up adding that today as well
@joeyywill1234
@joeyywill1234 2 ай бұрын
Cheers for the insight my duuuude
@OetziOfficial
@OetziOfficial 2 ай бұрын
Can't wait for SST ion to have all of this ready :) I don't want to use docker stuff, that hustle annoys me a lot. Way to much effort. Preferably with SolidStart (and Protection enabled)
@treksis
@treksis 2 ай бұрын
Thank you for sharing rare experience to the public.
@ewwitsantonio
@ewwitsantonio 2 ай бұрын
Much appreciated!!
@karanjeswani306
@karanjeswani306 2 ай бұрын
Thank you for the great content as always. One question @WebDevCody. Deploying on vercel also doesn't save you from ddos?
@Miguelmigs24
@Miguelmigs24 2 ай бұрын
They can be nice and forgive you the charge, but it will definitely break your free tier and scale your charges like crazy, a lot more expensive than AWS for sure
@yoJuicy
@yoJuicy 2 ай бұрын
Such good content. this could be a 5 hour paid tutorial with a next.js/VPS hosting stack. sst, docker compose, caddy, TLS, cloudflare etc. would love to know the performance loss with cloudflare in front.
@Cyber_Lanka
@Cyber_Lanka 2 ай бұрын
Nice. I remember commenting on last video asking why you didn't use CF. I mean you could use CF with EC2 if you want.
@codehighlights
@codehighlights Ай бұрын
Love how he learned and changed totally the argue that we should host everything on managed services like cloudfront, vercel, netlify etc instead of doing custom VPS setups. :)
@WebDevCody
@WebDevCody Ай бұрын
😆 a $1,500 bill created in a few hours will do that to a dev
@neociber24
@neociber24 2 ай бұрын
I had some hobby projects on AWS, and is scary that any error or DDOS can give you a 2000$ bill. Paying 5$ dollar a month for a VPS for projects that make no money is better than being worry about that.
@DaviMartins99
@DaviMartins99 2 ай бұрын
VPS, Caddy, Digital Ocean, docker-compose... Let's go, Cody! This is the way!
@user-lb1nl6hx9v
@user-lb1nl6hx9v 2 ай бұрын
Hey, great videos! Learned a lot. I have a question: if you host it on the VPS, would you still get a higher bill if you get DDoSed without Cloudflare? Or do you only pay for the instance and it would just get laggy or go down?
@WebDevCody
@WebDevCody 2 ай бұрын
your instance would crash; therefore, there is no extra bandwidth you'd get charged for. It's just a trade off, would you rather have 100% uptime (you probably want serverless), or reduce your chance of getting a $600 in one hour.
@ChrisAthanas
@ChrisAthanas 2 ай бұрын
This is quality content
@muhammadalirasheed8894
@muhammadalirasheed8894 2 ай бұрын
Great explanation.
@analogsensor
@analogsensor 2 ай бұрын
Thanks for the video, that was very helpful, but I have a few questions, first is why are you using AWS for docker containers? Can I just put my container straight to the DigitalOcean? Second, is there some throwbacks for deploying nextjs to somewhere else instead of Vercel? And maybe there is some frameworks, that are more "deploy where you want" friendly? And I'm mostly talking about Nextjs as full-stack? Or do I need to split my backend and front end as different applications? P.S. I'm just starting to learn more about other frameworks and I'm considering switching from Nextjs (cause I'm stuck at Vercel)
@WebDevCody
@WebDevCody 2 ай бұрын
You can deploy next anywhere. It should have the same feature except edge computing. I was nit deploying containers on aws; I was using serverless
@buddy.abc123
@buddy.abc123 2 ай бұрын
There we go! Lol I remember you yelling us to 'watch our dev ops privilege' or something like that when we called these cloud services out. You were junior and a cloud fanboy, I think this was last year 😂 It's really interesting to watch you grow man
@SeibertSwirl
@SeibertSwirl 2 ай бұрын
lol you’re probably part of the crew doing it huh?
@lukasberk9303
@lukasberk9303 2 ай бұрын
Next video "Why should you should host simple projects on a VPS instead of AWS" ...............
@SeibertSwirl
@SeibertSwirl 2 ай бұрын
@@lukasberk9303 at least you’re all learning together? 🥴 lol unless yall are just here to stare at his face for minutes on end which I guess is cool too 🫠
@WebDevCody
@WebDevCody 2 ай бұрын
all it took was a DDoS attack and an AWS linked to my credit card to change my thought process 🫠
@oSpam
@oSpam 2 ай бұрын
@@WebDevCodyto be fair you could have (and still can) contact aws support. They would give credit to cover the full cost and help you protect in the future most likely. You also can get $1000-100000 based on being a startup, that could also help. It’s a shame you decided to fully make up your mind so soon.
@patolorde
@patolorde 2 ай бұрын
Great video, i will try to replicate this setup. I dont want to go homeless
@imam4521
@imam4521 2 ай бұрын
I hope you make a detailed video on how to deploy next.js on VPS windows server .
@gavinlindridge
@gavinlindridge 2 ай бұрын
Really awesome to see how youve done it. Interested to know why you didnt go down the using of apps in digitalocean, you can literally just throw a docker container into it so you never need to ssh in etc. Though i definitely see some pros and cons to both approaches
@WebDevCody
@WebDevCody 2 ай бұрын
Because I like wasting time 😂
@gadgetboyplaysmc
@gadgetboyplaysmc 2 ай бұрын
THANKS CODY I LOVE YOU. I'm actually dogshit at Docker. Always have setup my garbage apps just manually. Always have just used Docker for spinning up DBs, not for containerizing the whole deployment. This was interesting. More Docker vids would be cool!
@gadgetboyplaysmc
@gadgetboyplaysmc 2 ай бұрын
Can you also do a vid setting up coolify on a VPS next? Everyone's been going wild with it.
@mettle_x
@mettle_x 2 ай бұрын
Nice walkthrough. If you still get into the same issue, perform those extra dance I posted in your last video. Good luck!
@WebDevCody
@WebDevCody 2 ай бұрын
could you explain why AAAA would help out? if it's behind cloudflare, why would it make any difference?
@mettle_x
@mettle_x 2 ай бұрын
@@WebDevCody Most of the internet still use IPv4 so most of the devices participating in a DDoS attack are presssmably using IPv4. If your VPS blocks IPv4 altogether, there will be one way to ping your server - that is through Cloudflare. Now someone can scan the ports of AWS to find the servers that have port 80/433 open and send an HTTP request to your server. However, if you don't use catch all block in Caddyfile: it sends something like 422 to deny requests. That's good but still it receives the HTTP request. Setting up IPv6 with AAAA record will future-proof your server as well. Also, users with IPv6 enjoy faster performance.
@mettle_x
@mettle_x 2 ай бұрын
@@WebDevCody I wrote a long reply but it's not showing up here. Joining your Discord if we can have chat there.
@Kaviarasu_NS
@Kaviarasu_NS 2 ай бұрын
While I have some hands on experience with dockerizing our apps, I’m new to other stuffs discussed. Can you please make a short video on how to have this set up from scratch to deployment ❤
@Dom-zy1qy
@Dom-zy1qy 2 ай бұрын
But why would someone DDOS you ?? You're the chillest dude on web dev yt
@WebDevCody
@WebDevCody 2 ай бұрын
Because there is a lot of room in hell and someone is reserving their slot
@real23lions
@real23lions 2 ай бұрын
@@WebDevCodyI’m stealing this answer 😂
@fionnbracken
@fionnbracken 2 ай бұрын
Do you have to scp the certs to your vps everytime they expire or is there a way to automate that?
@xyssxy
@xyssxy 2 ай бұрын
You definitely want to make sure to block all incoming traffic on port 443 and 80 except for cloudflare ips in a firewall like ufw on the backend server. If you dont do that, crawlers will be able to resolve your domain to your backend ip, leaking the ip, bypassing any cloudflare protection.
@groff8657
@groff8657 2 ай бұрын
If you proxy to your website using CloudFlare DNS, how do you know those IPs? Are they listed somewhere, is there documentation that lists all those IPs?
@xyssxy
@xyssxy 2 ай бұрын
@@groff8657 There are websites & tools to scan pretty much the entire web, if you render your pages on ips too, or have any correlations to your domain, they will be able to link the ip back to the domain
@twitchizle
@twitchizle 2 ай бұрын
​@@groff8657there are 255^4 ips in the world. Its not so hard to crawl all of em
@xyssxy
@xyssxy 2 ай бұрын
@@groff8657 Yes there is, just type cloudflare ips in any search engine
@Lucas-qr7ul
@Lucas-qr7ul 2 ай бұрын
@@groff8657 It's in cloudflare docs. You can google and you'll find it.
@Kimitri
@Kimitri 2 ай бұрын
I never search for cyber security so much like in the last night haha, I guess I learned your lesson too
@anonymoussloth6687
@anonymoussloth6687 2 ай бұрын
I am a bit new to tgese concepts. Can you explain why you shifted to a vps? Couldn't you have connected cloudflare to your cloud formation distribution?
@MarkWeber-hg4ot
@MarkWeber-hg4ot 2 ай бұрын
Might also make sense to look at dokku
@shanesreal
@shanesreal 2 ай бұрын
You could also integrate cloudflare with aws loadbalancer, unless they attack you with cloudflare bypass; then maybe you still get charged.
@SyedShams982
@SyedShams982 2 ай бұрын
Brother, it's amazing and I am thankful to you for sharing such helpful videos. I have one wish: can you create a full-stack college website?
@appel-32
@appel-32 2 ай бұрын
yesterday we were talking in your discord about this issue, it's good you bring this type of content but at the same time is bad, there's a lot of people looking for "targets" and this type of videos bring a lot of attention.
@igortalic2021
@igortalic2021 28 күн бұрын
Hey one question, why did you choose to move to digital ocean, was it an option to just add cloudflare in front of aws setup? Tnx, great video like always! 😊
@WebDevCody
@WebDevCody 28 күн бұрын
Since this video I’m actually using railway now. Honestly I just wanted a service that has automatic billing limits which will kill my services if I spend too much money. Not many services provide this. Some have primitives I could use to build a kill switch from scratch, but I don’t have time to waste on that
@igortalic2021
@igortalic2021 28 күн бұрын
Tnx for the answer, yeah I guess kill switch is a great feature! Didn't use railway will look into it 😊
@brunocascio
@brunocascio 2 ай бұрын
You can configure a cloudflare tunnel which runs on your droplet, and avoid configuring ssl in both places but also you can avoid exposing your droplet
@WebDevCody
@WebDevCody 2 ай бұрын
I’ll check that out, sounds easier
@royalepros669
@royalepros669 2 ай бұрын
Not sure if this is a stupid question, the bulk of the AWS bill comes from Cloudfront HTTP requests. Can you just change from using cloudfront as CDN to cloudflare? Instead of moving out of AWS completely?
@WebDevCody
@WebDevCody 2 ай бұрын
cloudfront has a bunch of path rules that know how to invoke lambdas on requests. It wouldn't be an easy refactor
@kamleshpaul414
@kamleshpaul414 2 ай бұрын
can we use github repository to store docker image
@3ventic
@3ventic 2 ай бұрын
You don't need to use Cloudflare's origin cert if you already have a valid cert. I also use Caddy and just let it do its default Let's Encrypt or ZeroSSL behind Cloudflare, reducing the amount of manual setup and configuration needed. The origin cert or another trusted cert is what you need for the "Full (strict)" option instead of just "Full".
@WebDevCody
@WebDevCody 2 ай бұрын
Ahh ok good info!
@parlor3115
@parlor3115 2 ай бұрын
I thought you said we should avoid hosting on raw servers as much as possible. What makes this project a plausible use case for VPS hosting?
@unclesam2941
@unclesam2941 2 ай бұрын
DigitalOcean also has a container repository service, any particular reason to keep it on AWS ?
@codingbythemoon
@codingbythemoon 2 ай бұрын
Sorry to hear about AWS bill. But did you not have cloudflare setup already in front of AWS? Because you mention WAF. Did it not work properly?
@teamvashmmo3218
@teamvashmmo3218 2 ай бұрын
He had cloudfront, which is AWS's CDN
@yannickleroy7419
@yannickleroy7419 2 ай бұрын
my g
@DJohn001
@DJohn001 2 ай бұрын
It would be fun if you could got a AWS engineer who helps you to secure you instances and let you make an interview about it to educate people who like us who are watching your channel. I mean it would also benefit them because your and other people with small side projects are more onto their products.
@ShootingUtah
@ShootingUtah 2 ай бұрын
Maybe I'm just too new to the web dev world but this seems entirely convoluted! Just to stop a DDOS you have to apparently run and use like 8 build tools and different services and providers?!? What the hell has the Internet become?
@jitx2797
@jitx2797 2 ай бұрын
Cody at 6:28 if you're using Cloudflare generated cert then you can safely turn on the full (strict) option in SSL
@WebDevCody
@WebDevCody 2 ай бұрын
awesome, I'll turn that on
@kamehameha38
@kamehameha38 2 ай бұрын
Are the certs free to generate? I'm currently using Let's Encrypt cert on my VPS and thinking of adding cloudflare for extra protection.
@jitx2797
@jitx2797 2 ай бұрын
yes those are absolutely free and even you can select the term like 3months, 1years or even 15 years@@kamehameha38
@WittCode
@WittCode 2 ай бұрын
I've always used a VPS for personal projects for this very reason! Companies I worked for all use AWS and the bills in dev environments alone put me off of using it...
@wavyboyjodii
@wavyboyjodii 2 ай бұрын
"if not good luck" says a whole lot LOL. but thanks this is valuable.
@georgemwaniki
@georgemwaniki 2 ай бұрын
Am a frontend developer and would love to transition to fullstack and master these deploment stuff, do you have a course on this or one you recommend ?
@jbzsfq
@jbzsfq Ай бұрын
Could also host your own docker registry on the vps to store image?
@WebDevCody
@WebDevCody Ай бұрын
I’ve never done that actually; but I’m sure it’s possible
@bhavyajain638
@bhavyajain638 2 ай бұрын
Why did you use a custom TLS cert with caddy when configured caddy to do it automatically?
@WebDevCody
@WebDevCody 2 ай бұрын
You have to use the cloudflare cert or else you have to do a bunch of extra work
@NaourassDerouichi
@NaourassDerouichi 2 ай бұрын
Can't wait for the attacker to ddos test the new setup :D
@WebDevCody
@WebDevCody 2 ай бұрын
if he does I'm quitting
@rdrbsquknibetsap2559
@rdrbsquknibetsap2559 2 ай бұрын
@@WebDevCodyNo need to worry you are fine now unless you are charged for your AWS servers running in the backend per request you're fine. I would recommend not using AWS at all it's overpriced and trash IMO.
@jackweaver5840
@jackweaver5840 2 ай бұрын
How are you able to be consistent with learning and spending good amount of time in front of the screen learning new technology and basically working all the time with producing technical content as well, I have many things on the to do list and I've been getting burnt out a lot lately to the point where sometimes I don't wanna do anything or that I can get high motivation for a day then it goes down drastically, how can I improve this situation from your experience? Thank you
@WebDevCody
@WebDevCody 2 ай бұрын
I find learning new things fun. When I start to get bored of doing the same thing every day at work, I reach for making KZfaq videos or learning new stuff
@can_uysal
@can_uysal 2 ай бұрын
Why don't you use cloudflare + aws (sst)? Is there a way for it? I really like sst and aws deployment and would like to use cloudflare in front.. What made you go vps instead of this setup (if exists)
@WebDevCody
@WebDevCody 2 ай бұрын
Honestly, I’m kind of just tired of serverless and lambda at work we use lambda and I can’t even count how many hours I’ve wasted trying to get binaries to run on lambda ran into lambda size limits, run into API Gateway timeout issues run into having debug permissions over and over again Execution roles having to deal with cold starts that make the application. Just feel slow when you don’t already have a ton of users. Honestly, I think just hosting a single node executable on a VPS or a container runner is extremely low maintenance compared to anything you can hack together in the AWS ecosystem.
@cloudeater9571
@cloudeater9571 2 ай бұрын
Doesn’t DO offer DDOS protection, or is that not available for their droplets/whatever you used for the VPS? Naturally any and all protection sounds good lol
@omega_sine
@omega_sine 2 ай бұрын
I always knew vps hosting was the right way 😎
@internetexplorer7880
@internetexplorer7880 2 ай бұрын
Ah that would definitely hurt my wallet too. I was planning to use vercel and use cloudflare over it. Any chance you can make a tutorial for this?
@zivtamary
@zivtamary Ай бұрын
how do you handle ci/cd when you push to one of those repo's?
@WebDevCody
@WebDevCody Ай бұрын
I’d probably build the image in GitHub actions, publish it to a container registry, then ssh into the machine and rerun docker compose up
@CodeZakk
@CodeZakk 2 ай бұрын
what people gain from making this type of attacks? also if you use vercel the price will be i think 10 times how do you protect if you use vercel. thanks in advance😊😊
@EliasJackson
@EliasJackson 2 ай бұрын
Does cloudflare also have free DDoS protection for static websites and serverless functions that they host?
@tobiiias1793
@tobiiias1793 2 ай бұрын
next: setup traefik on the VPS instead of caddy (Labels in composefile set up the config for Reverse Proxy)
@Jack-kf1tn
@Jack-kf1tn 2 ай бұрын
does it not make sense to just use cloudflare with your aws project. Or is it necessary to use a vps to prevent the DOS attack?
@WebDevCody
@WebDevCody 2 ай бұрын
I'm sure it's possible, but I'm a bit tired of serverless
@tljstewart
@tljstewart 2 ай бұрын
nice stuff, why not use aws vps with cloudflare?
@WebDevCody
@WebDevCody 2 ай бұрын
Because if I want a vps, DO or railway has a much better ui for cheapee
@ComfyCosi
@ComfyCosi 2 ай бұрын
so does cloudflare not work with lambdas?
@user-jm1qz4dj9l
@user-jm1qz4dj9l 2 ай бұрын
when to use next js instead of react?
@SeanCassiere
@SeanCassiere 2 ай бұрын
I don't remember the steps, but you can set your VPS to not accept connections that are not on the internal network and not from Cloudflare. Just remember to allow ssh over a custom port.
@WebDevCody
@WebDevCody 2 ай бұрын
I did that today, I setup a DO firewall rule and only allow inbound requests from cloudflare specific IP addresses.
@SickBeard
@SickBeard 2 ай бұрын
6:06 CloudFlare can inspect all of your traffic in plain text. (This might be obvious, but I think it's always good to at least point out.)
@WebDevCody
@WebDevCody 2 ай бұрын
right, I guess you have to trust cloudflare doesn't sell your data or forward it to the NSA 🤣
@RemotHuman
@RemotHuman 2 ай бұрын
@@WebDevCody I feel like they definitely do forward it to the NSA. We need end to end encryption on our applications starting on the client
@emsp5558
@emsp5558 2 ай бұрын
damn feel bad for u
@WebDevCody
@WebDevCody 2 ай бұрын
🤷‍♂️ you live and you learn
@reversetcp
@reversetcp 2 ай бұрын
good to see people moving back to non-serverless stuff
@fullstack_journey
@fullstack_journey 2 ай бұрын
me looking at your bill: I'd be back to eating instant ramen for meals if that happens to me
@thehibbi
@thehibbi 2 ай бұрын
I feel bad for you that somebody out there is eager enough to DDOS you. But this video was very helpful, thanks!
@ultimathule9841
@ultimathule9841 2 ай бұрын
You got ops for real 😂 Would be interesting to know what other options are available within AWS without having to pay 3k per month 😢
@ultimathule9841
@ultimathule9841 2 ай бұрын
Also, how much are you paying for Cloudflare? I see that they have a higher level of protection provided apart from the one in the free tier. Keep us updated if you get ddos again. Not bad for content right? 😂
@faakhirzahid6284
@faakhirzahid6284 2 ай бұрын
waiting for a DDOS hat-trick, 3 consecutive days damn
@blackblather
@blackblather 2 ай бұрын
Dude, in an interview for a SWE the guy asked me if i'd use aws in my starup that im running. I said no cuz its too expensive. He looked at me like im crazy. Then he asked me if i had a lot of users would i switch to aws? I said it depends: users dont mean customers. A lot of users means a lot of requests means a lot of cost. As a founder you have to manage your finances and these interviewers dismissed me for saying what i said. I did work with aws in the past, but the organization was huge with many millions in revenue, not a startup 😅
@jazzdestructor
@jazzdestructor 2 ай бұрын
Hey Bud, Hope you don't get DDOS'd again, feels bad seeing you bill double every video 😅😅, on a side note could you please also do these type of videos on cloud architecture if possible, I do have some base knowledge (EC2, s3, r2 db etc) but would love to learn more. cheers 🍻🍻
@anonAcc575
@anonAcc575 2 ай бұрын
Is that tls stuff necessary? I thought caddy did that automatically
@WebDevCody
@WebDevCody 2 ай бұрын
if you use caddy self signing certs, it's a bit more complicated; you'll have to build caddy using xcaddy with a cloudflare plugin so it can know how to validate your self signed certs against cloudflare using your cloudflare api key. I started looking into all of that and said screw that noise
@emmanuelU17
@emmanuelU17 2 ай бұрын
Out of curiosity, can’t you achieve the same thing with aws api gateway and EC2?
@WebDevCody
@WebDevCody 2 ай бұрын
Same thing, meaning ddos protection or hosting your api?
@emmanuelU17
@emmanuelU17 2 ай бұрын
@@WebDevCody Actually I just thought about it, api gateway, EC2 wouldn’t work against ddos protection but will work with API hosting.
@unl0ck998
@unl0ck998 2 ай бұрын
Well well well
@TecsoSolutions
@TecsoSolutions 2 ай бұрын
Weren't you using Amazon Shield Standard with Cloudfront? It appears to be free and protect against DDOS.
@WebDevCody
@WebDevCody 2 ай бұрын
yeah, but it obviously isn't blocking all the DDOS traffic
@claudeb.3473
@claudeb.3473 2 ай бұрын
Just curious, why didn’t you deploy this NextJS app on Vercel’s free tier?
@JustPlayerDE
@JustPlayerDE 2 ай бұрын
that is the same issue as AWS, just at least 5 times more expensive (free tier is a auto-upgrade if you hit the limits, you still owe money even if no card is linked)
@WebDevCody
@WebDevCody 2 ай бұрын
Vercel free tier license states it can’t be used for commercial apps; my app getting ddos is making money
@iSnakeBuzz
@iSnakeBuzz 2 ай бұрын
I don't see it in the video, so I would assume that you don't apply that. I would recommend you set up your firewall to only accept connections from Cloudflare. In case someone gets the IP address, Cloudflare sometimes leaks the host address...
How To Get Ahead of 99% Of Developers
13:00
Web Dev Cody
Рет қаралды 131 М.
Self Host 101 - Set up and Secure Your Own Server
25:56
Syntax
Рет қаралды 27 М.
КАРМАНЧИК 2 СЕЗОН 5 СЕРИЯ
27:21
Inter Production
Рет қаралды 603 М.
100😭🎉 #thankyou
00:28
はじめしゃちょー(hajime)
Рет қаралды 56 МЛН
В ДЕТСТВЕ СТРОИШЬ ДОМ ПОД СТОЛОМ
00:17
SIDELNIKOVVV
Рет қаралды 2,2 МЛН
Why I'd never host my apps on a VPS
13:43
Web Dev Cody
Рет қаралды 28 М.
AI Hackathon - Cloudflare Workers AI - Getting started
17:06
Cloudflare Workers
Рет қаралды 531
Using docker in unusual ways
12:58
Dreams of Code
Рет қаралды 391 М.
Adding a cache is not as simple as it may seem...
13:29
Dreams of Code
Рет қаралды 103 М.
The First Post-React Framework Just Launched
20:46
Theo - t3․gg
Рет қаралды 100 М.
If I had to host on a single VPS, this is how I'd do it
9:35
Web Dev Cody
Рет қаралды 12 М.
Mobile Devs Hate Servers. Expo Wants To Fix That.
16:05
Theo - t3․gg
Рет қаралды 67 М.
Host your own Vercel
57:58
Syntax
Рет қаралды 4,9 М.
КАРМАНЧИК 2 СЕЗОН 5 СЕРИЯ
27:21
Inter Production
Рет қаралды 603 М.