Back to Blog
Development

How to Deploy a Node.js App on Enzonic Cloud

March 1, 2025
9 min read

Prerequisites

Before deploying, make sure you have:

  • An Enzonic Cloud account (free)
  • A Node.js application with a `package.json`
  • A start script defined (e.g., `npm start` or `node index.js`)

Step 1: Prepare Your Application

Your application should:

  1. Listen on the port provided by the environment: process.env.PORT || 3000
  2. Use environment variables for secrets (database URLs, API keys)
  3. Have a clean package.json with all dependencies listed

Example Express app:

const express = require('express');
const app = express();
const PORT = process.env.PORT || 3000;

app.get('/', (req, res) => {
  res.json({ status: 'running', message: 'Hello from Enzonic Cloud!' });
});

app.listen(PORT, () => {
  console.log(`Server running on port ${PORT}`);
});

Step 2: Create the Server

  1. Log in to your Enzonic Cloud dashboard
  2. Click Create Server
  3. Select Web & Apps > Node.js
  4. Choose your preferred region
  5. Set resources:

- RAM: 512 MB–1 GB for most apps

- Disk: 1–5 GB depending on your app size

- CPU: 50–100% for typical web apps

Step 3: Upload Your Application

Option A: File Manager

In the Pterodactyl panel, use the file manager to upload your application files.

Option B: SFTP

Use your preferred SFTP client (FileZilla, WinSCP, Cyberduck) with the SFTP credentials shown in the panel.

Option C: Git (Startup Command)

If your repository is public, you can set the startup command to clone and run:

git clone <your-repo-url> . && npm install && npm start

Step 4: Install Dependencies

In the Pterodactyl console, run:

npm install

Or set this as part of your startup script.

Step 5: Set Environment Variables

In the Pterodactyl panel under Startup, add your environment variables:

  • `DATABASE_URL`
  • `API_KEY`
  • `NODE_ENV=production`
  • Any other secrets

Step 6: Start Your App

Click Start in the panel. Your application will start and you'll see the logs in the console.

Accessing Your Application

Your application will be accessible at the IP address shown in your dashboard. For production use, we recommend pointing a custom domain to this IP.

Tips for Production

  1. Use PM2 for process management: npm install -g pm2 && pm2 start index.js
  2. Set NODE_ENV=production to enable production optimizations
  3. Use npm ci instead of npm install for faster, reproducible installs
  4. Enable health checks — add a /health endpoint

Upgrading Resources

As your traffic grows, you can upgrade resources from the Enzonic Cloud billing panel. RAM is available from $1/GB per month.

Deploy your app for free →

Ready to get started?

Deploy your first server free — no credit card required.

Create free account