Skip Navigation
Show nav
Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
    • .NET
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
View categories

Categories

  • Heroku Architecture
    • Compute (Dynos)
      • Dyno Management
      • Dyno Concepts
      • Dyno Behavior
      • Dyno Reference
      • Dyno Troubleshooting
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Developer Tools
    • Command Line
    • Heroku VS Code Extension
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery & Integration (Heroku Flow)
    • Continuous Integration
  • Language Support
    • Node.js
      • Working with Node.js
      • Node.js Behavior in Heroku
      • Troubleshooting Node.js Apps
    • Ruby
      • Rails Support
      • Working with Bundler
      • Working with Ruby
      • Ruby Behavior in Heroku
      • Troubleshooting Ruby Apps
    • Python
      • Working with Python
      • Background Jobs in Python
      • Python Behavior in Heroku
      • Working with Django
    • Java
      • Java Behavior in Heroku
      • Working with Java
      • Working with Maven
      • Working with Spring Boot
      • Troubleshooting Java Apps
    • PHP
      • PHP Behavior in Heroku
      • Working with PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
    • .NET
      • Working with .NET
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
      • Migrating to Heroku Postgres
    • Heroku Key-Value Store
    • Apache Kafka on Heroku
    • Other Data Stores
  • AI
    • Working with AI
    • Heroku Inference
      • Inference API
      • Quick Start Guides
      • AI Models
      • Inference Essentials
    • Vector Database
    • Model Context Protocol
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
      • Single Sign-on (SSO)
    • Private Spaces
      • Infrastructure Networking
    • Compliance
  • Heroku Enterprise
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Heroku Architecture
  • Stacks (operating system images)
  • Heroku-24 Stack

Heroku-24 Stack

Last updated May 08, 2025

Table of Contents

  • What’s new
  • Available software
  • Support period
  • Using Heroku-24
  • Upgrading to Heroku-24
  • Heroku-24 Docker images

This article describes the Heroku-24 stack, based on Ubuntu 24.04. What is a stack?

What’s new

This stack is now based on Ubuntu 24.04, compared to Ubuntu 22.04 used in the Heroku-22 stack.

The most important changes compared to Heroku-22 are:

  • We adjusted the Ubuntu packages installed on the stack to reduce the size of the base images:
    • We removed some less frequently used packages (such as Bazaar and Mercurial).
    • We made some tools that are typically only required during the build (such as GCC, Make, Git and system Python) available only at build time, rather than at app run time too.
  • We made several changes to the Heroku-24 Docker images:
    • We now publish them as multi-architecture images, that support both the amd64 and arm64 architectures instead of only amd64.
    • We now set the default image Linux user to heroku instead of root.

See the upgrade notes for more detailed change information.

Available software

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.

Language runtimes

For the most accurate information on supported language runtime versions, please check the individual language pages:

Buildpack Shorthand Runtime versions
Ruby heroku/ruby Runtime versions
Node.js heroku/nodejs Runtime versions
Python heroku/python Runtime versions
Java heroku/java Runtime versions
PHP heroku/php Runtime versions
Go heroku/go Runtime versions

Operating system packages

For a full list of operating system packages available on Heroku-24, please refer to article Ubuntu Packages on Heroku Stacks.

Support period

Heroku-24 is based on Ubuntu 24.04. It will be supported through April 2029. Learn more about Heroku’s stack update policy.

Using Heroku-24

Heroku-24 is currently the default stack for newly created Cedar apps. It is also the only base image available for Fir apps.

Using Heroku-24 on Cedar

You can specify a stack when creating a Cedar app:

$ heroku create --stack heroku-24

You may change the stack on an existing app; the next build performed will then use the new stack:

$ heroku stack:set heroku-24

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-24"
}

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.

Using Heroku-24 on Fir

Heroku-24 is the only base image available for Fir apps. The stack property of a Fir app is always cnb, and the base image is tied to the builder, optionally defined in an app’s project.toml. Currently, only heroku/builder:24 is supported as a builder for Fir apps, and, as a result, Heroku-24 is the only available base image for Fir apps.

Upgrading to Heroku-24

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.

Upgrade notes

Changes to Git

Git is now only available at build time and not also at app run time.

The .git/ metadata directory for an app’s Git repository has never been available during the build or at run time, even when using older stacks. As such, if your app invokes Git at run time to determine the deployed source revision (commit SHA), these calls will have always failed due to the lack of a valid repository.

If you need to determine the currently deployed revision of your app, either use the env var SOURCE_COMMIT during the build, or enable the Dyno Metadata feature and use the env var HEROKU_BUILD_COMMIT at run time.

If your app needs Git at run time for other purposes, install it using the APT buildpack:

  1. Add the buildpack (if you are not already using it), with: heroku buildpacks:add --index 1 heroku-community/apt
  2. Create a file named Aptfile in the root of your app source code, containing the package name git on its own line.

Changes to system Python

The system Python installation in the base image is now only available at build time, and not also at app run time. In addition, the system Python installation is now only available via the python3 command, and not also via the transitionary python symlink.

These changes will not affect apps using the Python buildpack since the Python installation provided by the buildpack takes precedence over the system Python installation.

If your app needs Python at run time and was not already using the Python buildpack you must add the Python buildpack to your app. Run heroku buildpacks:add --index 1 heroku/python, create an empty requirements.txt file in the root directory of your app source code, and then deploy the changes.

We recommend that you use the Python buildpack instead of relying on system Python, since the buildpack supports specifying a Python version, installing dependencies, and configures Python/your app for best performance on the platform.

Changes to the Docker images published to Docker Hub

We now publish the Heroku-24 Docker images as multi-architecture images, that support both the amd64 and arm64 architectures instead of only amd64. If you use these images outside of Heroku on a machine with an ARM CPU, Docker will now automatically use the arm64 architecture instead of amd64. To switch back to the amd64 architecture pass --platform linux/amd64 to docker build or docker run, or use FROM --platform=linux/amd64 IMAGE_NAME in your Dockerfile.

In addition, we now set the default Linux user for these Docker images to 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.

OpenJDK default version has changed

The default OpenJDK version used to run Java, Scala and Clojure apps has changed. Instead of defaulting to OpenJDK 8, the most recent long-term support release will be installed. This is currently OpenJDK 21 but will change as soon as OpenJDK 25 is released. Older stacks continue to install OpenJDK 8 by default for now. We recommend that you always explicitly configure the required OpenJDK version as described here.

Additional English locales no longer installed

The stack now only includes the C, C.utf8, POSIX and en_US.utf8 locales, and not the additional en_* variants that were previously provided by the language-pack-en package. If you require one of the removed locales, install them using heroku-buildpack-locale. The default locale, POSIX, remains unchanged.

The APT sources list location and format has changed

In Ubuntu 24.04, the location of the APT sources list has changed from /etc/apt/sources.list to /etc/apt/sources.list.d/ubuntu.sources and the file now uses the new deb822 format.

We have updated the heroku-buildpack-apt buildpack to be compatible with this change. However, any third party buildpacks that use APT to install packages and override the default dir::etc::sourceparts location will need adjusting for this change (example compatibility fix).

Legacy time zone data is no longer available

In Ubuntu 24.04, time zone data for non-standard and legacy time zones has been removed. The default list of time zones is limited to those with geographical regions (continent or ocean) and city names. This removal means that US/* style time zones are no longer available, and you must use time zones like America/Chicago instead.

If you need legacy time zones for your application, you can install them based on language usage:

  • Ruby applications can add gem "tzinfo-data" to their Gemfile
  • Go applications can add _ "time/tzdata" to their package main imports

Some language ecosystems don’t rely on this package but instead use vendor time zone data.

If you need legacy time zones for other types of applications, let us know by leaving a comment on our tracking issue.

Changes to OpenSSL certificate loading performance

In Ubuntu 24.04, additional SSL certificates were added to the global certificate store. The additional certificates have been reported to have a negative impact on OpenSSL performance.

If you observe additional latency involving OpenSSL and/or http libraries, you may disable loading of the new certificates by setting SSL_CERT_FILE=/dev/null in your app’s environment. Alternatively, consider using shared http clients and/or sessions within your code to prevent reloading certificates frequently, if appropriate for your app’s architecture.

The legacy Google Chrome buildpack is no longer supported

The heroku-buildpack-google-chrome buildpack is not compatible with Heroku-24. We have sunset it in favour of the newer Chrome for Testing buildpack, which addresses several limitations of the old buildpack. Migrate to the new buildpack using these instructions.

The Redis Stunnel buildpack is no longer supported

The heroku-buildpack-redis buildpack is not compatible with Heroku-24. We have sunset it since Redis 6+ supports TLS natively, which makes the buildpack redundant. Remove the buildpack and switch to Redis’ native TLS support instead. For more information, see Securing Heroku Redis.

Heroku-24 Docker images

Heroku-24 is available as two Docker images:

  1. The run time image (heroku/heroku:24), which is recommended over the build image for most workloads.
  2. The build image (heroku/heroku:24-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-24 as your base image:

FROM heroku/heroku:24

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.

Keep reading

  • Stacks (operating system images)

Feedback

Log in to submit feedback.

Upgrading to the Latest Stack Stacks

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure
  • .NET

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing
  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Github
  • LinkedIn
  • © 2025 Salesforce, Inc. All rights reserved. Various trademarks held by their respective owners. Salesforce Tower, 415 Mission Street, 3rd Floor, San Francisco, CA 94105, United States
  • heroku.com
  • Legal
  • Terms of Service
  • Privacy Information
  • Responsible Disclosure
  • Trust
  • Contact
  • Cookie Preferences
  • Your Privacy Choices