node-startup
by
ralyodio

Description: Startup script for Linux-based systems for running node app when rebooting using an /etc/init.d script.

View on GitHub ↗

Summary Information

Updated 1 hour ago
Added to GitGenius on June 12th, 2026
Created on October 12th, 2012
Open Issues & Pull Requests: 10 (+0)
Number of forks: 163
Total Stargazers: 776 (+0)
Total Subscribers: 29 (+0)

Issue Activity (beta)

Open issues: 0
New in 7 days: 0
Closed in 7 days: 0
Avg open age: N/A days
Stale 30+ days: 0
Stale 90+ days: 0

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

The ralyodio/node-startup repository provides a shell-based startup script designed for Linux systems to ensure that a Node.js application automatically starts after a system reboot. The script is intended to be placed in the /etc/init.d directory, integrating with the system's init process so that the Node.js app is managed like a traditional service. This approach is particularly useful for developers and administrators who want their Node.js applications to remain available without manual intervention after unexpected reboots or planned maintenance.

The main purpose of node-startup is to address the common issue where Node.js applications do not restart automatically after a server reboot, especially on virtual private servers (VPS) or cloud-hosted environments. By leveraging the init.d mechanism, the script ensures that the application is started during the system boot sequence, providing reliability and minimizing downtime.

Configuration of the script is straightforward and highly customizable. At the top of the node-app script, users can specify several environment variables and execution parameters. These include NODE_ENV (to set the environment type, such as production or development), PORT (the port the application listens on), CONFIG_DIR (for node-config integration), NODE_EXEC (the path to the Node.js executable), APP_DIR (the directory containing the Node.js app), NODE_APP (the main application file), PID_DIR and PID_FILE (for process management), LOG_DIR and LOG_FILE (for logging output), and APP_NAME (for display and messaging). These settings allow the script to be adapted to various deployment scenarios and application structures.

The script supports four primary actions: start, stop, restart, and status. The start action launches the Node.js application, stop terminates it, restart performs a stop followed by a start, and status checks whether the application is currently running based on the PID file and active processes. Additionally, a --force option is available for each action to handle edge cases, such as when a PID file exists but the application is not running, ensuring robust management and recovery from abnormal states.

Installation involves cloning the repository, editing the node-app script to match the application's configuration, and copying it to the /etc/init.d directory. Users can then add the script to the system's default runlevels using update-rc.d (for Debian-based systems) or chkconfig (for Red Hat-based systems), ensuring the application is started automatically during boot. The script has been tested on Debian 6.0 but is expected to work on other Linux distributions that use init.d scripts, including Red Hat, CentOS, Gentoo, and Ubuntu.

The repository is currently seeking a maintainer, indicating that it may not be actively maintained but remains functional and useful for those needing a simple, reliable startup solution for Node.js applications. The project is licensed under the MIT License, allowing free use and modification. Overall, node-startup offers a practical, shell-based approach to managing Node.js application lifecycles on Linux servers, providing essential automation and reliability for production environments.

node-startup
by
ralyodioralyodio/node-startup

Repository Details

Fetching additional details & charts...