How to Deploy Next js App on Cpanel | Learn how to host Next js App on Namecheap Hosting Server

Sdílet
Vložit
  • čas přidán 9. 12. 2023
  • Step - 1
    Create a Next js App
    Step - 2
    NPM install & NPM run dev
    to sure website work properly
    Step - 3
    Create a file server.js app root folder
    &
    package.json file scripts area edit
    "start": "NODE_ENV=production node server.js",
    Step - 4
    NPM build for uploaded in server
    Step - 5
    zip all the file except node_module
    &
    unnecessary file
    Step - 6
    Login Cpanel
    create a folder in File manager
    then upload zip file in here
    last configure Cpanel Node Js
  • Věda a technologie

Komentáře • 43

  • @gededestrawan9997
    @gededestrawan9997 Před 3 měsíci +5

    you must change ur title yt with next js page not app, this tutorial is showing about how to deploy next js page router not app. ty

  • @tiagomendes5646
    @tiagomendes5646 Před měsícem +1

    why do you need to create a custom server? couldnt you just use next start?

  • @Yousafzai112
    @Yousafzai112 Před měsícem +1

    When i typ Node the aptions for the Node js setup not showing. Is there any issue in my Cpanel? if yes please guide me how will i slove the issue?

  • @alfiandm5782
    @alfiandm5782 Před 5 měsíci +1

    i take so long for npm run dev in cpannel what is the problem ? it says Can't acquire lock for app: %(app)s

    • @monjuaflame8329
      @monjuaflame8329  Před 5 měsíci

      Try it again.
      When run npm if it write folder path it must work.

  • @sufiirumi
    @sufiirumi Před 5 měsíci +1

    Is it possible to make SSR in cpanel? You need a VPS server for this, right?

  • @AbdelkaderSoudani
    @AbdelkaderSoudani Před 3 měsíci

    is that on Namecheap shared hosting? it only renders static sites right or does it run SSR also?

    • @chuksjoe007
      @chuksjoe007 Před 3 měsíci

      With the way he deployed it, it will run as a Server Side Rendered application.

    • @AbdelkaderSoudani
      @AbdelkaderSoudani Před 2 měsíci

      @@chuksjoe007 thank you, he's using page router though, not app router

  • @LudoKingChallenge
    @LudoKingChallenge Před 6 měsíci +1

    It's not working for me. Could you please help me.

  • @Antonio-nn2kq
    @Antonio-nn2kq Před 4 měsíci

    How do I run Prisma with nextjs in cpanel? I set the environment variable, but it doesn't recognize it.

    • @monjuaflame8329
      @monjuaflame8329  Před 4 měsíci

      No problem. Here node module render your hole application

    • @Antonio-nn2kq
      @Antonio-nn2kq Před 4 měsíci

      @@monjuaflame8329 Even though it doesn't run, it doesn't recognize the environment variable. I had to subscribe to a VPS and host the files on the .env file. On a common hosting with cpanel it doesn't work to configure the environment variable.

  • @seospecialistakm3028
    @seospecialistakm3028 Před 6 měsíci +1

    daynamic possible? example /blog/1

  • @iqnexplorers
    @iqnexplorers Před 4 měsíci +1

    Does it run on NEXT version 14?

  • @office394
    @office394 Před měsícem

    sir can u dot his same with hostinger panel??? plzz sir make video i am waiting for that. plzz upload today sir

  • @mykus1000
    @mykus1000 Před 4 měsíci +1

    can i deplay with prisma , app router and serveur compenent in cpanel

  • @unlimitedmemes-fu4pr
    @unlimitedmemes-fu4pr Před 4 měsíci +1

    please help me bro im getting 503 error

    • @monjuaflame8329
      @monjuaflame8329  Před 4 měsíci

      Please first check in locally if everything ok then follow it

  • @anuj.beniwal
    @anuj.beniwal Před 6 měsíci

    its not working its just showing index of/ whatever is in the public_html

    • @monjuaflame8329
      @monjuaflame8329  Před 6 měsíci +2

      open node js app and connect right folder.

    • @anuj.beniwal
      @anuj.beniwal Před 6 měsíci

      @@monjuaflame8329 i have donw that now it's showing Error 503. Service Unavailable

    • @anuj.beniwal
      @anuj.beniwal Před 6 měsíci

      @@monjuaflame8329can you help me with this

  • @user-bq6io5vk8i
    @user-bq6io5vk8i Před 2 měsíci +1

    i am getting 503 error anyone help me

    • @monjuaflame8329
      @monjuaflame8329  Před 2 měsíci

      Please try again.

    • @user-bq6io5vk8i
      @user-bq6io5vk8i Před 2 měsíci

      @@monjuaflame8329 Thank you so much for your reply but its not working i did as you please help me

  • @kacperkepinski4990
    @kacperkepinski4990 Před 5 měsíci

    missin steps

  • @soumyaranjan6941
    @soumyaranjan6941 Před měsícem

    Hi Sir ,
    Need a help from you regrading deployment of nextjs in a shared server in cpanel ,
    As currently stuck by an issue when trying to run npm start
    This is issue i am getting, please help me out
    node:internal/deps/undici/undici:9235
    return await WebAssembly.instantiate(mod, {
    ^
    RangeError: WebAssembly.instantiate(): Out of memory: Cannot allocate Wasm memory for new instance
    at lazyllhttp (node:internal/deps/undici/undici:9235:32)
    Node.js v19.9.0

  • @faridanjali8160
    @faridanjali8160 Před 4 měsíci

    Why i always get 503

    • @DrMoCode
      @DrMoCode Před 4 měsíci

      Same. I always get Error 503. Server Unavailable

    • @user-bq6io5vk8i
      @user-bq6io5vk8i Před 2 měsíci

      you find the solution for this i am also getting 503 error, Please help me

    • @user-bq6io5vk8i
      @user-bq6io5vk8i Před 2 měsíci

      @@DrMoCode you find the solution for this i am also getting 503 error please help me

    • @DrMoCode
      @DrMoCode Před 2 měsíci

      @@user-bq6io5vk8i I did
      My own case was version incompatibility
      The highest node version on the cPanel I was using was way lower than the node version nextjs was built on.

  • @vernevens1598
    @vernevens1598 Před 3 měsíci

    WTF did you even do?

  • @kacperkepinski4990
    @kacperkepinski4990 Před 5 měsíci

    unclear as hell