Skip to content

Node.js, Python, Ruby ​

This page explains how to install the Node.js, Python, and Ruby runtimes on a server so clients can run applications. It is written for admins.

Clients create and manage their applications themselves from the client panel. See Node.js, Python, Ruby in the client panel.

Engine per server type ​

ServerNode.jsPythonRuby
Without CloudLinux (generic)MoorCP runtimeMoorCP runtimeMoorCP runtime
CloudLinuxCloudLinux selector (Passenger)CloudLinux selector (Passenger)MoorCP runtime with alt-ruby

Clients see the same page whatever the engine.

Package features ​

Clients can only create, change, and run applications when their package enables the feature:

Package featureRuntime
Node.jsNode.js
PythonPython
RubyRuby

Stopping and deleting applications is always allowed. See Packages.

Servers without CloudLinux ​

Open Servers › (server) › Settings › Application runtimes.

Available versions ​

RuntimeVersionsSource
Node.js18, 20, 22, 24Official nodejs.org tarballs, checksum verified.
Python3.9, 3.11, 3.12, 3.13, 3.14AppStream python3.X packages.
Ruby3.1, 3.2, 3.3, 3.4, 4.0Compiled from the official ruby-lang.org source, checksum verified.

Several versions can be installed side by side. Ruby 3.1 and 3.2 are EOL.

Installing a runtime ​

  1. On the runtime's card, tick versions under Available versions. Versions already installed are marked installed.
  2. Click Install selected.
  3. Confirm.

The install runs in the background. The Logs card shows the result of the last install. Only admins can install runtimes.

Install time

Ruby is compiled from source, which takes a few minutes per version. Node.js and Python are usually faster. Build tools for native modules are installed too.

Old Ruby from AppStream

Older servers may have one Ruby version from AppStream. When you install another version, the panel warns that this Ruby is replaced. Existing Ruby applications need to be recreated with the new version.

SELinux ​

The web server forwards requests to applications on 127.0.0.1 ports 30000–39999. If SELinux blocks this, the panel shows SELinux blocks the web server from reaching applications. Run this once on the server as root:

bash
setsebool -P httpd_can_network_connect 1

How applications run ​

ItemBehavior
ProcessOne systemd unit per application, running as the account user within the account's CPU, RAM, IO, and process limits. Restarts automatically on failure.
PortA 127.0.0.1 port from the 30000–39999 range, through the PORT variable.
Node.jsnode <startup file>, default app.js.
Pythongunicorn with a virtualenv per application. Default passenger_wsgi.py:application, compatible with CloudLinux applications.
RubyPuma with config.ru.
LogsGo to the journal and are read from the panel.
Addresshttps://<domain>/<uri>, proxied by the active web server, with WebSocket support.

Application routes work in every web server mode: nginx-proxy, nginx, apache, and openlitespeed. An application at the domain root replaces that website's PHP and static files.

When an account is suspended, all its applications stop. On unsuspend, the applications that were running start again.

Startup file ​

The panel only creates a sample startup file for the default names (app.js, passenger_wsgi.py, config.ru) when that file does not exist yet. Any other startup file, such as server.js, must already exist and must not be empty. Otherwise creating or changing the application is refused with a message such as startup file ~/nodeapp/server.js not found or startup file ~/nodeapp/server.js is empty. Upload the application first, or check the application root and startup file. Existing files are never overwritten.

To check an application on the server, run as root:

bash
moorcp-agent app check USERNAME

It shows each application's URL, version, port, unit status, whether the startup file is missing or empty, the state of node_modules, an HTTP test to the application port, and the last log lines. It only reads and is safe to run at any time. Output is in English; set MOORCP_LANG=id for Indonesian. See CLI.

CloudLinux servers ​

Node.js and Python ​

Runtimes are installed from the CloudLinux tab, Node.js and Python card.

  1. Tick alt-nodejs and alt-python versions.
  2. Click Install selected runtimes, then confirm. Passenger and the runtimes are installed, then Apache restarts.
  3. Set For accounts: Offer or Hide per version.

Applications run through Passenger as the account user, inside its CageFS and LVE. See CloudLinux.

Ruby ​

The CloudLinux selector does not support Ruby, so Ruby uses the MoorCP runtime. In Settings › Application runtimes, the Ruby card installs alt-ruby 3.1, 3.2, 3.3, 3.4, and 4.0 from CloudLinux. Versions can be installed side by side and are visible to accounts in CageFS right away.

Ruby application processes go into the account's LVE and CageFS, so package limits apply.

Limitations ​

  • Moving between servers and restoring MoorCP backups do not carry application configuration yet. Application code comes along as part of the home directory, so applications need to be recreated on the target server.
  • Importing from cPanel (a migration wave or a cPanel archive restore) registers Node.js, Python, and Ruby applications again with the same directory, domain, URL, startup file, mode, and environment variables. See Importing from cPanel.
  • Deleting an application only removes its configuration. The application files stay in the home directory.

See also ​

MoorCP Shared, a shared hosting panel for server fleets.