Deploy a Node.js app from Git with a hosting control panel
Deploy a Node.js app from a Git repository, health-check it before it takes traffic, and roll back with one command. No PM2 needed.
Create the app
In KLYRN a Node.js app is a site type. Create it from the panel, or from the command line:
klyrn site create app.example.com --type node --runtime 22 --git https://github.com/you/app --branch main
The start and build commands are detected from the repository when you leave them out. Runtimes are fetched when needed and checked against the SHA-256 list nodejs.org publishes.
What a deploy does
A deploy is one job. It clones the repository over HTTPS as the account's own user. Root never runs Git against a customer's repository.
It runs npm ci and your build command. Then it starts the new release and probes it before it takes any traffic. Only then is nginx pointed at it.
klyrn app deploy app.example.com
klyrn app rollback app.example.com
The previous release stays on disk, so a rollback is instant. It goes back one release and cannot pick an older commit.
How the app runs
Each app is one sandboxed systemd unit with a memory ceiling. It listens on a private loopback port, and nginx handles TLS in front of it. systemd handles restarts and logs, so there is no PM2 to run.
A health check runs every 30 seconds. It restarts a unit that has failed, and it stops after three tries in thirty minutes so a human can look.
Settings and secrets
Set environment variables with klyrn app env. They are encrypted at rest and go into the encrypted backup. A health path and a memory limit are one command each.
The app shares the panel, the certificates and the backups with the PHP sites on the same server.
Try it
Install KLYRN on a fresh Ubuntu 24.04 server with curl -fsSL https://get.klyrn.com | sudo bash. Then follow the Node.js guide.
The Node.js hosting page shows the flow. For apps that ship as images, see Applications.