Node.js: Choosing your own image

This documentation is part of the Node.js runtime version management guide. You can view the complete guide here: How Stackhero selects and manages the Node.js version for your application.

👋 Welcome to the Stackhero documentation!

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

  • Deploy to production in seconds with a simple git push. No additional tools or manual configuration needed.
  • Use your own domain and take advantage of automatic HTTPS certificate setup, keeping your application secure with no extra steps.
  • Enjoy automatic backups, one-click updates, and predictable, transparent pricing so you can focus on building features while Stackhero manages the infrastructure.
  • Benefit from dedicated, private infrastructure for optimal performance and enhanced security.

Save time and simplify your operations: 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 specify 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 will be reported before the build starts, and your running application will not be 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 usually resolves the issue.