How to Deploy a Next.js app to a Custom Server - NOT Vercel! (Full Beginner Tutorial)

  Рет қаралды 81,739

Sonny Sangha

Sonny Sangha

Күн бұрын

Пікірлер: 167
@biLLie_wiLLie
@biLLie_wiLLie Жыл бұрын
Finally someone cares about it
@nodirbeksharipov458
@nodirbeksharipov458 Жыл бұрын
As a senior software engineer, I know all of these, yet still watched and enjoyed every second of it, kudos to you 🥳
@wazirshehryarali4375
@wazirshehryarali4375 6 ай бұрын
Hi, Can I know where to store the env variables. I am stuck there. please hepl
@milencja3094
@milencja3094 4 ай бұрын
@@wazirshehryarali4375 hi! i located environmets in file .env.production and its works, but i don't know is it correct :)
@harsha.2186
@harsha.2186 2 ай бұрын
@@wazirshehryarali4375i think set it up in your project directory?
@divyanshutripathy3484
@divyanshutripathy3484 5 ай бұрын
This is literal gold. I didn't find such comprehensive guide any where else.
@LoadOfJak
@LoadOfJak 9 ай бұрын
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.
@gfb47
@gfb47 6 ай бұрын
But what if we want to host both the next.js site and the php (mysql) site on the same server?
@videoponder4673
@videoponder4673 Жыл бұрын
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.
@SonnySangha
@SonnySangha Жыл бұрын
Im so glad it could help!
@crysis992
@crysis992 Жыл бұрын
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.
@pushkarkathayat7893
@pushkarkathayat7893 Жыл бұрын
+1
@victoriousinsight
@victoriousinsight Жыл бұрын
+1
@ishrathinaam6723
@ishrathinaam6723 Жыл бұрын
+1
@hanserlabber4164
@hanserlabber4164 Жыл бұрын
+1
@vali69
@vali69 6 ай бұрын
Coolify?
@semerset
@semerset Жыл бұрын
This tutorial video is GOLD! Thanks a lot!
@webwisesagar
@webwisesagar Жыл бұрын
Thanks Sunny ! The pdf you've given in the description really helps.
@SonnySangha
@SonnySangha Жыл бұрын
Im glad it could help!
@judoScott
@judoScott Ай бұрын
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!
@ewwitsantonio
@ewwitsantonio 9 ай бұрын
Excellent demonstration! This has cleared up so much for me. Thank!!
@christopheradolphe
@christopheradolphe 10 ай бұрын
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!!
@sujjee
@sujjee Жыл бұрын
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.
@nicko9958
@nicko9958 7 ай бұрын
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?
@lucaskrieck1877
@lucaskrieck1877 10 ай бұрын
Awesome video, specially the last part where you actually runs in localhost, this will make my work A LOT faster! Huge thanks
@krisztiankaposi8054
@krisztiankaposi8054 Жыл бұрын
Iv been waiting for this for sooo long
@arthur6892
@arthur6892 Жыл бұрын
Wow. This video is sooo helpful. I covered all information i want to know. Thank you!
@hadi_2122
@hadi_2122 Жыл бұрын
Thank you so much. I was dealing with the issue of hosting my website on VPS. Now I can easily do that.
@Saad_sahib
@Saad_sahib Жыл бұрын
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
@maneshwam
@maneshwam 4 ай бұрын
I just deployed my nextjs app in shared hosting. Just took 5 mins. App running smoothly.
@omarezeldin4620
@omarezeldin4620 Жыл бұрын
The Best #papareact 🔥🔥🔥
@farshidk49
@farshidk49 Жыл бұрын
It was very helpful for me. Big Like!
@zyaaco9964
@zyaaco9964 Жыл бұрын
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?
@DanielPenaloza-fj8yo
@DanielPenaloza-fj8yo Жыл бұрын
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.
@shamiul_islam
@shamiul_islam Жыл бұрын
Thanks man! It was very helpful!
@tair2347
@tair2347 9 ай бұрын
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)
@SonnySangha
@SonnySangha 9 ай бұрын
Thank you so much!!!
@murraywilliams-wd
@murraywilliams-wd 7 ай бұрын
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 🙏
@taiacolaitiniyara
@taiacolaitiniyara Жыл бұрын
Thank you very much brother. This video really helped me alot.
@ZadSoleimaninia
@ZadSoleimaninia 11 ай бұрын
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
@bimaturity362
@bimaturity362 5 ай бұрын
wow thumbs up for sure.. well deserved! (and subscribed!)
@sharurocky8379
@sharurocky8379 Жыл бұрын
Hi broo..Enjoyed and totally loved it❤ Please bring SSL certification video
@inzendis
@inzendis Жыл бұрын
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!
@bartmercier5436
@bartmercier5436 Жыл бұрын
Cool from an old grand daddy : i love your Channel.😊
@enitan2002
@enitan2002 5 ай бұрын
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
@marvikfr
@marvikfr Жыл бұрын
2 words => Merci Sonny ! 😎
@ehsanparastegari2003
@ehsanparastegari2003 Жыл бұрын
Amazing, Thank you
@chuchant7928
@chuchant7928 7 ай бұрын
Is cloudpanel required? or just ubuntu OS is good enough to start with?
@gelarrahadianfajar799
@gelarrahadianfajar799 4 ай бұрын
it cold, thank you so much sonny, i have one question how if i want to deploy two project in one vps?
@ariyoujahan9662
@ariyoujahan9662 Жыл бұрын
Wow. Why does such an amazing video have just this many likes?
@SonnySangha
@SonnySangha Жыл бұрын
We will grow don’t worry 🙏🏽 thank you so much for the support!!
@crescenttv5918
@crescenttv5918 5 ай бұрын
is there any benefit of using vps over vercel?
@thomasawounfouet7395
@thomasawounfouet7395 8 ай бұрын
Thanks for the bonus with remote - ssh . It’s really awesome
@Sietches
@Sietches Жыл бұрын
Very beginner friendly guide. Please do the SSL setup video!
@Kawaiimusician
@Kawaiimusician 8 ай бұрын
Hi Sonny! I was wondering if you have any advice about setting up an SSL Certificate in a VPS environment?
@braddockbrawler
@braddockbrawler Жыл бұрын
Very useful. Subbed.
@tinotendajoe5852
@tinotendajoe5852 Жыл бұрын
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
@bozzhik
@bozzhik 2 ай бұрын
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?
@wazirshehryarali4375
@wazirshehryarali4375 6 ай бұрын
Hey, Can you please tell me where can I store my env variables in this?
@skphotographyediting8983
@skphotographyediting8983 11 ай бұрын
Sunny it's showing an Error called /etc/nginx/sites-available/nextjs.conf : No such file or directory
@UnfairDz
@UnfairDz 2 ай бұрын
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
@martin_kuchar
@martin_kuchar Жыл бұрын
If I understand you right, you forwarded all requests for your web app to the node server, including requests for images, css etc.?
@ekchills6948
@ekchills6948 6 ай бұрын
this is God sent
@protonys
@protonys Жыл бұрын
Super content. Thanks !
@noobboiii007
@noobboiii007 3 ай бұрын
Can we deploy Strapi cms project in Hostinger VPS server??
@gfb47
@gfb47 6 ай бұрын
But what if we want to host both the next.js site and the php (mysql) site on the same server?
@jhmcodedev
@jhmcodedev Жыл бұрын
Thanks you Sonny ! Please make more videos like this ! How can i do if i want to publish more than one site using next ??
@mahianahmed3178
@mahianahmed3178 Жыл бұрын
Any resources on maintaining serverless api inside VPS?
@hamzaakhun
@hamzaakhun Жыл бұрын
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
@victorc.chikezie
@victorc.chikezie Жыл бұрын
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?
@TusharRedlioDesigns
@TusharRedlioDesigns 7 ай бұрын
How can i connect my custom domain to deployed next.js app to specific IPAddress ?
@codedusting
@codedusting Жыл бұрын
Can we do it in simple website hosting plan?
@biLLie_wiLLie
@biLLie_wiLLie Жыл бұрын
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
@DeepakMishra-cz7fj
@DeepakMishra-cz7fj 2 ай бұрын
dyanamic route is not working.. Its chunk throws 404. Could you help me to resolve that
@Saldymedis
@Saldymedis 5 ай бұрын
Thank you so much!
@ashleyrudland
@ashleyrudland Жыл бұрын
Awesome, how do you do this but have it auto deploy from github? same setup, just auto deploy?
@SonnySangha
@SonnySangha Жыл бұрын
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!!
@ashleyrudland
@ashleyrudland Жыл бұрын
@@SonnySangha I mean the VPS, not Vercel
@manuelb9122
@manuelb9122 Жыл бұрын
Thanks for this video. I want a video for ssl conf. Thanks in advance 🤜
@Onepiece_legends
@Onepiece_legends Жыл бұрын
❤ u got your self a new sub with a bench of likes , thank you bro
@jhmcodedev
@jhmcodedev Жыл бұрын
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 ??
@ONEOTPOfficial
@ONEOTPOfficial 9 ай бұрын
production build?
@Ga2-20
@Ga2-20 Жыл бұрын
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?
@programmersohel
@programmersohel Жыл бұрын
Great! how can you use Deferent node version my various app?
@muhammadtahir-f6n
@muhammadtahir-f6n Жыл бұрын
warp is not available for windows, please, recommend any other terminal for this setup
@vinniv6806
@vinniv6806 11 ай бұрын
I hope you will create tutorial how to do the same with docker images and github repo
@369-davian
@369-davian 8 ай бұрын
GOOD JOB!
@andrew007s
@andrew007s 10 ай бұрын
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?
@kasmiraw
@kasmiraw Жыл бұрын
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.
@Finn51531
@Finn51531 Жыл бұрын
Very much appreciated.
@tauqeerhusain7521
@tauqeerhusain7521 Жыл бұрын
Big love sony sir ❤❤
@rezakhani8627
@rezakhani8627 11 ай бұрын
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.
@harisahmad9323
@harisahmad9323 Жыл бұрын
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
@muhammadtahir-f6n
@muhammadtahir-f6n Жыл бұрын
Can I use putty on windows 10 to connect with server.
@BrandonF-z6v
@BrandonF-z6v Жыл бұрын
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?
@sahadpop4135
@sahadpop4135 10 ай бұрын
Need your guide on ssh for this one ❤
@fmspv
@fmspv Жыл бұрын
How do I add images in the public folder of the app? Can anyone help me on this please.
@hacenhacen5814
@hacenhacen5814 10 ай бұрын
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 ????
@milencja3094
@milencja3094 4 ай бұрын
wow! its tremendes and exellent job :) thanks a lot for this tutorial
@SlaristaMardapani
@SlaristaMardapani Жыл бұрын
Sir ck you create videk for use ssl on this video?
@tomasburian6550
@tomasburian6550 Жыл бұрын
This seems quite complicated, can't I just host the app on my own hosting where I put my regular web pages?
@blahblahblah-u3m
@blahblahblah-u3m Жыл бұрын
or can one create an nginx server for a subdomain because the entire vps is built on apache server
@preduw
@preduw Жыл бұрын
Do I get this right? You are entering your root password on a third party terminal emulation website? Are there any security concerns?
@tsykin
@tsykin 11 ай бұрын
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 🙂
@workspace2024
@workspace2024 2 ай бұрын
What if I want to link the subdomain to a Next.js site? You did a good job with the main IP 👍, but now I need it for the subdomain.
@muhammadtahir-f6n
@muhammadtahir-f6n Жыл бұрын
I have purchased kvm2 hosting. and complete initial setups. how can i upload my nextjs project now. i want to deploy via github.
@rafaelldamaso
@rafaelldamaso 11 ай бұрын
works with cyberpanel?
@nathanielgonzalez9598
@nathanielgonzalez9598 10 ай бұрын
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.
@Zakher
@Zakher 11 ай бұрын
Would love to see a self-hosted github runner + monorepo project
@CartierKray
@CartierKray 11 ай бұрын
This is gold bruh gold👏🏾 goin make shmoneyyy with this
@SonnySangha
@SonnySangha 11 ай бұрын
Glad you liked it!
@JRichens
@JRichens Жыл бұрын
Sonny - Amazing... Just need SSL and how to forward my domain I purchased From GoDaddy to my IP address, or instructions where to do so! Thank you so much
@JRichens
@JRichens Жыл бұрын
Did this with Certbot and forwarded my domain with A method - sorted
@KaiWollherr
@KaiWollherr 5 ай бұрын
still getting my password denied. Try'd for hours now. Changing it all over again....still not working. Can't even ssh into my Ip.
@saikrishnamuntha62
@saikrishnamuntha62 Жыл бұрын
bro I need with external api like python or node js to integrate with nextjs on Login apis
@beshoysoliman2331
@beshoysoliman2331 Жыл бұрын
can you deploy a nodejs server on it as well?
@babakmahmoodi8741
@babakmahmoodi8741 Жыл бұрын
Thanks a lot. Please teach us load balancing and ssl and dns
@tdombui
@tdombui 11 ай бұрын
The sharpest eye brows in software engineering
@SonnySangha
@SonnySangha 11 ай бұрын
Haha I love this!
The BEST way to host Next.js websites
17:37
ByteGrad
Рет қаралды 63 М.
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
The Honey Scam: Explained
10:53
Marques Brownlee
Рет қаралды 4 МЛН
My Favourite Way To Deploy Any Web App on VPS
14:40
developedbyed
Рет қаралды 29 М.
Setting up a production ready VPS is a lot easier than I thought.
29:50
How To Deploy Next.js ECommerce On Ubuntu Hostinger VPS [4k]
25:04
Coding with Basir
Рет қаралды 3,4 М.
Self-Hosting Next.js
45:13
leerob
Рет қаралды 79 М.
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН