How to Upgrade Your App's Stack

App Platform is a Platform-as-a-Service (PaaS) offering that allows developers to publish code directly to DigitalOcean servers without worrying about the underlying infrastructure.


App Platform apps run in Docker containers that contain the app’s stack, which includes the OS, buildpack, and other dependencies. You can then upgrade the app’s stack by updating your app’s spec to use Ubuntu 22, which updates the container’s OS, buildpacks, and dependencies all to their latest versions, improves your app’s security, and can give you additional features.

To upgrade your app’s stack, go to the Apps page in the DigitalOcean Control Panel and select your app. Click the Settings tab, scroll down to the App Spec section, and click the Edit button. Here, you can either download the spec and edit it in your preferred text editor, or edit the spec directly in the control panel.

To upgrade the stack, add a feature field to the spec (if one doesn’t already exist) and set the value to buildpack-stack=ubuntu-22, like this:

    
        
            
...
name: example-app
region: nyc
features:
    - buildpack-stack=ubuntu-22
services:
- build_command: npm run build
  environment_slug: node-js
  github:
    branch: master
    deploy_on_push: true
    repo: example/app-repo
  http_port: 8080
  instance_count: 2
  instance_size_slug: professional-xs
  name: reactions
  run_command: npm start
  source_dir: /

        
    

Once you’ve finished editing the spec in the control panel, click Save to update your app. If you downloaded the spec, instead click Upload File, select your updated spec, and click Replace. Either way, this automatically triggers a deployment with the new Ubuntu 22 stack.

If you would like to downgrade the stack back to Ubuntu 18, change the value of the buildpack-stack feature back to buildpack-stack=ubuntu-18, then save and deploy the updated spec.