Deploy your Next.js app to a VPS (EASY!)

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ม.ค. 2025

ความคิดเห็น • 87

  • @ByteGrad
    @ByteGrad  ปีที่แล้ว +2

    Get one month of VPS FREE at hivelocityinc.net/3SfVjnB. Use code BYTEGRAD1 at checkout.

    • @officework8812
      @officework8812 5 หลายเดือนก่อน

      hi, thank you very much for such videos.
      do you have some kind of dm channel?

    • @officework8812
      @officework8812 5 หลายเดือนก่อน

      Hi, again.
      Can you make a video on deploying samething on windows 22 server?

  • @ahmedjaber8595
    @ahmedjaber8595 ปีที่แล้ว +54

    it would be beneficial if you could extend this series to cover topics like dockerizing Node.js applications (including Next.js, React.js, Nest.js...), utilizing subdomains, managing versioning and releases on Git Actions, and implementing automatic deployment to the VPS when pushing changes to the main branch

    • @jitxhere
      @jitxhere ปีที่แล้ว +11

      You just explained the devops job

    • @ahmedjaber8595
      @ahmedjaber8595 ปีที่แล้ว

      ​@@jitxhere In today's job market, it has become increasingly common for companies to expect developers to possess DevOps skills rather than hiring dedicated DevOps personnel.

    • @FlashViolet
      @FlashViolet ปีที่แล้ว +1

      wow, this plan is awesome

    • @Eventyret
      @Eventyret ปีที่แล้ว +1

      Actually easypanel does it for you

    • @nmastroianni
      @nmastroianni ปีที่แล้ว +2

      I second this. I would love the follow up steps in a series. Let's Encrypt with certbot etc, Dockerization, Automated building and deployment with GitHub? Yes please!

  • @virtual5754
    @virtual5754 ปีที่แล้ว +25

    There are more things to cover to make this app work as intended. Without them it looks more like 15 minute ad than tutorial.
    1. How to make passwordless ssh login
    2. How to set up firewall
    3. How to allocate swap memory and how much you would realistically need at lowest spec
    4. How to set correct node flag for available memory
    5. How to configure pm2 (you mentioned it briefly)
    6. How to configure reverse proxy in nginx
    7. How to connect domain and issue certificates
    8. Optionally - how to use nginx for serving static cache
    Alternatively starting from step 4 - how to use containers to run node process and how to use traefik for reverse proxy.
    Can you record couple more videos to explain both ways in detail? Personally I would be interested in docker+traefik, since I have no experience in this workflow.

    • @Chris...S
      @Chris...S ปีที่แล้ว

      I use CloudPanel it makes it easy to setup most that as well as mysql db

    • @Rahman-xm7zm
      @Rahman-xm7zm ปีที่แล้ว

      You should give Kamal a try

    • @alainportant6412
      @alainportant6412 7 หลายเดือนก่อน

      @@Rahman-xm7zm maybe use the Vercel and avoid all this crap

  • @saralightbourne
    @saralightbourne ปีที่แล้ว +6

    i would really like to see an implementation of CI/CD for your VPS. how to sync code on the server, how to restart the service. i never figured out how to do it properly without docker

  • @ilirbajrami2902
    @ilirbajrami2902 ปีที่แล้ว +5

    I was hoping for a CI/CD pipeline with Github which is crucial for this kind of deployment. However, nice video

  • @gadgetboyplaysmc
    @gadgetboyplaysmc ปีที่แล้ว +2

    Okay wtf how did you just post this after 2 weeks of me struggling to deploy on a VPS 💀💀

  • @CloudieDev
    @CloudieDev ปีที่แล้ว +3

    This is incredibly useful and so easy to follow. Thank you.

  • @maciejziehlke4479
    @maciejziehlke4479 ปีที่แล้ว +3

    TBH I was hoping that you'll show full setup, DNS, SSL, etc. I guess this is hot topic now, so maybe I should do it and finally record something...

    • @Chris...S
      @Chris...S ปีที่แล้ว

      All that can be easily setup with CloudPanel which is like cpanel but open source.

  • @favanzzo
    @favanzzo ปีที่แล้ว +3

    Hi, first of all ty for the JS course..really love it! but i was a bit sad to see that the react course will have almost the same projects? i know its different (declarite etc..) but would be nice to see other projects.

  • @FerSpanos
    @FerSpanos 10 หลายเดือนก่อน +1

    Very nice video thank you. One cuestion is working with dinamics routes?

  • @TomaszTomczuk
    @TomaszTomczuk ปีที่แล้ว +3

    you can do AWS Amplify as well

  • @zaritzki
    @zaritzki 9 หลายเดือนก่อน +1

    Thank you for this! Do you have a video for Digital Ocean? for nextjs with a custom servers too? Thank you!

  • @biLLie_wiLLie
    @biLLie_wiLLie ปีที่แล้ว +2

    Nice! Can you show how to connect a project on the server and git to implement all changes immediately like on Vercel?

    • @ByteGrad
      @ByteGrad  ปีที่แล้ว +3

      Good idea

    • @Chris...S
      @Chris...S ปีที่แล้ว

      You use git actions for that

  • @JohnMcclaned
    @JohnMcclaned ปีที่แล้ว

    Where is this NextJS + React course? I need it asap. Do you have an ETA when it's ready?

  • @AnthonyCandaele
    @AnthonyCandaele 9 หลายเดือนก่อน +1

    Thanks for this video! Should you than also install your database on the same VPS?

  • @Showmatic
    @Showmatic ปีที่แล้ว +1

    Wow I was just thinking about this exact topic yesterday!

  • @Anne-kz4fi
    @Anne-kz4fi ปีที่แล้ว +2

    This was very helpful, thank you. I was about to deploy my first website and was looking for a vps for nextjs. Could you also make a tutorial for nextjs with mysql? That would be really helpful.

  • @videoponder4673
    @videoponder4673 10 หลายเดือนก่อน +1

    Thank you for the interesting and helpful video. I just do not get why to use Github and not simply FTP to transfer the files to server?

  • @Leesdjo
    @Leesdjo ปีที่แล้ว +1

    Thank you very informative.

  • @valeriykuvshinov
    @valeriykuvshinov 6 หลายเดือนก่อน +1

    Nice video!
    Any plans to cover a similar video but for Hostinger's OpenLiteSpeed Ubuntu with Node.js?
    I could use one right now :)

  • @NOTHING-en2ue
    @NOTHING-en2ue 7 หลายเดือนก่อน +1

    very useful tutorial, thanks a lot

  • @harry17166
    @harry17166 หลายเดือนก่อน

    How to host on IIS server ?

  • @Im-rollin-rollin
    @Im-rollin-rollin ปีที่แล้ว +1

    I am once again asking when will the nextjs course be ready? I'll be the first one to buy it !🙌

  • @Eventyret
    @Eventyret ปีที่แล้ว +4

    I found that it was expensive i pay 6$ / 5£ for
    4 vCPU Cores
    8 GB RAM
    200 GB SSD
    32 TB Traffic* (unlimited incoming)
    Which is cheaper then what this offering would be.

    • @Riczerq
      @Riczerq ปีที่แล้ว

      It's probably not in the US

    • @greenlines1208
      @greenlines1208 ปีที่แล้ว +1

      what do you use?

    • @jaydeep-p
      @jaydeep-p ปีที่แล้ว +1

      Which service? 32tb is amazing

  • @NewsIdeasInnovation
    @NewsIdeasInnovation ปีที่แล้ว +1

    Brilliant, thank you!

  • @OnlyJavascript
    @OnlyJavascript 9 หลายเดือนก่อน

    can you please show us how to deploy in hostinger vps

  • @kakashizet7496
    @kakashizet7496 ปีที่แล้ว +1

    please make tutorial for deploy next js 13 with app router in cPanel.

  • @rezakhani8627
    @rezakhani8627 11 หลายเดือนก่อน +1

    Hello, I have a project in which I use Next.js, Node.js, and PostgreSQL. I can run this project on a VPS without any problems, but I’ve been advised to use Docker. Do I necessarily have to use Docker to deploy such a project? Please guide me.

  • @mohdsahil226
    @mohdsahil226 9 หลายเดือนก่อน +1

    Hi Thank you for great content. Would you please also help on how to setup dev branch on sub domain, since the port is same, it always goes to main branch. I am using nginx.

  • @akbarnafisa4969
    @akbarnafisa4969 ปีที่แล้ว +1

    wow, this is really helpfull, thanks!

  • @sharkdeng9253
    @sharkdeng9253 7 หลายเดือนก่อน

    Good video! But I wonder how to remove port 3000 and add HTTPS support?

  • @M7ilan
    @M7ilan ปีที่แล้ว +1

    Can you make a doc website with NextJS 14 Like NextJS docs?
    with MDX and colored code, icon, copy code and code path.

    • @tdombui
      @tdombui 11 หลายเดือนก่อน

      why not do it yourself? This is a ridiculous request.

  • @stivandsoft
    @stivandsoft 3 หลายเดือนก่อน +1

    Thank you!

  • @SamyarBorder
    @SamyarBorder ปีที่แล้ว +1

    4 dollors for the first one is cheap i pay for the same 8 but unfotunatly it only has us locations

    • @ByteGrad
      @ByteGrad  ปีที่แล้ว +2

      Soon they will have locations outside US too!

  • @okkaraung9512
    @okkaraung9512 ปีที่แล้ว

    Are you planning on release React courses on Udemy ? I am waiting. Your javascript course is so good so far. I am still waiting for React course and Node.js course.

  • @ardianhotii
    @ardianhotii ปีที่แล้ว +1

    Thank you, very nice video , do you know any vps service that is located in europe with similar prices or if there are any with a free plan

  • @nitecheng
    @nitecheng ปีที่แล้ว

    what if we close the terminal window? will the vps "localhost" server still running?

  • @AlexyMiro
    @AlexyMiro ปีที่แล้ว

    Hello ByteGrad! Thank you for the video. I did exactly as in the video but i get 502 Bad Gateway. How can i fix it?

  • @FlashViolet
    @FlashViolet ปีที่แล้ว +1

    Omg, this is exactly what i've been trying to do for a couple of days for now. How did you know? =0

  • @adimStan
    @adimStan ปีที่แล้ว +1

    thanks this is clear

  • @ThuongHoang-fx5bi
    @ThuongHoang-fx5bi ปีที่แล้ว +1

    Hi bro, I have a question. How to deploy to VPS without pull source code to server. Can I only copy .next folder and deploy that foldder to server?

    • @ByteGrad
      @ByteGrad  ปีที่แล้ว

      Yes, that should work too

  • @cookieman.19
    @cookieman.19 11 หลายเดือนก่อน

    May I deploy more then 2 projects to 1 VPS by seperating port?

  • @filix6360
    @filix6360 9 หลายเดือนก่อน +1

    informative video...thanks.

  • @nishaanthms
    @nishaanthms 10 หลายเดือนก่อน

    Why i shouldn't use VERCEL HOBBY and host app. what benefit do i get in VPS than VERCEL HOBBY.

  • @williamcao5139
    @williamcao5139 ปีที่แล้ว

    hey, i've waited your course a long time. please release it

  • @AndersonSilvaMMA
    @AndersonSilvaMMA ปีที่แล้ว

    I'm just genuinely curious: you've used Windows in the past, here you're using macOS. Why?

  • @SuperSniffen
    @SuperSniffen ปีที่แล้ว

    What do I lose from doing this instead of using Vercel? Is there any particular functionality for Next which will not work, such as serverless etc?

    • @Chris...S
      @Chris...S ปีที่แล้ว

      Edge won't work. Using a VPS is really for non scalable apps. For that, it is best to use serverless PaSs hosting

  • @Smartercow
    @Smartercow ปีที่แล้ว

    Do you have to include port 3000 in the DNS?

    • @maciejziehlke4479
      @maciejziehlke4479 ปีที่แล้ว +2

      Nope, DNS is not smart enough to understand ports. You need to setup http server (Caddy, Apache, Nginx) on your VPS that will proxy port 3000 to 80 and 443, or run Next directly on port 80 (you'll need to be sudo as this is privileged port) and then use Cloudflare so they'll take care of SSL (you'll need to set SSL/TLS encryption mode to "flexible")

    • @Smartercow
      @Smartercow ปีที่แล้ว

      @@maciejziehlke4479 Okay thanks

  • @tsykin
    @tsykin ปีที่แล้ว

    Thank you so much for this tutorial, it worked for me! 👍
    Do you mind if I use some knowledge that you share in this video to create an instruction on how to deploy Next.js not to a paid VPS, but a Google Cloud Free Tier VM?

  • @vernevens1598
    @vernevens1598 10 หลายเดือนก่อน

    I can't just upload my app, I have to give the gods at Git my money because I might be too stupid?

  • @shawnlee5956
    @shawnlee5956 ปีที่แล้ว

    althoug the price usd 3+ vs usd 4
    this simple server compare can do what alicloud simple application server cant,
    which is the next js server cant run build in there, something cause the server hdd iops reach peak, can cause os kill the build task.
    but sadly.
    asia area dont have server.

  • @iSnakeBuzz
    @iSnakeBuzz ปีที่แล้ว

    OVH it's also good :)

  • @technoh4cksoficial
    @technoh4cksoficial 9 หลายเดือนก่อน

    hola contavo server tiene mejores vps jajaj