Needed files for selfhosting
Unanswered
American Sable posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
American SableOP
Nextjs' documentation seems to be a bit sparse on how to self host my application.
After I run "npm run build" and the .next-folder is created, which files do I need to copy on my server?
I had the idea that the ".next"-folder is self contained, but I need at least the "node_modules" (for the next binary) and the package.json to be able to run "start".
After I run "npm run build" and the .next-folder is created, which files do I need to copy on my server?
I had the idea that the ".next"-folder is self contained, but I need at least the "node_modules" (for the next binary) and the package.json to be able to run "start".
1 Reply
![Avatar](https://cdn.discordapp.com/avatars/657067112434499595/aff4eeb34922ca980b0d5fbb5bc60c21.webp?size=256)
risky
you should either build on the server and run normaly, or use standalone and only need to make sure you have node for starting: https://nextjs.org/docs/app/api-reference/next-config-js/output#automatically-copying-traced-files