












Last updated May 19, 2026
This article describes the Heroku-26 stack, based on Ubuntu 26.04. What is a stack?
This stack is now based on Ubuntu 26.04, compared to Ubuntu 24.04 used in the Heroku-24 stack.
See the upgrade notes for more detailed change information.
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.
For the most accurate information on supported language runtime versions, please check the individual language pages:
| Buildpack | Shorthand | Runtime versions |
|---|---|---|
| .NET | heroku/dotnet |
Runtime versions |
| Go | heroku/go |
Runtime versions |
| Java | heroku/java |
Runtime versions |
| Node.js | heroku/nodejs |
Runtime versions |
| PHP | heroku/php |
Runtime versions |
| Python | heroku/python |
Runtime versions |
| Ruby | heroku/ruby |
Runtime versions |
For a full list of operating system packages available on Heroku-26, please refer to article Ubuntu Packages on Heroku Stacks.
Heroku-26 is based on Ubuntu 26.04. It will be supported through April 2031. Learn more about Heroku’s stack update policy.
You can specify a stack when creating a Cedar app:
$ heroku create --stack heroku-26
You may change the stack on an existing app; the next build performed will then use the new stack:
$ heroku stack:set heroku-26
If you are using app.json, you should also specify the stack there to
ensure that your Review Apps and Heroku CI runs use the same stack:
{
"stack": "heroku-26"
}
An existing app’s stack cannot be changed using app.json. The stack specified is only applied
to newly created apps that are a Review App, a
Heroku CI test run app, or an app created using a Heroku Button.
The stack property of a Fir app is always cnb, and the base image is tied to the CNB builder, optionally defined in an app’s project.toml:
[_]
schema-version = "0.2"
[io.buildpacks]
builder = "heroku/builder:26"
Please refer to the stack upgrading guide to understand the procedures to follow when upgrading to a new stack.
We recommend that you monitor your application closely after migrating an app to the new stack to ensure it’s performing correctly.
There are currently no known breaking OS changes that require action when upgrading from Heroku-24 to Heroku-26. If you do find a compatibility issue, please let us know via a support ticket or by using the “Submit Feedback” button at the bottom of this page.
Heroku-26 is available as two Docker images:
heroku/heroku:26), which is recommended over the build image for
most workloads.heroku/heroku:26-build), which is larger as it includes development
headers and toolchains. It is only recommended for customers that need to compile source
code or dependencies.Use the following command in your Dockerfile to use Heroku-26 as your base image:
FROM heroku/heroku:26
We publish these images as multi-architecture images, supporting both the amd64 and arm64
CPU architectures. By default Docker will use the image architecture that matches the machine on
which it is being run. To force the use of a different architecture, pass
--platform linux/<architecture> to docker build or docker run commands, or use
FROM --platform=linux/<architecture> IMAGE_NAME in your Dockerfile.
The default Linux user for these images is heroku, which does not have root permissions. If you
need to modify locations outside of /home/heroku or /tmp you will need to switch back to the
root user. To do this add USER root to your Dockerfile when building images, or pass
--user root to any docker run commands.
To learn more about deploying Docker images, please refer to the Heroku Container Registry and Runtime documentation.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。