Skip Navigation
Show nav
Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
    • .NET
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
Hide categories

Categories

  • Heroku Architecture
    • Compute (Dynos)
      • Dyno Management
      • Dyno Concepts
      • Dyno Behavior
      • Dyno Reference
      • Dyno Troubleshooting
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Developer Tools
    • Command Line
    • Heroku VS Code Extension
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery & Integration (Heroku Flow)
    • Continuous Integration
  • Language Support
    • Node.js
      • Node.js Behavior in Heroku
      • Working with Node.js
      • Troubleshooting Node.js Apps
    • Ruby
      • Rails Support
      • Working with Bundler
      • Working with Ruby
      • Ruby Behavior in Heroku
      • Troubleshooting Ruby Apps
    • Python
      • Working with Python
      • Background Jobs in Python
      • Python Behavior in Heroku
      • Working with Django
    • Java
      • Java Behavior in Heroku
      • Working with Java
      • Working with Maven
      • Working with Spring Boot
      • Troubleshooting Java Apps
    • PHP
      • PHP Behavior in Heroku
      • Working with PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
    • .NET
      • Working with .NET
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
      • Migrating to Heroku Postgres
    • Heroku Key-Value Store
    • Apache Kafka on Heroku
    • Other Data Stores
  • AI
    • Working with AI
    • Heroku Inference
      • Inference API
      • Quick Start Guides
      • AI Models
      • Inference Essentials
    • Vector Database
    • Model Context Protocol
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
      • Single Sign-on (SSO)
    • Private Spaces
      • Infrastructure Networking
    • Compliance
  • Heroku Enterprise
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Heroku Architecture
  • Stacks (operating system images)
  • Stacks

Stacks

English — 日本語に切り替える

Last updated May 01, 2025

Table of Contents

  • Stack Support Details
  • Default Stack
  • View Your App’s Stack Name
  • Migrating to a Different Stack

A base image is an operating system image that is curated and maintained by Heroku. Base images are typically based on an existing open-source Linux distribution, such as Ubuntu. Heroku applications target a specific base image, and buildpacks are responsible for transforming an app’s source code into an executable package that is compatible with that base image.

For Cedar-generation apps (which use classic buildpacks), the name of an app’s stack is also the same name as its Heroku base image. For example heroku-24. For Fir-generation apps (which use Cloud Native Buildpacks), the name of an app’s stack is always set to cnb , and the base image is selected via project.toml. For instance builder = heroku/builder:24 in project.toml causes Heroku to use the heroku/heroku:24 stack.

Stack Support Details

Stack Version Base Technology Available since Supported Through Compatibility Status
Heroku-24 Ubuntu 24.04 LTS 2024 April 2029 Cedar+Fir Default stack
Heroku-22 Ubuntu 22.04 LTS 2022 April 2027 Cedar Supported
Heroku-20 Ubuntu 20.04 LTS 2020 April 2025 Cedar End-of-life
Heroku-18 Ubuntu 18.04 LTS 2018 April 2023 Cedar End-of-life
Heroku-16 Ubuntu 16.04 LTS 2017 April 2021 Cedar End-of-life
Container Docker 2017 N/A¹ Cedar N/A¹

¹: Container based apps don’t include the curated and maintained operating system layer of the other Heroku stacks. You’re responsible for selecting and maintaining the base layer of containers you deploy.

Every stack on Heroku supports different operating system packages and language runtime versions. This support is typically confined to software that was still actively developed by the respective maintainers at the time the stack was first released.

Heroku’s officially supported buildpacks work with all supported stacks. Third-party buildpacks aren’t guaranteed to work with all stacks.

Ubuntu Packages on Heroku Stacks lists packages available on each stack.

Our Stack Update Policy describes when and how we update or retire existing stacks and our schedule for introducing new stacks.

Default Stack

Default Stack for Cedar Apps

The default stack and base image for all newly created Cedar-generation Heroku apps that use classic buildpacks is heroku-24.

Default Stack and Stack Support for Fir Apps

The stack for all Fir apps is cnb (short for Cloud Native Buildpacks). The default base image for Fir is heroku/heroku:24. Older base images are not supported on Fir. You can upgrade the base image used on Fir apps via project.toml when a new base image, like heroku/heroku:26, becomes available in the future.

View Your App’s Stack Name

You can determine which stack your app is using with the heroku stack CLI command. For Cedar-generation apps, the options are:

$ heroku stack
=== ⬢ example-app Available Stacks
  container
  heroku-22
* heroku-24

In the example above, the heroku-24 stack is active, and the other listed stacks are available as alternatives.

All apps using CNBs have their stack value set to cnb, there are no other supported stack values.

Migrating to a Different Stack

You can change the stack your Cedar-generation app uses for the next deploy using heroku stack:set:

$ heroku stack:set heroku-24

You may need to make code changes when you move an app to a different stack. For detailed instructions on upgrading the stack of an app, refer to the upgrading to the latest stack instructions.

You can’t change a Fir app’s stack from cnb. You can update a Fir app’s base image when a newer base image (like heroku/heroku:26) becomes available in the future.

Keep reading

  • Stacks (operating system images)

Feedback

Log in to submit feedback.

Upgrading to the Latest Stack Ubuntu Packages on Heroku Stacks

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure
  • .NET

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing
  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Github
  • LinkedIn
  • © 2025 Salesforce, Inc. All rights reserved. Various trademarks held by their respective owners. Salesforce Tower, 415 Mission Street, 3rd Floor, San Francisco, CA 94105, United States
  • heroku.com
  • Legal
  • Terms of Service
  • Privacy Information
  • Responsible Disclosure
  • Trust
  • Contact
  • Cookie Preferences
  • Your Privacy Choices