Node.js: Choosing your own image

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.

The image field accepts any tag from the official Node.js Docker images and uses it exactly as written:

image: node:24-alpine3.21

Be sure to include the full tag and use an official Node.js image. These two requirements allow Stackhero to reliably manage your deployment, from installing dependencies to starting your app. If you specify an unsupported image, this is reported before the build begins, and your running application is not affected.

Alpine tags produce smaller images that start quickly. If your project uses dependencies that require native code compilation, you may need a Debian-based image. If an install fails with Alpine, switching to a -slim tag typically resolves it.