Last updated June 22, 2022
Table of Contents
A stack is an operating system image that is curated and maintained by Heroku. Stacks are typically based on an existing open-source Linux distribution, such as Ubuntu. Heroku applications target a specific stack, and buildpacks are responsible for transforming an app’s source code into an executable package that is compatible with that stack.
Stack support details
|Stack Version||Base Technology||Available since||Supported through||Status|
|Heroku-22||Ubuntu 22.04||2022||April 2027||Supported|
|Heroku-20||Ubuntu 20.04||2020||April 2025||Default stack|
|Heroku-18||Ubuntu 18.04||2018||April 2023||Deprecated|
|Heroku-16||Ubuntu 16.04||2017||April 2021||End-of-life|
¹: Container based apps do not include the curated and maintained operating system layer of the other Heroku stacks. You are 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.
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.
The default stack for all newly created Heroku apps is Heroku-20.
Viewing which stack your app is using
You can determine which stack your app is using with the
heroku stack CLI command:
$ heroku stack === ⬢ example-app Available Stacks container heroku-18 * heroku-20 heroku-22
In the example above, the
heroku-20 stack is currently active, and the other listed stacks are available as alternatives.
Migrating to a new stack
You may change the stack your app will use for the next deploy using
$ heroku stack:set heroku-22
You might 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.