How to Deploy Your Node.js Application on Systron Hosting Print

  • Node.js (Express/Fastify/bare http), NodeJS
  • 232

This guide will walk you through deploying your Node.js application using your Systron Linux Plesk control panel.

Step 1: Upload Your Project Files

  • Log in to your Systron hosting client area and open your Plesk control panel.
  • Navigate to Websites & Domains and click on File Manager for your domain.
  • Create a new directory for your application (for example: /httpdocs/my-app).
  • Upload your project files, including your package.json and application entry point (such as app.js or server.js), into that folder.

Step 2: Understand the Directory Structure Rule

Systron's Linux servers use Phusion Passenger to run Node.js apps. This requires a specific folder structure:

  • Application Root: The main folder containing your project files (e.g., /httpdocs/my-app).
  • Document Root: This must be a subdirectory inside your Application Root, typically named "public" (e.g., /httpdocs/my-app/public). Even if your app doesn't use static public files, this folder must exist.

Step 3: Enable and Configure Node.js

  • Return to Websites & Domains.
  • Click on the Node.js icon.
  • Set the Application Root to your project folder (e.g., /httpdocs/my-app).
  • Set the Document Root to your public subdirectory (e.g., /httpdocs/my-app/public).
  • Select your preferred Node.js Version from the dropdown menu of supported versions.
  • Specify your Application Startup File (e.g., app.js or server.js).
  • Click Enable.

Step 4: Install Dependencies (NPM or Yarn)

  • Once Node.js is enabled, look for the package management options on the Node.js configuration page.
  • Click NPM Install (or Yarn Install if your project uses Yarn). Plesk will read your package.json file and automatically download your required modules.

Step 5: Configure Environment Variables and Logs

  • If your application requires custom settings (like database passwords), you can add them directly under the Environment Variables section on the same page.
  • You can monitor your application's output and check for errors by accessing your application logs through Plesk's domain log interface.

Step 6: Restart Your Application

  • Whenever you make changes to your application code, update your environment variables, or install new modules, click the Restart App button on the Node.js management screen to apply the updates.

Need to add more applications or scale up your resources? Review our available resource tiers on the Systron Node.js Plans page.


Was this answer helpful?

« Back