Skip Navigation
Show nav
Heroku Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
  • 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
    • Dynos (app containers)
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Command Line
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery
    • Continuous Integration
  • Language Support
    • Node.js
    • Ruby
      • Working with Bundler
      • Rails Support
    • Python
      • Background Jobs in Python
      • Working with Django
    • Java
      • Working with Maven
      • Java Database Operations
      • Java Advanced Topics
      • Working with Spring Boot
    • PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
    • Heroku Data For Redis
    • Apache Kafka on Heroku
    • Other Data Stores
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
    • Compliance
  • Heroku Enterprise
    • Private Spaces
      • Infrastructure Networking
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
    • Single Sign-on (SSO)
  • 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)
  • Stacks

Stacks

English — 日本語に切り替える

Last updated November 01, 2022

Table of Contents

  • Stack support details
  • Default stack
  • Viewing which stack your app is using
  • Migrating to a new stack

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 as the base layer an app runs on: Heroku-18, Heroku-20, and Heroku-22.

Stack support details

Stack Version Base Technology Available since Supported through Status
Heroku-22 Ubuntu 22.04 LTS 2022 April 2027 Default stack
Heroku-20 Ubuntu 20.04 LTS 2020 April 2025 Supported
Heroku-18 Ubuntu 18.04 LTS 2018 April 2023 Deprecated
Heroku-16 Ubuntu 16.04 LTS 2017 April 2021 End-of-life
Container Docker 2017 N/A¹ N/A¹

¹: 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.

Heroku’s officially supported buildpacks work with all supported stacks. Third-party buildpacks are not guaranteed to work with all stacks.

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.

Default stack

The default stack for all newly created Heroku apps is Heroku-22.

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 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.

Keep reading

  • Stacks (operating system images)

Feedback

Log in to submit feedback.

Upgrading to the Latest Stack Ubuntu Packages on Heroku Stacks

Information & Support

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

Language Reference

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

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing

Subscribe to our monthly newsletter

Your email address:

  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Heroku Podcasts
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Facebook
  • Instagram
  • Github
  • LinkedIn
  • YouTube
Heroku is acompany

 © Salesforce.com

  • heroku.com
  • Terms of Service
  • Privacy
  • Cookies
  • Cookie Preferences