Next.js is a popular React framework for building fast, SEO-friendly web applications. On Plesk with Node.js support, you can host such an app without complex infrastructure: you configure a Node.js application, deploy your code via Git or upload, and benefit from server-side rendering, static generation, and caching. In this article, you’ll learn what you need and which steps to take concretely.
What you need
Before you set up a Next.js app on Plesk, make sure you have a few basic requirements in place. A hosting environment with Node.js support is the most important one: Next.js runs on Node.js and requires a build step (npm run build) before the app can run in production. In addition, you’ll need access to a Git repository (useful for automatic deployments), a package manager such as npm or yarn, and knowledge of environment variables for settings that differ per environment, such as API keys or database connections.
A modern server environment with fast storage noticeably speeds up the build process, especially for larger applications with many dependencies. Via Tandata’s web hosting platform, this runs on LiteSpeed servers with NVMe storage, which speeds up builds and restarts.
Configuring Node.js in Plesk
Plesk offers a separate Node.js module that lets you link an application to a domain or subfolder. There you set the Node.js version, the document root (the folder where your app files are located), the startup file, and the environment variables.
Creating the application
Go to ‘Websites & Domains’ in Plesk and select the Node.js section. Create a new application and link it to the correct domain or subfolder.
Setting the version and document root
Choose a recent Node.js version and point the document root to the folder containing your Next.js files, for example the root folder of your repository.
Determining the startup file
Use a start script that runs ‘next start’, or a server.js file if you’re using a custom server.
Adding environment variables
Set NODE_ENV to production at minimum in Plesk, and add any other variables your app needs, such as API keys.
Deploying your app
There are several ways to get your Next.js code onto Plesk. Git deployment is the most practical option: you link a repository to Plesk, after which new commits can automatically be pulled and rebuilt. Alternatives include manually uploading via the file manager or via SFTP, but these methods lack version control and automation.
Always build the application first locally, or let Plesk handle it via a build hook, so that the production build (npm run build) is actually executed before the app restarts. Next.js can run either fully static (as an exported site) or dynamically with server-side rendering; the choice determines how the application is started in Plesk.
If, in addition to your web application, you also use your own domain and business mailboxes, you can easily arrange this via domain names and business email within the same Plesk panel.
Performance and management
After a successful deployment, managing the application is just as important. Make sure static files (images, CSS, JavaScript) are properly cached, so returning visitors see pages faster. Server-side rendered pages benefit from a fast server with sufficient memory, while statically generated pages benefit most from server-level caching.
Also keep SSL in mind: a valid certificate is necessary for modern web applications and can be automatically applied and renewed in Plesk. Additionally, use automatic backups so you can quickly revert to a working version in case of a failed deployment. If you run into a problem during deployment, consult the knowledge base or contact support.
Frequently Asked Questions
Can I use every Next.js feature on Plesk?
Yes, as long as Node.js is supported, you can use server-side rendering, static generation, and incremental static regeneration. Keep memory usage in mind for heavy builds.
Do I need to build my app locally before deploying?
It’s advisable to test the build locally first to make sure no errors occur. Plesk can then automatically run the build command on a new deployment.
Does Git deployment also work with an existing website?
Yes, you link a repository to a (sub)domain and Plesk pulls the latest version with every update, without you having to manually upload files.
What happens if my application crashes?
Plesk can automatically restart the Node.js application. For extra peace of mind, it’s wise to check logs and use daily backups as a safety net.
Can I switch over from another provider?
Yes, this can usually be done without downtime if you carefully migrate the DNS and files. See the page about switching to Tandata for the steps to follow.
Conclusion
Hosting Next.js on Plesk is quite manageable once Node.js is configured correctly: choose the right version, set your startup file and environment variables, and use Git for a repeatable deployment. With attention to caching, SSL, and backups, you keep the application fast and reliable.