Last updated 03 May 2018
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.
Heroku currently provides three stacks: Cedar-14, Heroku-16, and Heroku-18.
Heroku’s officially supported buildpacks work with all current stacks. Custom buildpacks are not guaranteed to work with all stacks.
The default stack for all newly created Heroku apps is Heroku-16.
|Stack Version||Base Technology||Supported through|
|Cedar-14 (deprecated)||Ubuntu 14.04||April 2019||Learn more|
|Heroku-16 (default)||Ubuntu 16.04||April 2021||Learn more|
|Heroku-18 (public beta)||Ubuntu 18.04||April 2023||Learn more|
Ubuntu Packages on Heroku Stacks lists packages available on each stack.
Viewing which stack your app is using
You can determine which stack your app is using with the
heroku apps:info CLI command:
$ heroku apps:info -a example === example ... Stack: heroku-16 ...
Migrating to a new stack
You can view available stacks for an app with the
heroku stack CLI command:
$ heroku stack
You might need to make code changes when you move an app to a different stack. The
stack:set CLI command tells Heroku which stack to use, but it is your responsibility as the application developer to make any required changes to your code.
This article describes how to upgrade to the latest stack.