https://devcenter.heroku.com/articles/heroku-22-stack Skip NavigationShow 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 o Rails Support o Working with Bundler + Python o Working with Django o Background Jobs in Python + Java o Working with Maven o Java Database Operations o Working with the Play Framework o Java Advanced Topics o Working with Spring Boot + PHP + Go o Go Dependency Management + Scala + Clojure * Databases & Data Management + Heroku Postgres o Postgres Basics o Postgres Getting Started o Postgres Performance o Postgres Data Transfer & Preservation o Postgres Availability o 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 o Infrastructure Networking + Enterprise Accounts + Enterprise Teams + Heroku Connect (Salesforce sync) o Heroku Connect Administration o Heroku Connect Reference o Heroku Connect Troubleshooting + Single Sign-on (SSO) * Patterns & Best Practices * Extending Heroku + Platform API + App Webhooks + Heroku Labs + Building Add-ons o Add-on Development Tasks o Add-on APIs o 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-22 Stack Heroku-22 Stack Last updated June 15, 2022 Table of Contents * What's new * Available software * Support period * Using Heroku-22 * Upgrading to Heroku-22 * Heroku-22 Docker image This article describes the Heroku-22 stack, based on Ubuntu 22.04. What is a stack? What's new This stack is now based on Ubuntu 22.04, compared to Ubuntu 20.04 used in the Heroku-20 stack. The most important changes compared to Heroku-20 are: * The stack no longer includes a system Ruby installation. This will not affect the vast majority of users, since Ruby apps will use the Ruby installation provided by the Ruby buildpack. * The stack no longer includes a system Python 2 installation (accessed on Heroku-20 via the python2 command). Python 3 continues to be available via the python and python3 commands, as it was for Heroku-20. 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-22, please refer to article Ubuntu Packages on Heroku Stacks. Support period Heroku-22 is based on Ubuntu 22.04. It will be supported through April 2027. Learn more about Heroku's stack update policy. Using Heroku-22 Heroku-20 is currently the default stack for newly created apps. To use Heroku-22 instead, it must be specified explicitly when creating an app: $ heroku create --stack heroku-22 You may change the stack on an existing app; the next build performed will then use the new stack: $ heroku stack:set heroku-22 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-22" } 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. Upgrading to Heroku-22 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 System Ruby is no longer installed The stack no longer includes a system Ruby installation. This will not affect the vast majority of users, since by default Ruby apps will use the Ruby installation provided by the Ruby buildpack instead. If your app is implemented in a language other than Ruby, but relies on Ruby for scripting purposes e.g. during startup or for controlling workers, you may have to add the heroku/ruby buildpack to your app. If your application uses Ruby and you see ruby: command not found errors, check that you haven't accidentally been using the system-level Ruby installation; you may do so by verifying the Ruby buildpack is present in your application's list of buildpacks using heroku buildpacks. If the heroku/ruby buildpack (or a GitHub URL equivalent) is missing, see our buildpacks documentation for how to add it. You will need to check the buildpack order carefully - the newly added Ruby buildpack may need to go prior to any other buildpacks, depending on exactly where Ruby is being used. If after adding the Ruby buildpack, you are still seeing ruby: command not found errors from profile.d/ scripts at application boot, this is due to the fact that profile.d/ scripts are sourced in alphabetical order, and buildpack Ruby is only added to PATH once the profile.d/ruby.sh script runs. Any other profile.d/ scripts will need to have a name that sorts alphabetically after ruby.sh. Alternatively, you can move the contents of any affected profile.d/ scripts to the .profile file instead, which is guaranteed to always run after all other profile.d/* scripts. System Python 2 is no longer installed The stack no longer includes a system Python 2 installation (accessed on Heroku-20 via the python2 command), since Python 2 has been sunset upstream for some time. The system Python installation is not the same as the one provided by the Python buildpack (which had previously dropped support for Python 2, starting in Heroku-20). Python 3 continues to be available via the python and python3 commands (either via system Python, or the buildpack provided Python installation), as it was for Heroku-20. OpenSSL 3 Ubuntu 22.04 ships with OpenSSL 3.0. OpenSSL 1.1 is not available as a runtime library. If you see OpenSSL/libssl related errors (for example libssl.so.1.1: cannot open shared object file, but there will be many other variations), you will need to update your dependencies and/or third-party buildpacks to a version that is compatible with OpenSSL 3, and ensure that dependencies or binaries you use are compiled against OpenSSL 3. In addition, OpenSSL 3 drops default support for a number of legacy/ insecure cryptographic algorithms. If you see TLS/SSL related failures connecting from your application to external services, it is likely that those servers are running outdated/insecure software or configurations, that will need to be fixed by the maintainers of those services. The static buildpack is no longer supported The experimental heroku-buildpack-static buildpack is not supported on Heroku-22. If your application is using that buildpack (check the output of the heroku buildpacks command for either heroku-community/ static or heroku-buildpack-static), you will need to switch to the more modern and regularly maintained Nginx buildpack instead (available via heroku-community/nginx). For more information, see this migration guide. Heroku-22 Docker image Heroku-22 is available as two Docker images: 1. The runtime image (heroku/heroku:22), which is recommended over the build image for most workloads. 2. The build image (heroku/heroku:22-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-22 as your base image: FROM heroku/heroku:22 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 * 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:[ ][Go] * 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 (c) Salesforce.com * heroku.com * Terms of Service * Privacy * Cookies * Cookie Preferences