DigitalOcean
Deploy Nitro apps to DigitalOcean.
Preset: digital-ocean (switch to this preset)
Nitro supports deploying on the Digital Ocean App Platform with minimal configuration.
Set up application
- Create a new Digital Ocean app following the guide.
- Next, you'll need to configure environment variables. In your app settings, ensure the following app-level environment variables are set:
NITRO_PRESET=digital-ocean
More information. - You will need to ensure you set an
engines.nodefield in your app'spackage.jsonto ensure Digital Ocean uses a supported version of Node.js:{ "engines": { "node": "16.x" } }
See more information. - You'll also need to add a run command so Digital Ocean knows what command to run after a build. You can do so by adding a start script to your
package.json:{ "scripts": { "start": "node .output/server/index.mjs" } } - Finally, you'll need to add this start script to your Digital Ocean app's run command. Go to
Components > Settings > Commands, click "Edit", then addnpm run start
Your app should be live at a Digital Ocean generated URL and you can now follow the rest of the Digital Ocean deployment guide.

