Upsun
Deploy Nitro apps to Upsun
Preset: upsun
Read more in upsun.com.
Note
The old platform_sh preset name still works and resolves to upsun.
#Project creation
First, either create a new project on Upsun:
upsun project:createor link an existing project:
upsun project:set <project_id>#Upsun configuration
Then in the repository create a .upsun/config.yaml file:
.upsun/config.yaml
applications:
nitro:
type: nodejs:24
dependencies:
nodejs:
"pnpm": "*"
source:
root: "/"
hooks:
build: |
set -eux
pnpm install
NITRO_PRESET=upsun pnpm build
web:
commands:
start: "node .output/server/index.mjs"
locations:
"/":
root: "dist/client"
passthru: true
allow: false
mounts:
".data":
source: storage
source_path: data
routes:
# Primary domain
"https://{default}/":
type: upstream
upstream: "nitro:http"
cache:
enabled: true
cookies: ["*"]
default_ttl: 300
headers: ["Accept", "Accept-Language"] Read more in Complete list of all available configuration properties.
Read more in Nitro storage layer.
#Deployment
Once ready, deploy your main branch with:
git push upsun mainor if you have the Upsun CLI client installed:
upsun deployThe Upsun pipeline then builds and deploys the project:
Building application 'nitro' (runtime type: nodejs:24)
Executing build hook...
W: + pnpm install
W: + pnpm build
[info] [nitro] Building Nitro Server (preset: `upsun`)
[success] [nitro] Nitro Server built
Redeploying environment main
Environment routes
https://example.org/ is served by application `nitro`For any support, please reach out to the Upsun team on Discord.