[proxy] devcenter.heroku.com← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light

Stacks | Heroku Dev Center

Table of Contents [expand]

Last updated September 26, 2025

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.

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.