← All articles

· 1 min read

Updating Your App to Node 18 on DigitalOcean App Platform

Person in a yellow jacket typing on a laptop on a couch

Photo by Sigmund on Unsplash

If you’re running your app on DigitalOcean App Platform and want to update it to Node 18, this blog post will show you how to do it in a few simple steps.

Steps:

1 — First, download the doctl CLI tool. You can find it at: https://docs.digitalocean.com/reference/doctl/;

2 — After installation, authenticate your user by running doctl auth init;

3 — Next, list the apps you have running using doctl apps list. Copy the deployment ID (the first column). For example, it may look like 8b9e2d4a-3f5c-6a87-4d39-ec1c4c7943c3;

4 — Use the ID obtained in the previous step to download the current app specification. Run doctl apps spec get 8b9e2d4a-3f5c-6a87-4d39-ec1c4c7943c3 > tmp-spec.yml;

5 — Edit the newly created tmp-spec.yml file, and include the following line at the root of the file:

features:
  - buildpack-stack=ubuntu-22

6 — Now, upload the new app specification to replace the existing one on DigitalOcean by running: doctl apps update 8b9e2d4a-3f5c-6a87-4d39-ec1c4c7943c3 --spec tmp-spec.yml;

7 — Finally, check the new deployment. You should see that it is now running on Ubuntu 22.

PS: Remember, it’s important not to commit the tmp-spec.yml to your repository!

← All articles