Full Node.js Deployment to AWS - FREE SSL, NGINX | Node js HTTPS Server
Ғылым және технология
In this video you will learn How To deploy Node js server on AWS ec2 instance Ubuntu 22.04 server with Free SSL certification using NGINX as a reverse proxy :)
📕 Get more of AWS:
AWS Master Course for beginners:
scaleupsaas.dev/aws-master-co...
Join our newsletter:
scaleupsaas.dev/newsletter
GitHub repository for more instructions:
github.com/saasscaleup/nodejs...
============= Video Related Links ============
[00:00] Intro - Node js HTTPS Server demo
[00:33] Tutorial requirements
[01:15] [STEP 1]: Launch EC2 ubuntu 22.04 Server
[04:32] [STEP 2]: SSH to Ubuntu server to install packages
[06:02] [STEP 3]: Update and Upgrade server
[08:22] [STEP 4]: Clone nodejs-ssl-server Repository
[09:58] [STEP 5]: Run Node app.js
[11:22] [STEP 6]: Install pm2
[11:55] [STEP 7]: Running the node js app with pm2
[13:06] [STEP 8]: FREE SSL - Install Nginx web server
[16:22] [STEP 9]: Add Domain in goDaddy.com
[17:29] [STEP 10]: Set FREE SSL Certificate (HTTPS)
============= Support ============
Leave a comment below and I or someone else can help you.
If you Like the tutorial and you want to support my channel so I will keep releasing amazing content that will turn you to a desirable Developer with Amazing Cloud skills... I will really appreciate if you:
Buy me A coffee ❤️ : www.buymeacoffee.com/scaleupsaas
============= Tech stack ============
AWS
AWS EC2
AWS UBUNTU 22.04 SERVER
NODE JS
NPM
NODE PM2
Free SSL / HTTPS
Let's encrypt
#aws #nodejs #freessl
Пікірлер: 175
Your AWS DREAM Course coming Live SOON.... 🚀☁ "Mastering AWS Cloud for Beginner - Learn AWS cloud by Building & Deploying scalable web application using 3 different aws architectures" Now you can: Pre-Register to the course and get 90% DISCOUNT or Get notification once the course is LIVE (Full Price) Here is everything you need to know: scaleupsaas.dev/aws-master-course-for-beginners/
Bro Im really thanks with you, I have been trying to set up everything to implement an API with SSL and domain for a long time, with your tutorial I did it in an hour and a half, I really appreciate what you did.
@ScaleUpSaaS
2 ай бұрын
Thanks for sharing. Appreciated. Please subscribe for more amazing content 🙏
This is EXACTLY what I needed. I had a NodeJS project which I decided to finally upgrade to SSL after about a year of not having it, and doing so was extremely challenging with the scattered resources I ran into online. But you managed to explain everything clearly from start to finish, and I got it working! Thank you!
@ScaleUpSaaS
2 ай бұрын
Thanks for sharing ✌️. Appreciated. Subscribe for more amazing content
Alright. This is the one I was looking for from last 3 days. Thank you so much.
@ScaleUpSaaS
8 ай бұрын
Thanks for sharing. Appreciate. Subscribe for more amazing content.
I have been battling with this issue for 2 days and finally video that solved my issue. Thanks a lot!
@ScaleUpSaaS
5 ай бұрын
Thanks for sharing. Appreciated 😎. Subscribe for more amazing tutorials.
This is how tutorials should be. Straight to the point with awesome explanation. After 2 days of frustration finally i found this and everything works.
@ScaleUpSaaS
9 ай бұрын
Thanks for sharing. Appreciate 🫶. Please subscribe for more amazing tutorials 🪽
My 2 weeks of neck-deep frustration just ended! Thanks so much for this tutorial ❤
@ScaleUpSaaS
Жыл бұрын
Thanks for sharing. Appreciate. Subscribe for more amazing tutorials 🦾
It took me 2 days trying to introduce https to my AWS project but failed. After watched your video, I fixed it successfully. Thanks a lot for helping me!
@ScaleUpSaaS
6 ай бұрын
Thanks for sharing. Please subscribe for more amazing tutorials
Loved it! Worked instantly! Thanks ALOT!
@ScaleUpSaaS
Жыл бұрын
Thanks for sharing. Subscribe for more amazing tutorials
Thank you! Great tutorial, keep them coming
@ScaleUpSaaS
Жыл бұрын
Thanks for sharing. Appreciate ❤️
Thank you man, it really helped me, I hope your channel grows even more.
@ScaleUpSaaS
5 ай бұрын
Thanks for sharing. Appreciated. Subscribe for more amazing tutorials
This tutorial made my day. Thanks a lot ❤
@ScaleUpSaaS
Жыл бұрын
Happy to hear that 😊. Keep follow… next video will be about “how to deploy node js app with GitHub actions”
Thanks Buddy .You're an inspiration. ... Awesome Tutorial❤
@ScaleUpSaaS
Жыл бұрын
Thanks for sharing. Appreciate.
Thank you so much! This tutorial saved my application!
@ScaleUpSaaS
11 ай бұрын
Thanks for sharing. Please subscribe for more amazing tutorials!
Dude you helped me! I was suffering trying a lot of stuff, even seeing the original upadted video from amazon youtube channel haha! But that secret with the nginx was the deal!!! Thank you a lot!!!
@ScaleUpSaaS
3 ай бұрын
Thanks for sharing. Appreciated. Subscribe for more amazing content ❤️
Just what I was looking for, thank you very much! I suscribe
@ScaleUpSaaS
Ай бұрын
Thanks for saying that. Appreciated
This really helped me! Thank you!!:)
@ScaleUpSaaS
4 ай бұрын
Thanks for sharing. Appreciated. Follow for more amazing tutorials
Boom shakalakaka boom thanks haha.. I was thinking of using AWS load balancer to get SSL but I guess if you have domain lying around you might as well get that too :). Got mine up and running now, thanks.
@ScaleUpSaaS
Ай бұрын
Thanks for sharing. Appreciated 🙏🫶
thanks, I'm from Brazil, and I couldn't find anything, thank you for sharing this incredible knowledge
@ScaleUpSaaS
10 ай бұрын
Thanks for sharing. Appreciate. Please subscribe for more amazing tutorials 🫶
It's helped me a lot! Thank you :)
@ScaleUpSaaS
Жыл бұрын
Thanks for sharing. Appreciate 👍
תודה לך זה ממש עזר לי, תותח!
@ScaleUpSaaS
9 ай бұрын
בכיף! תמשיך לעקוב, הולכים להשתחרר סרטונים נוספים בהמשך
Thanks for the tutorial! I really appreciate it!
@ScaleUpSaaS
3 ай бұрын
Thanks for sharing. Appreciate. Subscribe for more amazing content
Wonderful video. I really appreciate. Thanks for your help!
@ScaleUpSaaS
4 ай бұрын
Thanks for sharing. Appreciate. Subscribe for more amazing content 🤠
thanks for making such useful video. loved it.
@ScaleUpSaaS
3 ай бұрын
Thanks for sharing. Appreciate. Subscribe for more amazing content
Thank you! This tutorial is wonderful.
@ScaleUpSaaS
Жыл бұрын
Thanks for sharing. Appreciate 🫶
@ScaleUpSaaS
Жыл бұрын
Subscribe for more amazing tutorials
thank you for this amazing video and amazing explaination , I really can't thank you enough , you are amazing
@ScaleUpSaaS
4 ай бұрын
Thanks for sharing. Appreciated. Subscribe for more amazing tutorials 😎
Wooow really great tutorial
@ScaleUpSaaS
4 ай бұрын
Thanks for sharing. Appreciated! Follow for more amazing tutorials
Thanks you so much, very helpful. It was a bit different with name
@ScaleUpSaaS
Ай бұрын
I'm glad you found it helpful! Thank you for watching!
Thanks so much for this video
@ScaleUpSaaS
6 ай бұрын
Thanks for sharing. Appreciated. Please subscribe for more amazing tutorials 🥰
this helped me a lot! thank you!, now to figure out why the ci/cd issue is still happening
@ScaleUpSaaS
Жыл бұрын
Thanks for sharing. Appreciated 🫶 Let me know how I can help. And subscribe to get notified when new tutorials are released
you are a lifesaver thank so much!!! ❤
@ScaleUpSaaS
Жыл бұрын
Thanks for sharing ! Appreciate. ❤️🫶
@ScaleUpSaaS
Жыл бұрын
Keep follow for more amazing tutorials
Thank you so much I am from Vietnam
@ScaleUpSaaS
Жыл бұрын
Peace and love mate ❤️ Thanks for sharing!
thanks man
@ScaleUpSaaS
6 ай бұрын
Thanks for sharing. Appreciate. Please subscribe for more amazing tutorials 👏
Thanks you really helpful
@ScaleUpSaaS
3 ай бұрын
Thanks for sharing. Subscribe for more amazing content
Thank you! Saved me hours
@ScaleUpSaaS
Ай бұрын
Thanks for sharing. If you like the video you totally should check our AWS master course for beginners…
@thetechbrojoe
Ай бұрын
@@ScaleUpSaaS I would, definitely. I’ve been looking for good course for developers.
Thank you so so much bro, you earned the subscribe and github star
@ScaleUpSaaS
5 ай бұрын
Thanks for sharing my friend. Appreciated 👏👏👏
Thx soo much sir this video is very helpful to me and it's 100%working.
@ScaleUpSaaS
7 ай бұрын
Happy to help. follow for more amazing tutorial
King thank you!
@ScaleUpSaaS
7 ай бұрын
Thanks for sharing. Appreciate. Please subscribe for more amazing tutorials ❤️
amazing!!!
@ScaleUpSaaS
8 ай бұрын
Thanks for sharing. Please subscribe for more amazing tutorials 🙏
Legend
@ScaleUpSaaS
9 ай бұрын
Thanks for sharing. Please subscribe for more amazing content 😎
man i love you
@ScaleUpSaaS
8 ай бұрын
I love you too ❤️ Feel free to support our channel: buymeacoffee.com/scaleupsaas
Thanks alot
@ScaleUpSaaS
Жыл бұрын
Thanks for sharing. Keep follow for more amazing tutorials that will be release soon 🤓
nice :)
@ScaleUpSaaS
5 ай бұрын
Thanks for sharing 🙌
Thanks! 🙂
@ScaleUpSaaS
10 ай бұрын
Thanks for sharing. Please subscribe for more amazing tutorials 💪
very good video
@ScaleUpSaaS
4 ай бұрын
Thanks for sharing. Appreciate. Subscribe for more amazing content ✅
good one
@ScaleUpSaaS
2 ай бұрын
Thanks for sharing. Appreciate. Subscribe for more amazing content 🫶
best of the best 🔥🔥🔥🔥
@ScaleUpSaaS
10 ай бұрын
Thanks for sharing. Appreciate. Please follow for more amazing tutorials
@elshod_tv
10 ай бұрын
@@ScaleUpSaaS ok bro
@ScaleUpSaaS
10 ай бұрын
Appreciate!
Gem
@ScaleUpSaaS
Жыл бұрын
Thanks for sharing. Appreciate 🤘
awesome
@ScaleUpSaaS
8 ай бұрын
Thanks for sharing. Please subscribe for more amazing content 😎
Very well done tutorial! Would you recommend adding nginx to pm2 as well as node? Maybe the only thing I thought could be missing but even then I'm not 100% sure.
@ScaleUpSaaS
7 ай бұрын
Thanks for sharing. Not need to add nginx to pm2 because it's already managed by the kernel(Linux) system. Please subscribe for more amazing tutorials
@bobselight
7 ай бұрын
@@ScaleUpSaaS makes sense, thanks! Subscribed 😁
@ScaleUpSaaS
7 ай бұрын
@@bobselight
Hello i am getting cors error even though i have enabled it in my express server. Do i need to set cors headers in nginx config as well?
@ScaleUpSaaS
3 ай бұрын
You need to make sure you sending the request from the same domain or allow CORS for your domain. Share you setting please
Hey, man, how long does it generally take for the DNS record to start working?
@ScaleUpSaaS
Ай бұрын
Between 1 minute to 24 hours.
I followed the exact steps, it works fine with get requests but not with post ones, Note: my requests are being sent from another domain that is hosted somewhere else, is there an extra step to go through? this is the error I am getting: Failed to load resource: net::ERR_NAME_NOT_RESOLVED, thank you for answering
@ScaleUpSaaS
3 ай бұрын
Thanks for sharing. I guess that you are encounter with CORS issue. You need to add CORS function to your Node.js backend part that allows your second domain.
סרטון מוצלח!! תודה! שאלה - אם אני רוצה לדחוף עדכונים לקוד דרך ssh, איך לעשות ריסטרט לפרוסס של node?
@ScaleUpSaaS
7 ай бұрын
אתה יכול לעשות הכל אוטומטי עם גיטהאב תצפה בזה kzread.info/dash/bejne/d4l9t5SAnpPMiLQ.html
hey how can i set up the domain on GoDaddy can you help me please.
@ScaleUpSaaS
Жыл бұрын
Thanks for sharing. Please subscribe for more amazing tutorials. Do you want a zoom call with me?
After install certbot and request for certificate, my aplication start a infinite loop and crash browser with error 301.
@ScaleUpSaaS
Жыл бұрын
Thanks for sharing. I checked again everything. Everything worked perfectly. Please try again from the beginning. Make sure you are not missing any step. Also, please subscribe for more amazing tutorials
Amazing video! You are a life saver #ihsan
@ScaleUpSaaS
9 ай бұрын
Thanks for sharing. Please Subscribe for more amazing tutorial!
It works fine on my ip in browser but when I close the terminal the server an the website stop working. How to fix it?
@ScaleUpSaaS
Жыл бұрын
Did you follow all steps? You need to use PM2 so it will run In the background :)
@muskangupta1977
Жыл бұрын
@@ScaleUpSaaS It still doesn't work.
@ScaleUpSaaS
Жыл бұрын
@@muskangupta1977 book a consolation call with. You can find the link in the about me section :)
@muskangupta1977
Жыл бұрын
@@ScaleUpSaaS do i need to use nginxas well?
@ScaleUpSaaS
Жыл бұрын
@@muskangupta1977 Yes. Please follow the full instructions!!! :) The tutorial is working. I checked ti few times!
This is EC2, how is this cheaper than App Runner? Isn't EC2 fixed price?
@ScaleUpSaaS
2 ай бұрын
Thanks for sharing. AWS have free tier for the first year. So you can get EC2 server for free (specific instance type) for the first 12 months
This is awesome. But I need help, Im using node.js as my backend and react js as my frontend. How am I going to connect my frontend to backend if its already accesible? I've been tring to deploy this full stack app for a month now huhu.
@ScaleUpSaaS
6 ай бұрын
Thanks for sharing. It's very simple. You can upload your React git repository to aws amplify. You can watch this video(kzread.info/dash/bejne/eYFkpbOgf6fRpdY.html) that we did that will explain you how to do it. And then. you just need to send request from your react app to the node.js server. You can also host your react app on aws s3 bucket with static hosting. Let us know if you have more questions. Please subscribe for more amazing tutorials :)
@v54potato38
6 ай бұрын
@@ScaleUpSaaS Thankyou it's really working finally. Ive been trying to deploy my backend for 2 months to be exact🥴, Thankyou for your help! 💚
@ScaleUpSaaS
6 ай бұрын
You are more than welcome my friend 😊. You can also check our AWS master course for beginners , if you are looking for more technical experience.
@pavanmarapalli5661
6 ай бұрын
same requirement. did you tackle this ?
@ScaleUpSaaS
6 ай бұрын
It's very simple. You can upload your React git repository to aws amplify. You can watch this video(kzread.info/dash/bejne/eYFkpbOgf6fRpdY.html) that we did that will explain you how to do it. And then. you just need to send request from your react app to the node.js server. You can also host your react app on aws s3 bucket with static hosting. Let us know if you have more questions. Please subscribe for more amazing tutorials :)
well it was working for me after i changed to a subdomain and installed certbot on a subdomain stopped working
@ScaleUpSaaS
Жыл бұрын
Thanks for sharing. Just start from the beginning. It’s need to work perfectly. I checked that many time with many domains and subdomains.
@Raezon_
Жыл бұрын
@@ScaleUpSaaS i will try again may i ask you I've witness port 443 is not running
@Raezon_
Жыл бұрын
@@ScaleUpSaaS is not that the problem
@Raezon_
Жыл бұрын
@@ScaleUpSaaS i did everything again and still not working with subdomain
@ScaleUpSaaS
Жыл бұрын
Can you share with me the error that you are getting? Are you trying with ubuntu 22 and you follow step by step my instructions?
I did everythig eccordingly but at 11:05 it the ip doesn't work
@ScaleUpSaaS
Жыл бұрын
Thanks for sharing. Did you open port 3000 in AWS security group?
@muskangupta1977
Жыл бұрын
@@ScaleUpSaaS Yes. I did port 5000 as my port is running on 5000.
@ScaleUpSaaS
Жыл бұрын
@@muskangupta1977 what is the error you are getting?
im getting trouble at the NGINX step , my service is running with pm2. But after install NGINX and verifying it is running, I cant get to the default NGINX web page
@ScaleUpSaaS
8 ай бұрын
Thanks for sharing. You probably miss one of the steps. Please try again. It will work for you for sure. I double checked that. Please subscribe for more amazing tutorials
@El_Remolino19
8 ай бұрын
@@ScaleUpSaaS on step 8, are you not demonstrating that the proxy is already set up before adding the location { proxy } information into the /etc/nginx/sites-available/default directory? And should this be my aws ip address for the server i am trying to certify?
@ScaleUpSaaS
8 ай бұрын
On step 8 - it need to be a domain address so you will be able to install the free ssl. You can also add Ip instead. but you wont be able to do free ssl i think. for the first part of your question - can you explain again please? I didn't understand @@El_Remolino19
@El_Remolino19
8 ай бұрын
@@ScaleUpSaaS I got everything to work but the default page for nginx never worked, weird. But everything is working now, my first website just went live
@ScaleUpSaaS
8 ай бұрын
So Happy to hear that 🥳 You got this!
After edited the nginx default file i got 404 error in 80 port but 3000 port is working fine
@ScaleUpSaaS
Жыл бұрын
Thanks for sharing. Happy it’s working for you too ❤️🔥 Pleased subscribe for more amazing tutorials that will be released soon 🔜🙏
@bu_fahad
10 ай бұрын
Hi. Did you find a solution for this?
@bu_fahad
10 ай бұрын
anyone is looking to this. the third line in the location block need be commented out.
@ScaleUpSaaS
10 ай бұрын
Let me know if you need help@@bu_fahad
If i pushed a new code to github, will it reflect the changes or we need to do this all over again? thank you!
@ScaleUpSaaS
8 ай бұрын
Thanks for sharing. Appreciated. Subscribe for more amazing content. Regarding your question , No. but you can follow this next tutorial so it will be YES 😎: GitHub Actions Automate Node.js Deployment to AWS | GitHub Actions Tutorial kzread.info/dash/bejne/d4l9t5SAnpPMiLQ.html
This is really useful, but I am encountering an issue where I am adding A record into Vercel, instead of Godaddy as a subdomain (api.domain.dev). However, adding the record and pointing it into the elastic IP, when I access (api.domain.dev), the connection timed out instead of returning the response under the "/" end point which should be just a JSON of {"message":"Request Successful","data":null}. Is there anyone that can help me with this? TIA!!
@ScaleUpSaaS
2 ай бұрын
Thanks for sharing. Did you open the port in your firewall? Or security group?