Table of Contents [expand]
Last updated September 03, 2026
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-26. - For Fir-generation apps (which use Cloud Native Buildpacks), the name of an app’s stack is always set to
cnb, and instead the base image is tied to the CNB builder. For instance using the CNB builderheroku/builder:26causes Heroku to use the Heroku-26 base image.
Stack Support Details
| Stack Version | Base Technology | Available since | Supported Through | Compatibility | Status |
|---|---|---|---|---|---|
| Heroku-26 | Ubuntu 26.04 LTS | 2026 | April 2031 | Cedar+Fir | Supported |
| Heroku-24 | Ubuntu 24.04 LTS | 2024 | April 2029 | Cedar+Fir | Default stack |
| Heroku-22 | Ubuntu 22.04 LTS | 2022 | April 2027 | Cedar | Deprecated |
| 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.
Cedar does support Cloud Native Buildpacks as well. You can create new Cedar apps or update existing apps to use CNBs:
$ heroku apps:create <app name> --stack cnb
$ heroku stack:set cnb -a <app name>
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
cnb
container
heroku-22
* heroku-24
heroku-26
In the example above, the heroku-24 stack is active, and the other listed stacks are available as alternatives.
All apps using CNBs will have the stack value cnb.
Migrating to a Different Stack
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.
Change the Classic Buildpacks Stack
For Cedar-generation apps using classic buildpacks, use heroku stack:set to change your stack for the next deploy:
$ heroku stack:set heroku-26
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.
Switch to cnb Stack
To switch an existing Cedar-generation app to Cloud Native Buildpacks, change the stack to cnb.
$ heroku stack:set cnb
If the app has buildpacks configured, you will need to create a project.toml to set the required Cloud Native Buildpacks. Additional code changes may be required, when switching from classic to cnb buildpacks.
For cnb stack app, the base image is tied to the CNB builder, which can be controlled via your app’s project.toml. For instance builder = "heroku/builder:26" in project.toml causes Heroku to use the Heroku-26 base image:
[_]
schema-version = "0.2"
[io.buildpacks]
builder = "heroku/builder:26"