Node.js: How Stackhero selects your Node.js version

This documentation is part of the Node.js version guide. View the full guide here: How Stackhero selects and manages the Node.js version for your application.

👋 Welcome to the Stackhero documentation!

Stackhero delivers a ready-to-use Node.js cloud environment designed to help you move faster:

  • Deploy to production in seconds with a simple git push. No extra tooling or manual setup is required.
  • Bring your own domain and benefit from automatic HTTPS certificates, keeping your application secure without extra configuration.
  • Automatic backups, one-click updates, and predictable pricing help you focus on shipping features, and Stackhero manages the infrastructure for you.
  • Built on private, dedicated infrastructure for consistent performance and strong security.

Save time and reduce operational overhead: you can have your application running on Stackhero's Node.js cloud hosting in just a few minutes.

At every deployment, Stackhero looks for the first matching specification in this order:

  1. image in your stackhero.yml. This pins the exact container image, and all other options are skipped.

    image: node:24-alpine3.21
    
  2. engines.node in your package.json.

    {
      "engines": {
        "node": "24.x"
      }
    }
    
  3. .nvmrc file.

    24
    
  4. .node-version file.

    24.9.0
    

If none of these are found, Stackhero defaults to the current Long Term Support (LTS) release, which suits most projects.

The selected Node.js version and image are printed at the top of your deployment output, so you always know what is running:

Language        : nodejs 24
Base image      : node:24-slim