Most of my short career has been spent working on PHP and WordPress projects so I’ve had a lot of experience setting up server environments for those, but it’s really great seeing how this process can work for a Next.js project, which is pretty much synonymous with Vercel. Good to see I’m not completely stuck on vercel just because I wanted to use next.js. Great and instructive video.
Thank you so so much for this video! This is the explanation of the missing link in the chain. As a self-educator I was desperately searching for exactly this.
A video on how to setup auto deployment on a custom server would be awesome. So our app gets build on the server automatically with the latest changes to branch x on git.
That was absolutely brilliant! Thank you so much. I would love to see a video about adding an ssl certificate and adding a domain to the site. Thank you again!
Sonny! You're raising the top level of education available to us Your videos are enlightening to us and providing new knowledge thanks bro🙂 my English is not Soo good but I hope you under stand
Thank you for such great content. That's exactly the alternative I was looking for. Oh and by the way, totally unrelated... but that fade hair cut is sick!!
Thank you for this video! I would like you to explain more about deploy. This topic is quite tricky for a not backender. Perhaps making a clone of functionality of vercel (connecting git to server) on this channel can collect a million of likes
It would be awesome if you Sonny can make a small guide of managing Nodejs apps (like Nextjs) in a VPS (like hostinger's). Cause sometimes it's really hard to find some relevant information like yours, thanks a lot.
I don't write comments at videos at all, but this one is such a good video with grained explanation and showcase. Thank you very much!!! (And doc btw is very useful)
As a complete beginner to hosting, how safe is this? Like would I be able to create a nextjs app that i know is safe if i was to host it on vercel and be able to host it on a vps or do i need to take extra security measures? and is the process the same on other hosting websites that let you create a vps?
Thanks Sonny like everyone else I was able to follow your instructions and get my VPS setup so this has been a super helpful video. The issue is that in reality we would never follow this process of setting up a new NextJS app on our server, it's almost always going to be setup and built out locally and then when it's ready to be deployed we need to push it to a server. Pretty please can you explain how we would integrate our Github repo so that we can auto deploy to our hostinger VPS 🙏
Hey man! I really enjoyed your videos. I'm currently looking into implementing multi-tenancy (wildcard subdomains). I've read the Vercel documentation and cloned Steves Tey's platform starter kit, but I'm still having trouble understanding the concepts. Would you be able to create a video on this topic that is more beginner-friendly? I'm particularly interested in learning how to use the new Next.js app route feature.
Been waiting for these.. Had been deploying my apps to a vps but wanted someone to share latest standards on how to do it esp auto deploys with web hooks or something
Thanks so much, this video taught me all I needed to know and got everything working on my side. But a quick question, how can you replicate this process for two or more apps that you want to be running on same VPS server. Also how does the server understands from the client's request which repository location that needs to be rendered
Hey Sonny, thanks for the tutorial, very neat and easy to follow! Do you mind sharing what screen recorder software you use? Trying making a few videos for workplace and almost none of them work for me when I'm trying to embed my webcam inside the video in real-time! Thanks
I have a question when I do VPS do I lose the functionality of features such as middleware and API routes? Its kinda of a dumb question seeing as you are using app router. Its just that I may need to do this exact thing to host a PWA Next.js 13 app that Im doing. Great video, you gave me a solution!
15:21 I get an error when installing npm: "... have unmet dependencied:" ... "Unable to correct problems, you have held broken packages." Did I miss any step?
This is so beautiful. What if there is an error and I don't want users to see it yet until it's fixed, how do I do that since I'm working directly to the project folder from my remote vscode?
In Vercel dashboard you can connect your GitHub in the integrations panel, once you do this pushing to master/main can trigger a deployment! Hope this helps!!
This is awesome to deploy to custom server, lots of nextjs devs are searching for ... But a Major question here. Will app router middlewares and api route in nextjs work with this way????? Thanks
Hello, I bought a virtual server with 3 cores and 2GB of RAM, and I uploaded a very simple Next project to it. Inside this project, I installed the libraries `react-icon`, `react-toastify`, `next-auth`, and `tailwind`. Then, when I tried to build the project on the server, it me an error about unsupported CPU and said it couldn't do it. I want to know, is Next.js really that heavy that it can't even build a medium or small-scale project on such a server? Can you guide me and tell me if using Docker would make a? Please explain.
There is no way to generate a statci/dist/out folder with all the javascript/css/html and upload this folder in the vps instead of upload the whole app . i mean like we do using vite ??
Is it possible to integrate this flow with github? E.g. to have production app on main branch and staging app on develop branch? And when branch is updated then app on the servee also updates?
Thank you so much for this guide, it was very helpful! Do you mind if I create my own guide on how to deploy Next.js app to Google Cloud VM on free tier using the knowledge that I got from this video? I think it will be beneficial for the dev community 🙂
after deploying next.js e.commerce plateform in hostinger, does it have bills to pay like vercel, cause i've watched a lot of people complaining about the hight bills to pay in vercel and now i'm afraid that this happens too in hostinger, so can anyone lead me to what is the best buisness plan to choose and what are the do's and dont's that i must to have in mind ????
Great video, but I have a couple questions I'm hoping someone can help me out with. 1.) How do you deploy a Nextjs project that I've created that is on my desktop or on GitHub? Sonny only shows how to upload a newly created project. 2.) I followed Sonny's example and it worked perfectly. However, where is the project stored? I cannot find it using the CloudPanel GUI. It is not located under the "Sites" tab, so I'm not sure where I could go to access it. Thank you to anyone that is able to help me. I really appreciate it.
is this only possible by paying? I got a hostinger domain and hosting because youtubers told me to, while i was building nextjs apps, and then i pay for it and find out i can't host nextjs apps, and i have to pay for a vps now? super frustrated. is there a free option?
Finally someone cares about it
As a senior software engineer, I know all of these, yet still watched and enjoyed every second of it, kudos to you 🥳
Hi, Can I know where to store the env variables. I am stuck there. please hepl
@@wazirshehryarali4375 hi! i located environmets in file .env.production and its works, but i don't know is it correct :)
@@wazirshehryarali4375i think set it up in your project directory?
This is literal gold. I didn't find such comprehensive guide any where else.
Most of my short career has been spent working on PHP and WordPress projects so I’ve had a lot of experience setting up server environments for those, but it’s really great seeing how this process can work for a Next.js project, which is pretty much synonymous with Vercel.
Good to see I’m not completely stuck on vercel just because I wanted to use next.js.
Great and instructive video.
But what if we want to host both the next.js site and the php (mysql) site on the same server?
This tutorial video is GOLD! Thanks a lot!
Thank you so so much for this video! This is the explanation of the missing link in the chain. As a self-educator I was desperately searching for exactly this.
Im so glad it could help!
Thanks Sunny !
The pdf you've given in the description really helps.
Im glad it could help!
A video on how to setup auto deployment on a custom server would be awesome. So our app gets build on the server automatically with the latest changes to branch x on git.
+1
+1
+1
+1
Coolify?
Excellent demonstration! This has cleared up so much for me. Thank!!
That was absolutely brilliant! Thank you so much. I would love to see a video about adding an ssl certificate and adding a domain to the site. Thank you again!
Sonny! You're raising the top level of education available to us Your videos are enlightening to us and providing new knowledge thanks bro🙂 my English is not Soo good but I hope you under stand
Wow. This video is sooo helpful. I covered all information i want to know. Thank you!
Thank you for such great content. That's exactly the alternative I was looking for. Oh and by the way, totally unrelated... but that fade hair cut is sick!!
Iv been waiting for this for sooo long
I just deployed my nextjs app in shared hosting. Just took 5 mins. App running smoothly.
Awesome video, specially the last part where you actually runs in localhost, this will make my work A LOT faster! Huge thanks
Thank you so much. I was dealing with the issue of hosting my website on VPS. Now I can easily do that.
It was very helpful for me. Big Like!
Thank you very much brother. This video really helped me alot.
Thank you for this video! I would like you to explain more about deploy. This topic is quite tricky for a not backender. Perhaps making a clone of functionality of vercel (connecting git to server) on this channel can collect a million of likes
It would be awesome if you Sonny can make a small guide of managing Nodejs apps (like Nextjs) in a VPS (like hostinger's). Cause sometimes it's really hard to find some relevant information like yours, thanks a lot.
I don't write comments at videos at all, but this one is such a good video with grained explanation and showcase. Thank you very much!!! (And doc btw is very useful)
Thank you so much!!!
As a complete beginner to hosting, how safe is this? Like would I be able to create a nextjs app that i know is safe if i was to host it on vercel and be able to host it on a vps or do i need to take extra security measures? and is the process the same on other hosting websites that let you create a vps?
wow thumbs up for sure.. well deserved! (and subscribed!)
The Best #papareact 🔥🔥🔥
Thanks man!
It was very helpful!
Thanks Sonny like everyone else I was able to follow your instructions and get my VPS setup so this has been a super helpful video. The issue is that in reality we would never follow this process of setting up a new NextJS app on our server, it's almost always going to be setup and built out locally and then when it's ready to be deployed we need to push it to a server. Pretty please can you explain how we would integrate our Github repo so that we can auto deploy to our hostinger VPS 🙏
Hi broo..Enjoyed and totally loved it❤
Please bring SSL certification video
Hey Sonny, you are the one who taught me ReactJs, which opened up the path for my career and startup. Wish you all the best.
Hey man! I really enjoyed your videos. I'm currently looking into implementing multi-tenancy (wildcard subdomains). I've read the Vercel documentation and cloned Steves Tey's platform starter kit, but I'm still having trouble understanding the concepts. Would you be able to create a video on this topic that is more beginner-friendly? I'm particularly interested in learning how to use the new Next.js app route feature.
Cool from an old grand daddy : i love your Channel.😊
2 words => Merci Sonny ! 😎
Thanks for the bonus with remote - ssh . It’s really awesome
Amazing, Thank you
Been waiting for these.. Had been deploying my apps to a vps but wanted someone to share latest standards on how to do it esp auto deploys with web hooks or something
Wow. Why does such an amazing video have just this many likes?
We will grow don’t worry 🙏🏽 thank you so much for the support!!
it cold, thank you so much sonny, i have one question how if i want to deploy two project in one vps?
this is God sent
Thanks you Sonny ! Please make more videos like this !
How can i do if i want to publish more than one site using next ??
Very beginner friendly guide. Please do the SSL setup video!
Super content. Thanks !
Thanks so much, this video taught me all I needed to know and got everything working on my side. But a quick question, how can you replicate this process for two or more apps that you want to be running on same VPS server. Also how does the server understands from the client's request which repository location that needs to be rendered
Very useful. Subbed.
As a Sr. frontend developer, I already have the above but still enjoyed watching on 2x speed 😅, also it will be great to make the ssh for it too
❤ u got your self a new sub with a bench of likes , thank you bro
Hey Sonny, thanks for the tutorial, very neat and easy to follow!
Do you mind sharing what screen recorder software you use? Trying making a few videos for workplace and almost none of them work for me when I'm trying to embed my webcam inside the video in real-time!
Thanks
Thanks for this video. I want a video for ssl conf. Thanks in advance 🤜
Very much appreciated.
Thank you so much!
If I understand you right, you forwarded all requests for your web app to the node server, including requests for images, css etc.?
I have a question when I do VPS do I lose the functionality of features such as middleware and API routes? Its kinda of a dumb question seeing as you are using app router. Its just that I may need to do this exact thing to host a PWA Next.js 13 app that Im doing. Great video, you gave me a solution!
Hi Sonny! I was wondering if you have any advice about setting up an SSL Certificate in a VPS environment?
is there any benefit of using vps over vercel?
GOOD JOB!
Hey, Can you please tell me where can I store my env variables in this?
Fyi, NGINX is pronounced like "engine x".
Is cloudpanel required? or just ubuntu OS is good enough to start with?
Great! how can you use Deferent node version my various app?
The sharpest eye brows in software engineering
Haha I love this!
Can we deploy Strapi cms project in Hostinger VPS server??
15:21 I get an error when installing npm: "... have unmet dependencied:" ... "Unable to correct problems, you have held broken packages." Did I miss any step?
Can we do it in simple website hosting plan?
How can i connect my custom domain to deployed next.js app to specific IPAddress ?
Would love to see a self-hosted github runner + monorepo project
Big love sony sir ❤❤
This is gold bruh gold👏🏾 goin make shmoneyyy with this
Glad you liked it!
why does no one tell you about the minimum vps configuration and the recommended one. how do I figure out how powerful a vps I need for next js?
dyanamic route is not working.. Its chunk throws 404. Could you help me to resolve that
Any resources on maintaining serverless api inside VPS?
This is so beautiful. What if there is an error and I don't want users to see it yet until it's fixed, how do I do that since I'm working directly to the project folder from my remote vscode?
Awesome, how do you do this but have it auto deploy from github? same setup, just auto deploy?
In Vercel dashboard you can connect your GitHub in the integrations panel, once you do this pushing to master/main can trigger a deployment! Hope this helps!!
@@SonnySangha I mean the VPS, not Vercel
But what if we want to host both the next.js site and the php (mysql) site on the same server?
This is awesome to deploy to custom server, lots of nextjs devs are searching for ...
But a Major question here.
Will app router middlewares and api route in nextjs work with this way?????
Thanks
wow! its tremendes and exellent job :) thanks a lot for this tutorial
Hello, my backend is PHP. Can I install PHP on Ngix? Can you make a video on how a Next.js app would work with PHP?
warp is not available for windows, please, recommend any other terminal for this setup
Engine X*
Not gonna lie, I LOLed.
Let's do it.
production build?
works with cyberpanel?
Hello, I bought a virtual server with 3 cores and 2GB of RAM, and I uploaded a very simple Next project to it. Inside this project, I installed the libraries `react-icon`, `react-toastify`, `next-auth`, and `tailwind`. Then, when I tried to build the project on the server, it me an error about unsupported CPU and said it couldn't do it. I want to know, is Next.js really that heavy that it can't even build a medium or small-scale project on such a server? Can you guide me and tell me if using Docker would make a? Please explain.
I hope you will create tutorial how to do the same with docker images and github repo
thanks bro
This seems quite complicated, can't I just host the app on my own hosting where I put my regular web pages?
Can I use putty on windows 10 to connect with server.
Sir ck you create videk for use ssl on this video?
I have purchased kvm2 hosting.
and complete initial setups.
how can i upload my nextjs project now. i want to deploy via github.
There is no way to generate a statci/dist/out folder with all the javascript/css/html and upload this folder in the vps instead of upload the whole app . i mean like we do using vite ??
Is it possible to integrate this flow with github? E.g. to have production app on main branch and staging app on develop branch? And when branch is updated then app on the servee also updates?
Need your guide on ssh for this one ❤
Thank you so much for this guide, it was very helpful!
Do you mind if I create my own guide on how to deploy Next.js app to Google Cloud VM on free tier using the knowledge that I got from this video? I think it will be beneficial for the dev community 🙂
bro thanks you
after deploying next.js e.commerce plateform in hostinger, does it have bills to pay like vercel, cause i've watched a lot of people complaining about the hight bills to pay in vercel and now i'm afraid that this happens too in hostinger, so can anyone lead me to what is the best buisness plan to choose and what are the do's and dont's that i must to have in mind ????
Thanks a lot. Please teach us load balancing and ssl and dns
Great video, but I have a couple questions I'm hoping someone can help me out with.
1.) How do you deploy a Nextjs project that I've created that is on my desktop or on GitHub? Sonny only shows how to upload a newly created project.
2.) I followed Sonny's example and it worked perfectly. However, where is the project stored? I cannot find it using the CloudPanel GUI. It is not located under the "Sites" tab, so I'm not sure where I could go to access it.
Thank you to anyone that is able to help me. I really appreciate it.
Host-inger❌
Hos-tinger✅
Sunny it's showing an Error called /etc/nginx/sites-available/nextjs.conf : No such file or directory
Hi, I had the same issue just reinstall Nginx by using those command lines:
sudo apt-get remove --purge nginx nginx-common
sudo apt-get install nginx
How do I add images in the public folder of the app? Can anyone help me on this please.
is this only possible by paying? I got a hostinger domain and hosting because youtubers told me to, while i was building nextjs apps, and then i pay for it and find out i can't host nextjs apps, and i have to pay for a vps now? super frustrated. is there a free option?
can you deploy a nodejs server on it as well?