DigitalOcean
Deploy Nitro apps to DigitalOcean.
Preset: digital_ocean
Read more in DigitalOcean App Platform.
#Set up application
Create a new DigitalOcean app following the guide.
Next, configure environment variables. In your app settings, ensure the following app-level environment variable is set:
NITRO_PRESET=digital_oceanSet an engines.node field in your app's package.json so DigitalOcean uses a supported version of Node.js:
{
"engines": {
"node": "20.x"
}
}Add a start script to your package.json so DigitalOcean knows what command to run after a build:
{
"scripts": {
"start": "node .output/server/index.mjs"
}
}Finally, add this start script to your DigitalOcean app's run command. Go to Components > Settings > Commands, click "Edit", then add npm run start.
Your app should now be live at a DigitalOcean-generated URL, and you can follow the rest of the DigitalOcean deployment guide.