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
Hide 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
    • Model Context Protocol
    • Vector Database
    • Heroku Inference
      • Inference Essentials
      • AI Models
      • Inference API
      • Quick Start Guides
    • Working with AI
  • 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-16 Stack

Heroku-16 Stack

English — 日本語に切り替える

Last updated August 02, 2024

Table of Contents

  • What’s new
  • Available software
  • Support period
  • Using Heroku-16
  • Upgrading to Heroku-16
  • Heroku-16 Docker image

The Heroku-16 stack reached end-of-life on May 1st, 2021. Please upgrade to a newer stack as soon as possible. See the Heroku-16 End-Of-Life FAQ for more details.

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

What’s new

We’ve made the following changes from the Cedar-14 stack to the Heroku-16 stack:

  • Heroku-16 is much smaller, with a Docker image of 465 MB (vs 1.35 GB for Cedar-14). By using the Heroku-16 Docker image for local development, you ensure dev/prod parity (i.e., the image running locally, is the same image running on Heroku).
  • Improved support for compiling native Ruby and Python packages
  • The JDK is installed by the Java/JVM buildpack. If you have an app that uses Java, but not the Java buildpack (e.g., jython or a Java Bridge), you’ll have to set the JVM buildpack on your app (instructions are listed below).
  • The HEROKU_ namespace is reserved for config vars set by the Heroku platform in order to offer functionality. If you have created HEROKU_ config vars, we suggest you change them when upgrading to Heroku-16, in order to avoid config var conflicts.

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-16, please refer to article Ubuntu Packages on Heroku Stacks.

Support period

Heroku-16 is based on Ubuntu 16.04, and so reached end-of-life on May 1st, 2021. See the Heroku-16 End-Of-Life FAQ for more details.

Using Heroku-16

It is no longer possible to create new Heroku-16 apps, or to switch an existing app’s stack to Heroku-16. Please use a supported stack instead.

Upgrading to Heroku-16

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

Java is no longer part of the stack

If you are running an app that requires the JVM, but does not use the Java buildback (e.g., jython or a Java Bridge), you will need to set heroku/jvm as your first buildpack, because the Heroku-16 stack no longer bundles a JDK.

The JVM buildpack will then run as the first step of your builds, making the JDK available to subsequent buildpacks and at runtime.

On the command line, prepend heroku/jvm to your heroku-16 app’s list of buildpacks:

$ heroku buildpacks:add --index 1 heroku/jvm

To review your app’s new list of buildpacks, use heroku buildpacks:

$ heroku buildpacks
=== my-app-on-heroku-16 Buildpack URLs
1. heroku/jvm
2. heroku/python

If you are using app.json, you can instead prepend heroku/jvm to the list of buildpacks there:

{
  "buildpacks": [
    {
      "url": "heroku/jvm"
    },
    {
      "url": "heroku/ruby"
    }
  ]
}

Locales are no longer part of the stack

Locales are instruction sets used by some programs to perform operations such as number formatting, string collation or date representation according to a language and/or region.

Starting with Heroku-16, locales are no longer part of the stack, and instead installed via a separate buildpack.

If your app requires locales, create a .locales file in the root directory of your app’s codebase that lists all the locales you need. For example:

de_DE
fr_FR

After you have git added the .locale file and git committed the change, you may then prepend the heroku-community/locale buildpack to the list of buildpacks used by your app:

$ heroku buildpacks:add --index 1 heroku-community/locale

The heroku-community/locale buildpack will then run as the first step of your builds, and install the desired locales for use by subsequent buildpacks and at runtime.

For Java applications, support for locale-specific behavior in the java.util and java.text packages is platform independent, so an installation of system locales is typically not necessary. The system locale and time zone are only used for setting the initial default locale and time zone based on the host operating system’s locale and time zone; any changes to and uses of other locales and time zones use data that is bundled with the JVM.

Heroku-16 Docker image

Heroku-16 is available as two Docker images:

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

FROM heroku/heroku:16

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 Heroku-18 Stack

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