Show nav
Heroku Dev Center
  • Get Started
  • Documentation
  • Changelog
  • 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
      • Rails Support
      • Working with Bundler
    • Python
      • Background Jobs in Python
      • Working with Django
    • Java
      • Working with Maven
      • Java Database Operations
      • Working with the Play Framework
      • Java Advanced Topics
    • PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
    • Kotlin
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
    • Heroku 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)
    • Single Sign-on (SSO)
  • 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
  • Heroku Architecture
  • ›
  • Stacks (operating system images)
  • ›
  • Stacks

Stacks

Last updated 23 July 2019

Table of Contents

  • 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 two stacks (Heroku-16 and Heroku-18), along with the ability to use Docker containers.

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

Stack Version Base Technology Supported through
Heroku-18 (default) Ubuntu 18.04 April 2023 Learn more
Heroku-16 Ubuntu 16.04 April 2021 Learn more
Container Docker Developer-maintained* Learn more

*Containers do not include the curated and maintained operating system of the other Heroku stacks. You are responsible for selecting and maintaining the base layer of containers you deploy.

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.

Keep reading

  • Stacks (operating system images)
  • Buildpacks
  • CLI Usage
  • Deploying with Docker

Feedback

Log in to submit feedback.

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

  • 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
Heroku is acompany

 © Salesforce.com

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